/* Hero Section Styles - Optimized positioning */

:root {
    /* Hero-specific layout variables - reference tokens where applicable */
    --section-spacing: var(--space-24);  /* 96px = 6rem */
    --content-spacing: var(--space-8);   /* 32px = 2rem */
    --hero-height: calc(70vh - var(--header-height));
    --header-height: 80px;  /* Keep specific value for hero calculations */
    --hero-top-position: var(--header-height);
}

/* Top banner sits just below the fixed header, with extra buffer so its clearly visible. */
.top-banner {
    position: relative;
    z-index: 10; /* Above video background (z-index: 2) so banner isn't cut off on mobile */
    margin-top: calc(var(--header-height, 80px) * 1.4);
    margin-bottom: 12px; /* small breathing room before hero */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* No extra padding so banner sits immediately under the fixed header */
    padding: 0;
    background: #0f1619;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-banner img {
    display: block;
    max-width: min(1200px, 95%);
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Mobile: reduce top margin so banner fits better and aligns with hero */
@media (max-width: 768px) {
    .top-banner {
        margin-top: calc(var(--header-height, 80px) + 8px); /* Just enough to clear fixed header */
        margin-bottom: 0; /* Remove gap between banner and hero */
    }
}
@media (max-width: 576px) {
    .top-banner {
        margin-top: calc(var(--header-height, 80px) + 4px); /* Tighter on small phones */
    }
}

/* When a banner is present, hero should not add an extra top offset. */
.top-banner + .simple-hero { top: 0 !important; }

/* Simple Hero Section Container - Positioned correctly below navigation */
.simple-hero {
    position: relative;
    top: 0; /* No extra offset; banner already clears the fixed header */
    left: 0;
    width: 100%;
    height: auto; /* Let content define height to avoid clipping */
    max-height: none;
    min-height: max(90vh, 750px) !important; /* Ensure minimum height for short viewports */
    margin: 0;
    padding: 0 0 220px 0 !important; /* Increased bottom padding for more space */
    overflow: hidden; /* Allow video to be contained properly */
    /* Background color as fallback */
    background: #1a2f35;
    z-index: 1;
    display: block;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top of section */
    align-items: center;
    isolation: isolate;
    margin-top: 0; /* Remove negative margin */
    /* Ensure hero is visible and properly positioned */
    visibility: visible;
}

/* Video CSS removed - back to original hero section */

/* Video loading state */
#hero-video:not([data-loaded]) {
    opacity: 0;
}

#hero-video[data-loaded] {
    opacity: 1;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 2; /* Behind content but above background */
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    /* Ensure video loads */
    background-color: transparent;
}

/* Video overlay removed - back to original hero section */

/* Hero overlay removed - back to original hero section */

.simple-hero-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    /* Padding: top clears banner, bottom ensures content isn't cut off */
    padding: 100px 30px 150px 30px !important; /* Increased bottom padding */
    text-align: center;
    position: relative;
    z-index: 20; /* Well above video layer */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically center hero content */
    align-items: center; /* Center content horizontally */
    min-height: 650px !important; /* Ensure minimum height for content */
    visibility: visible;
    opacity: 1;
    margin-top: 0; /* Reset margin */
}

/* Hero Content with Map Container - Add padding to avoid navigation overlap */
.hero-content-with-map {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    /* Balanced padding keeps the hero block centered within the frame */
    padding: 20px 0 100px !important; /* Increased bottom padding */
    gap: 40px;
}

.simple-hero-title {
    position: relative;
    z-index: 30;
    font-family: var(--font-title, 'Cinzel', serif);
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.8); /* Stronger shadow for video background */
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 0; /* Remove top margin */
}

/* New simplified tagline - cleaner than old subtitle box */
.simple-hero-tagline {
    position: relative;
    z-index: 25;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 1.4rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    max-width: 600px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Hero CTA Group - Single primary button with secondary store badges */
.hero-cta-group {
    position: relative;
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.btn-hero-main {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
    transition: all 0.3s ease;
}

.btn-hero-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 140, 66, 0.5);
}

