/* ========================================
   HERO BLOCK STYLES
   ======================================== */

/* Hero section base - height is controlled by JS */
.hero-section {
    min-height: 100vh;
    /* Fallback only */
}

/* Fixed 620px height option */
.hero-section[data-hero-height="620px"] {
    min-height: 620px !important;
}

.hero-container {
    min-height: clamp(500px, 80vh, 1080px);
}

/* Limit container height for fixed 620px hero */
.hero-section[data-hero-height="620px"] .hero-container {
    min-height: 620px !important;
    max-height: 620px !important;
    height: 620px !important;
}

/* Mobile */
@media (max-width: 640px) {
    .hero-container {
        min-height: 100svh !important;
        padding-top: 100px !important;
    }

    /* 620px hero uses 45vh on mobile */
    .hero-section[data-hero-height="620px"] {
        min-height: 45vh !important;
    }

    .hero-section[data-hero-height="620px"] .hero-container {
        min-height: 45vh !important;
        max-height: 45vh !important;
        height: 45vh !important;
    }
}

/* Tablet (641px - 1279px) */
@media (min-width: 641px) and (max-width: 1279px) {
    .hero-container {
        min-height: clamp(600px, 85vh, 900px) !important;
        padding-top: 140px !important;
    }
}

/* Desktop (1280px+) */
@media (min-width: 1280px) {
    .hero-container {
        padding-top: 300px !important;
    }
}

@media (min-width: 1600px) {
    .hero-container {
        padding-top: 350px !important;
    }
}

/* Reduce text spacing on mobile/tablet */
@media (max-width: 1279px) {
    .hero-text-content {
        gap: 0.75rem !important;
    }

    .hero-text-content>* {
        margin-bottom: 0.25rem;
    }
}

/* Mobile text sizing - scale down hero text */
@media (max-width: 640px) {
    .hero-text-content .text-6xl {
        font-size: 2rem !important;
        /* 32px instead of 60px */
        line-height: 1.2 !important;
    }

    .hero-text-content .text-5xl {
        font-size: 1.75rem !important;
        /* 28px instead of 48px */
        line-height: 1.2 !important;
    }

    .hero-text-content .text-4xl {
        font-size: 1.5rem !important;
        /* 24px instead of 36px */
        line-height: 1.25 !important;
    }

    .hero-text-content .text-3xl {
        font-size: 1.25rem !important;
        /* 20px instead of 30px */
        line-height: 1.3 !important;
    }

    .hero-text-content .text-2xl {
        font-size: 1.125rem !important;
        /* 18px instead of 24px */
        line-height: 1.4 !important;
    }

    .hero-text-content .text-xl {
        font-size: 1rem !important;
        /* 16px instead of 20px */
        line-height: 1.5 !important;
    }
}

/* ========================================
   HERO LANGUAGE BANNER
   ======================================== */

.hero-lang-banner {
    position: relative;
    overflow: hidden;
    color: white;
    border: 2px solid #FFFFFF;
    border-left: none; /* Removed left divider */
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 14px;
    border-bottom-right-radius: 14px;
}

/* Desktop: breakout to the left screen edge */
@media (min-width: 1280px) {
    .hero-lang-banner {
        /* Calculate distance from left edge of centered content to screen edge */
        --breakout-offset: calc(max(24px, (100vw - 1360px) / 2 + 24px));
        
        /* Total width from screen edge is exactly 515px */
        width: 515px;
        min-height: 150px;
        margin-left: calc(-1 * var(--breakout-offset));
        
        box-shadow: 0 8px 30px -5px rgba(0, 0, 0, 0.45);
    }

    .hero-lang-banner__content {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 28px;
        z-index: 3;
    }
}

/* Mobile/Tablet: responsive radius and spacing */
@media (max-width: 1279px) {
    .hero-lang-banner {
        /* Default for Tablet: 50% width */
        width: 60%;
        margin-bottom: 2rem;
        
        /* Hug the left screen edge by offsetting the container padding */
        margin-left: -24px; /* matches md:px-6 */
    }

    @media (max-width: 768px) {
        .hero-lang-banner {
            margin-left: -20px; /* matches sm:px-5 */
        }
    }

    @media (max-width: 640px) {
        .hero-lang-banner {
            /* Mobile: 90% width */
            width: 90%;
            margin-left: -16px; /* matches px-4 */
        }
    }

    .hero-lang-banner__content {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px 20px;
        z-index: 3;
    }
}

/* The image scales to fill the extended container */
.hero-lang-banner__bg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 80px;
    object-fit: cover;
}

.hero-lang-banner__text {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-align: center;
}

@media (min-width: 1280px) {
    .hero-lang-banner__text {
        font-size: 1.25rem; /* Slightly larger on desktop */
    }
}

@media (max-width: 640px) {
    .hero-lang-banner__text {
        font-size: 0.85rem; /* Smaller on mobile */
    }
}
