/* Rasm rotate bo'lmasligi uchun */
.no-rotate {
    animation: none !important;
}

/* Shriftlar va asoslar */
body {
    font-family: 'Roboto', sans-serif;
    scroll-behavior: smooth;
}
h1, h2, h3, h4, .font-montserrat {
    font-family: 'Montserrat', sans-serif;
}

/* Animatsiyalar */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}
.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.animate-bounce-slow {
    animation: bounce-slow 4s ease-in-out infinite;
}

/* Marquee cheksiz aylanish */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}
.marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
}
.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}
.partner-logo img {
    height: 7rem;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s;
}
.partner-logo img:hover {
    transform: scale(1.05);
}

/* Reveal animatsiyalari (JS orqali trigger qilinadi) */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-up { transform: translateY(60px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }

.reveal-up.active, .reveal-left.active, .reveal-right.active {
    opacity: 1;
    transform: translate(0);
}

/* Hover Zoom */
.hover-zoom {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hover-zoom:hover {
    transform: scale(1.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f9fafb; }
::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #dc2626; }

/* ==================== RESPONSIVE DESIGN ==================== */

/* Mobile (320px - 640px) */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Header adjustments */
    header {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Grid layouts */
    .grid {
        gap: 2rem !important;
    }
    
    /* Button sizing */
    button, a[class*="px-10"] {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Hide large decorative elements on mobile */
    .hidden.lg\:flex {
        display: none !important;
    }
    
    /* Section padding */
    section {
        padding: 2rem 1rem !important;
    }
    
    .py-32 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Text sizing */
    .text-5xl {
        font-size: 2rem;
    }
    
    .text-4xl {
        font-size: 1.75rem;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .text-lg {
        font-size: 0.95rem;
    }
    
    /* Image sizing */
    img {
        max-width: 100%;
        height: auto;
    }
    
    .w-96, .w-72 {
        width: 50%;
        height: auto;
    }
    
    /* Parallax backgrounds smaller */
    .absolute.top-20.right-\[-10\%\].w-96 {
        width: 200px !important;
        height: 200px !important;
        right: -20% !important;
    }
    
    .absolute.bottom-10.left-\[-5\%\].w-72 {
        width: 150px !important;
        height: 150px !important;
        left: -15% !important;
    }
}

/* Tablet (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    body {
        font-size: 15px;
    }
    
    h1 {
        font-size: 3.5rem !important;
    }
    
    h2 {
        font-size: 2.25rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .max-w-7xl {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    /* Grid adjustments */
    .grid {
        gap: 2.5rem !important;
    }
    
    .lg\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    /* Section padding */
    section {
        padding: 2.5rem 1.5rem !important;
    }
    
    .py-32 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Hide very large decorative elements */
    .w-\[500px\], .h-\[500px\] {
        width: 350px !important;
        height: 350px !important;
    }
    
    .w-\[400px\], .h-\[400px\] {
        width: 280px !important;
        height: 280px !important;
    }
    
    .w-\[250px\], .h-\[250px\] {
        width: 180px !important;
        height: 180px !important;
    }
    
    /* Button sizing */
    a[class*="px-10"] {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 1.875rem;
    }
}

/* Enable smooth CSS marquee on tablet and desktop */
@media (min-width: 641px) {
    .marquee-container { overflow: hidden; }
    .marquee-track { animation: marquee 50s linear infinite; }
    .marquee-container:hover .marquee-track { animation-play-state: paused; }
}

/* Small Desktop (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .max-w-7xl {
        max-width: 90%;
    }
    
    h1 {
        font-size: 5rem !important;
    }
    
    /* Grid adjustments */
    .grid {
        gap: 3rem !important;
    }
    
    /* Section padding */
    section {
        padding: 3rem 2rem !important;
    }
    
    .py-32 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    .lg\:grid-cols-2 {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Large Desktop (1281px and above) */
@media (min-width: 1281px) {
    .max-w-7xl {
        max-width: 1280px;
    }
    
    section {
        padding: 4rem 2rem !important;
    }
    
    .py-32 {
        padding-top: 8rem !important;
        padding-bottom: 8rem !important;
    }
}

/* Extra Large Desktop (1920px and above) */
@media (min-width: 1920px) {
    body {
        font-size: 17px;
    }
    
    h1 {
        font-size: 7rem !important;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    .max-w-7xl {
        max-width: 1400px;
    }
}

/* ==================== FLEXIBLE IMAGE HANDLING ==================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive typography */
@media (max-width: 768px) {
    .text-xs {
        font-size: 0.6875rem;
    }
    
    .tracking-widest {
        letter-spacing: 0.05em;
    }
}

/* ====== Small phones: make header horizontal, add spacing, and touch-friendly partners carousel ====== */
@media (max-width: 500px) {
    body { padding-top: 72px; }
    header { top: 0.5rem; }
    header > div { padding: 0.5rem 0.75rem; }

    /* Ensure brand stays compact */
    #brand { font-size: 1.1rem; line-height: 1; }

    /* Mobile menu full-width-ish and accessible to thumb */
    #mobileMenu {
        left: 6px !important;
        right: 6px !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        top: calc(0.5rem + 56px) !important;
        border-radius: 12px !important;
    }
    #mobileMenu nav ul li a { padding-top: 0.6rem !important; padding-bottom: 0.6rem !important; font-size: 14px !important; }

    /* add margin between navbar and the hero so they don't mix */
    section#home { margin-top: 1rem; }

    /* Partners: switch from animated marquee to touch-scroll flex carousel */
    .marquee-track { animation: none !important; display: flex; gap: 1rem; width: auto; }
    .marquee-container { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; }
    .partner-logo { flex: 0 0 auto; scroll-snap-align: center; display: inline-flex; align-items: center; justify-content: center; padding: 0 .25rem; }
    .partner-logo img { height: 4.2rem !important; transform: rotate(-6deg) !important; }
    .marquee-container::-webkit-scrollbar { height: 8px; }

    /* dragging cursor */
    .marquee-container.dragging { cursor: grabbing; cursor: -webkit-grabbing; }

    /* compact language & hamburger */
    #langSelect { padding: 6px 8px; font-size: 12px; }
    #mobileMenuButton { padding: 6px; }
    #mobileMenuButton svg { width: 20px; height: 20px; }
}

@media (max-width: 400px) {
    body { padding-top: 64px; }
    header { top: 0.4rem; }
    header > div { padding: 0.4rem 0.6rem; }
    #brand { font-size: 1rem; }
    section#home { margin-top: 0.8rem; }

    .marquee-track { animation: none !important; gap: 0.75rem; }
    .partner-logo img { height: 3.2rem !important; transform: rotate(-4deg) !important; }
    .marquee-container { overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
}

/* Yonbosh (tilt) effect for partner logos (applies across sizes) */
.partner-logo { display: inline-block; transform-origin: center center; }
.partner-logo img { transform: none; transition: transform 0.35s ease, filter 0.35s ease; will-change: transform; }
.partner-logo:hover img { transform: scale(1.03); filter: drop-shadow(0 6px 12px rgba(0,0,0,0.08)); }


/* Responsive spacing */
@media (max-width: 640px) {
    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .px-12 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .gap-12 {
        gap: 1.5rem !important;
    }
    
    .gap-20 {
        gap: 1.5rem !important;
    }
}

/* Responsive flex: avoid changing global .flex; provide a utility for stacking when needed */
@media (max-width: 768px) {
    /* Use explicit helper when vertical stacking is desired */
    .stack-on-mobile {
        flex-direction: column !important;
    }

    .flex-wrap {
        flex-wrap: wrap;
    }

    /* Ensure header stays horizontal on mobile (keep brand left, controls right) */
    header > div, header > .max-w-7xl, header .flex {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.5rem;
    }
}
