/* ===========================
   Homepage Floating Header Styles
   =========================== */

.base__header {
    position: fixed !important;
    /* Mobile: space for notches and status bar, but not too much */
    top: max(env(safe-area-inset-top), 24px);
    /* Use left + width instead of left + right for better control */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-width: calc(100vw - 24px);
    /* Remove padding-top from base CSS that pushes content down */
    padding-top: 0 !important;
    height: auto !important;          /* <-- ADD THIS LINE */
    z-index: 50;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dark .base__header {
    background-color: rgba(17, 24, 39, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Enhanced glassmorphism when scrolled */
.base__header.scrolled {
    background-color: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.dark .base__header.scrolled {
    background-color: rgba(17, 24, 39, 0.4) !important;
}

.base-header {
    border-bottom: none !important;
    border-radius: 16px;
    background-color: transparent !important;
    padding: 8px 12px !important;  /* Slightly more padding to define size */
    height: unset !important;       /* Completely remove height constraint */
    min-height: unset !important;   /* Remove min-height too */
}

/* Reduce header element sizes */
.base-header__logo {
    font-size: 16px !important;
}

/* Clean text logo styling - removed heavy effects */

.base-header__nav li {
    padding: 10px 16px !important;
    font-size: 14px !important;
}

.base-header__user-avatar img,
.base-header__user-avatar > div {
    width: 32px !important;
    height: 32px !important;
}

.base-header__user a {
    font-size: 14px !important;
    padding: 8px 16px !important;
}

/* Show "Talk to us" and "Login" buttons on mobile (homepage only) */
.base-header__user {
    display: flex !important;
}

/* Make buttons more compact on mobile for homepage */
@media (max-width: 1023px) {
    .base-header__user {
        gap: 0.75rem;
    }

    .base-header__user a {
        font-size: 12px !important;
        padding: 6px 12px !important;
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
        white-space: nowrap;
    }

    /* Adjust header layout to fit: Logo + Buttons + Hamburger */
    .base-header__logo {
        width: auto !important;
        flex-shrink: 0;
    }

    .base-header__user {
        width: auto !important;
        flex-shrink: 1;
        margin-left: auto !important;
        margin-right: 0.5rem;
        justify-content: flex-end !important;
    }
}

/* Adjust content to account for fixed header */
.base__content-container {
    margin-top: 0 !important;
}

.homepage {
    margin-top: 0;
}

/* Ensure drawer appears above floating header */
.base__drawer {
    z-index: 60 !important;
}

.base__overlay {
    z-index: 55 !important;
}

/* Hero section spacing on mobile to account for header */
.homepage section:first-of-type > div:first-child {
    /* Add padding-top on mobile to prevent content from hiding behind header */
    padding-top: 60px;
}

@media (min-width: 768px) {
    .homepage section:first-of-type > div:first-child {
        padding-top: 0;
    }
}

/* ===========================
   Responsive Header Adjustments
   =========================== */

@media (min-width: 768px) {
    .base-header {
        padding: 10px 20px !important;
    }

    .base-header__logo {
        font-size: 18px !important;
    }

    .base__header {
        top: 20px;
        width: calc(100% - 40px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        max-width: calc(100vw - 40px);
    }
}

@media (min-width: 1024px) {
    .base-header {
        padding: 12px 32px !important;
    }

    .base-header__logo {
        font-size: 20px !important;
    }

    .base-header__nav li {
        padding: 12px 20px !important;
        font-size: 15px !important;
    }

    .base__header {
        top: 24px;
        width: calc(100% - 64px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        max-width: calc(100vw - 64px);
        border-radius: 20px;
    }

    .base-header {
        border-radius: 20px;
    }
}

/* ===========================
   Animation Classes
   =========================== */

/* Linear-style fade-in animation */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
    animation-fill-mode: forwards;
}

/* Animation delay utilities - slower, more gradual */
.animate-delay-100 {
    animation-delay: 0.2s;
}

.animate-delay-200 {
    animation-delay: 0.4s;
}

.animate-delay-300 {
    animation-delay: 0.6s;
}

.animate-delay-400 {
    animation-delay: 0.8s;
}

.animate-delay-450 {
    animation-delay: 0.9s;
}

.animate-delay-500 {
    animation-delay: 1s;
}

.animate-delay-600 {
    animation-delay: 1.2s;
}

/* Smooth hover transitions for buttons */
.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

.group:hover .group-hover\:translate-x-0\.5 {
    transform: translateX(0.125rem);
}

/* Customer Carousel Wrapper */
.customer-carousel-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Customer Carousel Container */
.customer-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 1rem;
}

/* Fade effect on left and right edges */
.customer-carousel-container::before,
.customer-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    pointer-events: none;
    z-index: 10;
}

.customer-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--color-background), transparent);
}

.customer-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--color-background), transparent);
}

.customer-carousel {
    display: flex;
    gap: 4rem;
    width: max-content;
    will-change: transform;
}

.customer-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 140px;
    height: 60px;
    padding: 0.75rem;
    cursor: pointer;
    position: relative;
}

.customer-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.3s ease;
}

.customer-logo-item:hover .customer-logo {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .customer-logo {
        filter: grayscale(100%) opacity(0.5) brightness(1.2);
    }

    .customer-logo:hover {
        filter: grayscale(0%) opacity(1) brightness(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .customer-carousel {
        gap: 2rem;
    }

    .customer-logo-item {
        width: 100px;
        height: 50px;
    }

    /* Narrower fade on mobile */
    .customer-carousel-container::before,
    .customer-carousel-container::after {
        width: 60px;
    }
}

/* Centered Testimonial Carousel */
.centered-testimonial-carousel {
    min-height: 400px;
    position: relative;
}

.centered-testimonial-wrapper {
    display: flex;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.centered-testimonial-slide {
    flex-shrink: 0;
    width: 100%;
    opacity: 0.4;
    transform: scale(0.9);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    filter: blur(2px);
}

.centered-testimonial-slide.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.centered-testimonial-dot {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 9999px;
}

.centered-testimonial-dot.active {
    width: 24px;
    background-color: var(--color-olympia-emerald) !important;
}

.centered-testimonial-dot:hover {
    background-color: var(--color-olympia-emerald);
    opacity: 0.7;
}
