/* Hero Section Styles - Optimized positioning */

:root {
    --section-spacing: 6rem;
    --content-spacing: 2rem;
    --hero-height: calc(100vh - 80px);
    --header-height: 80px;
    --hero-top-position: var(--header-height);
    --portal-card-bg: rgba(0, 0, 0, 0.7);
    --portal-card-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Extra clearance for laptop widths where overlap was seen (covers 1280–1366–1440 range) */
@media (min-width: 1060px) and (max-width: 1440px) {
    .simple-hero {
        padding-bottom: 460px;
    }
    .hero-content-with-map {
        padding-top: 60px;
        gap: 24px;
    }
    .simple-hero-title {
        font-size: 3.8rem;
    }
    .simple-hero-subtitle {
        font-size: 1.35rem;
    }
    .portal-sections {
        margin-bottom: 1.5rem;
    }
    .portal-section {
        padding: 1.5rem;
        min-height: 260px;
    }
    .portal-section h2 {
        font-size: 2.1rem;
    }
    .portal-section .btn {
        padding: 14px 18px;
        font-size: 1rem;
    }
}

.top-banner { margin-top: 60px; width: 100%; display: flex; align-items: center; justify-content: center; padding: 8px 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; }
.top-banner + .simple-hero { margin-top: 0; }
@media (max-width: 768px) { .top-banner { margin-top: 64px; } }
@media (max-width: 480px) { .top-banner { margin-top: 56px; } }

/* Simple Hero Section Container - Positioned correctly below navigation */
.simple-hero {
    position: relative;
    left: 0;
    width: 100%;
    height: auto; /* Allow content to define height */
    min-height: calc(100vh - var(--header-height)); /* At least viewport height minus header */
    margin: 0;
    padding: 0 0 clamp(240px, 18vh, 360px) 0; /* More bottom breathing room so portals stay clear of next section */
    overflow: visible; /* Prevent content from being cut off on medium widths */
    /* Background color as fallback */
    background: #1a2f35;
    z-index: 10; /* Ensure hero sits above following sections so buttons stay clickable */
    display: block;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top of section */
    align-items: center;
    isolation: isolate;
    margin-top: 87px; /* Space below fixed header */
    /* Ensure hero is visible and properly positioned */
    visibility: visible;
}

/* Video loading state */
#hero-video:not([data-loaded]) {
    opacity: 0;
}

#hero-video[data-loaded] {
    opacity: 1;
}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: none;
    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: 20px 30px 0 30px; /* Minimal top padding */
    text-align: center;
    position: relative;
    z-index: 20; /* Well above video layer */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top */
    align-items: center; /* Center content horizontally */
    height: auto; /* Let content define container height */
    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: flex-start;
    justify-content: space-between;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding-top: 120px; /* Reduced to fit better at medium widths */
    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 */
}

.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);
}

/* Portal sections container - Side by Side Layout */
.portal-sections {
    display: flex;
    flex-direction: row;
    gap: 30px;
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 850px; /* Fit within hero-content width */
    margin: 2rem auto 0;
    padding: 0;
    justify-content: center;
    align-items: stretch;
}

/* Individual portal section - Equal Width */
.portal-section {
    background: var(--portal-card-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--portal-card-shadow);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
    align-items: center;
    flex: 1; /* Take equal width in flex container */
    max-width: 400px; /* Optimized width for centered layout */
}

.portal-section:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 183, 77, 0.3);
    border-color: rgba(255, 183, 77, 0.6);
}

.portal-section h2 {
    font-family: var(--font-title, 'Cinzel', serif);
    font-size: 2.4rem;
    margin-bottom: 0;
    color: #ff9a44;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    letter-spacing: 1px;
}

/* Portal section content */
.portal-section p {
    color: #e0e0e0;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1rem 0;
    position: relative;
    z-index: 2;
}

/* Portal section buttons */
.portal-section .btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 16px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: var(--font-button, 'Montserrat', sans-serif);
    font-size: 1.1rem;
    margin-top: auto;
    position: relative;
    z-index: 3;
    border: 2px solid #ff7b00;
    background: linear-gradient(135deg, #ff7b00, #ff9a44);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(255, 123, 0, 0.4), 0 0 30px rgba(255, 123, 0, 0.2);
}

/* Portal section content styling */
.portal-section img {
    opacity: 0.9;
    filter: drop-shadow(0 0 10px rgba(255, 183, 77, 0.3));
}

/* Button hover effects */
.portal-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 123, 0, 0.6);
    background: linear-gradient(135deg, #ff9a44, #ff7b00);
}

/* Add glow effect to portal sections */
/* Removed potentially interfering overlay */

@keyframes glow {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
}

/* Hero visual area */
.hero-visual {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    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: 300px; /* Extra clearance on mid-large 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;
    }
    
    .portal-section {
        padding: 20px;
    }
    
    .portal-sections {
        margin-top: 1rem;
    }
    
    .hero-content-with-map {
        padding-top: 100px;
    }
}

@media (max-width: 992px) {
    .simple-hero {
        padding-bottom: 160px; /* Further reduce bottom padding on mobile */
    }
    
    .simple-hero-title {
        font-size: 3.5rem;
    }
    
    .simple-hero-container {
        padding: 30px 15px;
        gap: 20px;
    }
    
    .hero-content-with-map {
        padding-top: 60px;
    }
    
    .portal-sections {
        flex-direction: column;
        margin-top: 0.5rem;
        gap: 15px;
    }
    
    .portal-section {
        padding: 20px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .simple-hero {
        padding-bottom: 140px; /* Minimal bottom padding on small screens */
    }
    
    .simple-hero-title {
        font-size: 3rem;
    }
    
    .simple-hero-subtitle {
        font-size: 1.2rem;
    }
    
    .simple-hero-container {
        padding: 20px 10px;
        gap: 15px;
    }
    
    .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;
    }
}

@media (max-width: 576px) {
    .simple-hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .simple-hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .simple-hero-container {
        padding: 15px 5px;
        gap: 10px;
    }
    
    .portal-section {
        padding: 12px;
    }
    
    .portal-sections {
        gap: 8px;
        margin-top: 0;
    }
    
    .portal-section h2 {
        font-size: 1.4rem;
    }
    
    .portal-section .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}


.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: 0; /* Remove any padding */
    margin: 0 auto; /* Center the content horizontally */
    align-self: flex-start; /* Align to top of 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;
    }
}
