/* ==========================================================================
   Hero Section
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero Container & Background
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    width: 100%;
    margin-top: var(--navbar-height);
    /* Fallback for older browsers */
    height: calc(var(--vh-fallback) - var(--navbar-height));
    min-height: 500px; /* Minimum height to ensure content is always visible */
    overflow: hidden;
    background-color: var(--neutral-100);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    margin: 0 auto;
    width: 90%;
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   2. Hero Title and Subtitle
   -------------------------------------------------------------------------- */
.hero-title {
    font-size: 2.8rem;
    line-height: 1.3;
    color: var(--text-600);
    text-align: center;
    margin: 4rem auto 5rem auto;
    max-width: 800px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.8s ease forwards 0.2s;
}

.hero-title .accent {
    display: inline-block;
    color: var(--color-accent);
    opacity: 0;
    transform: scale(0.8);
    animation: accentPulse 1s ease forwards 0.8s;
}

.hero-subtitle {
    font-size: 1.8rem;
    line-height: 1.3;
    color: var(--text-700);
    text-align: center;
    margin: 1.5rem auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.6s ease forwards 0.8s;
}

/* --------------------------------------------------------------------------
   3. Hero Buttons (CTAs)
   -------------------------------------------------------------------------- */
.hero-buttons {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16%;
    display: flex;
    gap: 1.25rem;
    flex-direction: row;
    align-items: center;
    z-index: 3;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.hero-buttons .btn-primary {
    background-color: var(--color-accent);
    color: var(--text-900);
    padding: var(--spacing-sm) var(--spacing-lg);
    margin: 0 var(--spacing-md);
    min-width: 10rem;
    text-align: center;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.8s ease forwards 1.5s;
    transition: box-shadow 0.3s ease, transform 0.2s ease, background-color 0.2s ease;
}

.hero-buttons .btn-primary:hover {
    box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.15),
    0 4px 10px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.hero-buttons .btn-primary:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.hero-buttons .btn-secondary {
    background-color: transparent;
    color: var(--text-900);
    border: 2px solid var(--text-900);
    padding: var(--spacing-sm) var(--spacing-lg);
    margin: 0 var(--spacing-md);
    min-width: 10rem;
    text-align: center;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.8s ease forwards 1.7s;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-buttons .btn-secondary:hover {
    background-color: var(--text-900);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.hero-buttons .btn-secondary:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   4. Scroll Indicator
   -------------------------------------------------------------------------- */
.scroll-indicator {
    position: absolute;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 1.5s infinite;
    z-index: 2;
    opacity: 0.5;
}

.scroll-indicator svg {
    width: 48px;
    height: 48px;
    display: block;
}

/* --------------------------------------------------------------------------
   5. Services Marquee
   -------------------------------------------------------------------------- */
.services-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 1.5rem 0;
    background-color: var(--neutral-100);
}

.services-marquee::before,
.services-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    width: 10%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.services-marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--neutral-100) 0%, transparent 100%);
}

.services-marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--neutral-100) 0%, transparent 100%);
}

.services-track {
    display: inline-block;
    white-space: nowrap;
    animation: scrollLeft 18s linear infinite;
    position: relative;
    z-index: 1;
    will-change: transform;
    transform: translateZ(0);
}

.services-track span {
    display: inline-block;
    margin: 0 2rem;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--text-700);
    white-space: nowrap;
}

.services-track span:nth-child(2n + 1) {
    color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   6. Keyframes
   -------------------------------------------------------------------------- */
@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes accentPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
        text-shadow: none;
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        text-shadow: 0 0 8px var(--color-accent);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        text-shadow: none;
    }
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .services-track {
        animation: none;
        transform: translateX(-25%);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* --------------------------------------------------------------------------
   7. Mobile Viewport Support
   -------------------------------------------------------------------------- */
/* Use dynamic viewport height when available (updated by JavaScript) */
.hero {
    height: calc(var(--vh-dynamic) - var(--navbar-height));
}

/* Use small viewport height for browsers that support it */
@supports (height: 100svh) {
    .hero {
        height: calc(100svh - var(--navbar-height));
    }
}

/* Use dynamic viewport height for browsers that support it (best option) */
@supports (height: 100dvh) {
    .hero {
        height: calc(100dvh - var(--navbar-height));
    }
}
