/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
    /* Responsive Font Sizes */
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-xs: 12px;

    /* Spacing Scale */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Transitions */
    --transition-fast: 150ms;
    --transition-base: 300ms;
    --transition-slow: 500ms;
}

/* ============================================
   Base Styles
   ============================================ */
:where([class^="ri-"])::before {
    content: "\f3c2";
}

body {
    font-family: 'Noto Naskh Arabic', serif;
    background-color: #f9f9f9;
    font-size: var(--font-size-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.kufi {
    font-family: 'Noto Kufi Arabic', sans-serif;
    line-height: 1.3;
}

/* Premium Ticker Animation */
.ticker {
    animation: ticker-rtl 30s linear infinite;
    display: inline-flex;
    will-change: transform;
}

@keyframes ticker-rtl {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker:hover {
    animation-play-state: paused;
}

/* Ticker Container */
.ticker-container {
    position: relative;
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    width: fit-content;
}

/* Glassmorphism Classes */
.glass-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Custom Checkbox */
.custom-checkbox {
    display: none;
}

/* Logo Rendering */
.logo-font {
    font-family: 'Pacifico', cursive;
}

/* RTL Transitions */
.preserve-3d {
    transform-style: preserve-3d;
}

/* Mobile Menu Transitions */
#mobileMenuPanel {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobileMenu.active #mobileMenuPanel {
    transform: translateX(0);
}

#mobileMenu.active #mobileMenuOverlay {
    opacity: 1;
}

#mobileMenu.active {
    display: block;
}

/* ============================================
   Responsive Utilities
   ============================================ */

/* Prevent horizontal scroll */
html,
body {
    overflow-x: hidden;
    width: 100%;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Optimize images globally */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Mobile Small (320px - 479px)
   ============================================ */
@media (max-width: 479px) {
    body {
        font-size: 14px;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .text-3xl {
        font-size: 1.375rem;
    }

    .text-2xl {
        font-size: 1.125rem;
    }

    .text-xl {
        font-size: 1rem;
    }
}

/* ============================================
   Mobile (480px - 767px)
   ============================================ */
@media (min-width: 480px) and (max-width: 767px) {
    body {
        font-size: 15px;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================================
   Mobile General (max-width: 767px)
   ============================================ */
@media (max-width: 767px) {
    .ticker {
        font-size: 0.75rem;
    }

    .h-20 {
        height: 4rem;
    }

    .py-20 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }

    .py-24 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    .text-2xl {
        font-size: 1.25rem;
    }

    .text-xl {
        font-size: 1.125rem;
    }

    .w-10,
    .h-10 {
        width: 2.5rem;
        height: 2.5rem;
    }

    .w-12,
    .h-12 {
        width: 3rem;
        height: 3rem;
    }

    .p-10 {
        padding: 1rem;
    }

    /* Touch targets */
    .touch-target,
    button,
    a.button,
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1rem;
    }

    /* Images */
    img {
        -webkit-user-drag: none;
        -khtml-user-drag: none;
        -moz-user-drag: none;
        -o-user-drag: none;
        user-drag: none;
    }

    /* Forms - prevent zoom on iOS */
    input,
    select,
    textarea {
        font-size: 16px;
    }

    /* Reduce motion */
    @media (prefers-reduced-motion: reduce) {

        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
    }
}

/* Section spacing adjustment */
section.pb-20.bg-white {
    margin: 1.5rem;
}

@media (min-width: 768px) {
    section.pb-20.bg-white {
        margin: 2.5rem;
    }
}

@media (min-width: 1024px) {
    section.pb-20.bg-white {
        margin: 40px;
    }
}