.hero-store-badges {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.store-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.store-badge:hover {
    background: rgba(255, 140, 66, 0.2);
    border-color: var(--primary-color, #FF8C42);
    color: var(--primary-color, #FF8C42);
    transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 25;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

.simple-hero-subtitle {
    position: relative;
    z-index: 25;
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    color: #f0f0f0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle-lead {
    font-size: 1.1rem;
    margin-bottom: 0.85rem;
}

.subtitle-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.subtitle-segment {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.subtitle-label {
    display: block;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.15rem;
}

.subtitle-list {
    list-style: none;
    margin: 0;
    padding-left: 1.1rem;
}

.subtitle-list li {
    position: relative;
    margin: 0.15rem 0;
    padding-left: 0.6rem;
}

.subtitle-list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color, #FF8C42);
    font-size: 0.9rem;
}

/* Final CTA Section */
.final-cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, rgba(26, 47, 53, 0.98) 0%, rgba(15, 25, 30, 0.98) 100%);
    text-align: center;
    border-top: 1px solid rgba(255, 140, 66, 0.3);
    position: relative;
    overflow: hidden;
}

.final-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255, 140, 66, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.final-cta-title {
    font-family: var(--font-title, 'Cinzel', serif);
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.final-cta-subtitle {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Segment CTA buttons in content sections */
.segment-cta {
    margin-top: 1.5rem;
    display: inline-block;
}

/* Responsive for new elements */
@media (max-width: 768px) {
    .simple-hero-tagline {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .btn-hero-main {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .scroll-indicator {
        bottom: 20px;
        font-size: 0.75rem;
    }
    
    .final-cta-title {
        font-size: 1.8rem;
    }
    
    .final-cta-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .final-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .simple-hero-tagline {
        font-size: 1rem;
    }
    
    .hero-store-badges {
        gap: 0.5rem;
    }
    
    .store-badge {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Hero visual area */
.hero-visual {
    position: relative;
    min-height: auto; /* Let height be defined by content so it's aligned with hero content */
    display: flex;
    align-items: flex-start; /* Align mini map to the top */
    justify-content: center;
    overflow: hidden;
    /* Background handled by #hero-video element. Removed invalid MP4 CSS background. */
    z-index: 1; /* Base layer */
}

.hero-visual-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease-in-out;
    padding: 15px;
}

.visual-placeholder {
    width: 100%;
    height: 100%; /* Use full height of container */
    position: relative;
    margin-top: 0; /* Removed top margin to center vertically */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 1s ease-in-out;
    min-height: 400px; /* Minimum height to ensure visibility */
    max-height: 600px; /* Maximum height to prevent overflow */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .simple-hero {
        padding-bottom: 180px; /* Reduce bottom padding on smaller screens */
    }
    
    .simple-hero-container {
        padding: 40px 20px;
        gap: 30px;
    }
    
    .portal-section {
        padding: 25px;
    }
    
    .portal-section h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 1200px) {
    .simple-hero-title {
        font-size: 4rem;
    }
    
    /* Hide the mini-map when viewport gets tighter so hero copy stays centered */
    .hero-content-with-map {
        justify-content: center;
    }
    .hero-visual {
        display: none;
    }
    .hero-content {
        max-width: 1000px;
    }

    .portal-section {
        padding: 20px;
    }
    
    .portal-sections {
        margin-top: 1rem;
    }
}

@media (max-width: 992px) {
    .simple-hero {
        padding-bottom: 160px; /* Further reduce bottom padding on mobile */
        min-height: auto; /* Let content define height on tablets/landscape phones */
    }
    
    .simple-hero-title {
        font-size: 3.5rem;
    }
    
    .simple-hero-container {
        padding: 30px 15px;
        gap: 20px;
    }
    
    .portal-sections {
        grid-template-columns: 1fr;
        margin-top: 0.5rem;
        gap: 15px;
    }
    
    .portal-section {
        padding: 20px;
        min-height: auto;
    }
    
    .hero-content-with-map {
        padding-top: 40px;
    }
}

@media (max-width: 768px) {
    .simple-hero {
        padding-bottom: 60px; /* Adequate bottom padding */
        min-height: fit-content; /* Expand to fit all content */
        height: auto; /* Override any fixed height */
        overflow: visible; /* Don't clip content on mobile */
    }
    
    .simple-hero-title {
        font-size: 3rem;
    }
    
    .simple-hero-subtitle {
        font-size: 1.1rem;
        padding: 15px; /* More padding for readability */
    }
    
    .simple-hero-container {
        padding: 25px 15px 50px 15px; /* More bottom padding for content */
        gap: 15px;
        justify-content: flex-start; /* Start near the top on mobile instead of hard centering */
        height: auto; /* Let content define height */
        min-height: fit-content; /* Ensure container expands */
    }
    
    .portal-section {
        padding: 15px;
    }
    
    .portal-sections {
        gap: 10px;
        margin-top: 0;
    }
    
    .portal-section h2 {
        font-size: 1.6rem;
    }
    
    .portal-section .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .hero-content-with-map {
        padding-top: 30px;
    }

    .subtitle-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .simple-hero {
        overflow: visible; /* Ensure content is never clipped */
        padding-bottom: 50px; /* More bottom padding */
        min-height: fit-content;
    }
    
    .simple-hero-title {
        font-size: clamp(1.6rem, 6vw, 2.3rem);
        margin-bottom: 0.75rem;
    }
    
    .simple-hero-subtitle {
        font-size: clamp(0.85rem, 3.5vw, 1rem);
        margin-bottom: 1rem;
        padding: 12px; /* Ensure text has room */
    }
    
    .simple-hero-container {
        padding: 20px 12px 40px 12px; /* More bottom padding */
        gap: 12px;
        justify-content: flex-start; /* Keep content comfortably within small screens */
        height: auto;
        min-height: fit-content;
    }
    
    .portal-section {
        padding: 10px;
    }
    
    .portal-sections {
        gap: 6px;
        margin-top: 0;
    }
    
    .portal-section h2 {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }
    
    .portal-section .btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Extra small screens (320px and below) */
@media (max-width: 380px) {
    .simple-hero-title {
        font-size: 1.5rem;
    }
    
    .simple-hero-subtitle {
        font-size: 0.8rem;
    }
    
    .portal-section h2 {
        font-size: 1rem;
    }
    
    .portal-section .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}


.hero-content {
    flex: 1 1 auto;
    text-align: center; /* Center-align all content */
    max-width: 900px; /* Increased width for both portal cards */
    min-width: 0; /* Allow flex item to shrink so map doesn't collapse */
    padding: 20px 0; /* Add vertical padding */
    margin: 0 auto; /* Center the content horizontally */
    align-self: center; /* Center vertically in container */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center all child elements */
}



/* Responsive adjustments for hero with map */
@media (max-width: 1200px) {
    .hero-content-with-map {
        gap: 2rem;
    }
    /* Keep the mini map visible on laptops/tablets */
    .hero-visual {
        display: flex;
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .hero-content-with-map {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero-content-with-map {
        padding: 0 1rem;
        gap: 1.5rem;
    }
}
