/* ========================================== 
   Fullscreen Mapbox Story - Overflow Fix 
   ========================================== */

/* Prevent horizontal overflow and set full viewport width */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    position: relative !important;
    margin: 0;
    padding: 0;
}

body, 
html {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fix the white bar (force map to full width) */
#map
{
    width: 100vw;
    height: 100vh;
    margin: 0;
    left: 0;
    top: 0;
    position: fixed;
    overflow-x: hidden !important;
}


#story-container {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative !important;
    overflow: visible !important;
}


/* CRITICAL FIX FOR OVERFLOW */
#story {
    position: relative !important;
    width: 100vw !important;
    overflow-x: hidden !important;
}

#features {
    width: 100vw !important;
    overflow-x: hidden !important;
    position: relative !important;
}

/* Step styling */
.step {
    width: 100%;
    opacity: 0.25;
    box-sizing: border-box;
	padding-bottom: 50vh;
    transition: opacity 0.3s ease-in-out;
}


.step div {
    box-sizing: border-box !important;
    font-family: inherit;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    padding: 25px !important;
}

/* Now your alignments should work */
.step.righty {
    width: 33vw !important;
    margin-left: 62vw !important;
}

.step.lefty {
    width: 33vw !important;
    margin-left: 5vw !important;
}

.step.centered {
    width: 50vw !important;
    margin-left: 25vw !important;
    margin-right: 25vw !important;
}


/* Ensure text doesn't overflow */
.step p,
.step h1,
.step h2,
.step h3 {
    max-width: 100% !important;
    font-family: inherit;
    word-break: break-word !important;
    hyphens: auto !important;
}

/* Images should be responsive */
.step img {
    width: 80%;
    height: auto;
    max-width: 100%;
    display: block;
}

div#site-header,
#site-header {
    display: none !important;
}

div.footer-credits {
    display: none !important;
}

.step div p {
    font-size: 22px !important;  /* Desktop size */
    line-height: 28px !important;
}

@media (max-width: 750px) {
    /* Smaller, more compact boxes */
    .step.centered,
    .step.lefty,
    .step.righty,
    .step.fully {
        width: 85vw !important;
        margin-left: 7.5vw !important;
        margin-right: 7.5vw !important;
    }
    
    /* Much less padding for mobile */
    .step > div {
        padding: 15px 20px !important;  /* Reduced from 25px 50px */
        max-height: 40vh !important;    /* Limit height */
        overflow-y: auto !important;    /* Scroll if content is too long */
        background-color: rgba(6, 5, 5, 0.9) !important;  /* Slightly transparent */
    }
    
    /* Smaller text for mobile */
    .step div p {
        font-size: 14px !important;  /* Reduced from 24px */
        line-height: 20px !important;
    }
    
    /* Less space between steps */
    .step {
        padding-bottom: 25vh !important;  /* Reduced from 50vh */
    }
    
    /* Adjust cover page for mobile */
    .cover-content h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .cover-subcontent p {
        font-size: 18px;
        margin-bottom: 30px;
    }
    
    /* Hide inset map on mobile to save space */
    #mapInset {
        display: none !important;
    }
    .step > div {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    /* Image takes 30% width */
    .step img {
        width: 30% !important;
        height: auto !important;
        max-height: none !important;
        flex-shrink: 0;
    }
    
    /* Text takes remaining space */
    .step p {
        flex: 1;
    }
    }
}

/* For very small phones like iPhone 12 mini */
@media (max-width: 400px) {
    .step > div {
        padding: 12px 15px !important;
        max-height: 35vh !important;
    }
    
    .step div p {
        font-size: 13px !important;
        line-height: 18px !important;
    }
}

.cover-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
     background: linear-gradient(135deg, 
        rgba(255, 248, 241, 0.97) 0%,
        rgba(255, 237, 222, 0.95) 40%,
        rgba(252, 227, 208, 0.93) 70%,
        rgba(248, 215, 195, 0.90) 100%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    box-sizing: border-box;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.cover-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 244, 230, 0.2) 100%
    );
    animation: subtle-rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes subtle-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.category-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c4622d;  /* Warm coral color */
    margin-bottom: 35px;
    text-align: center;
    position: relative;
    z-index: 1;
}



/* Main title - bold and impactful */
.cover-content h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(42px, 7vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    text-align: center;
    margin: 0 auto 30px;
    max-width: 900px;
    position: relative;
    z-index: 1;
    /* Subtle text shadow for depth */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}


/* Subtitle - smaller, lighter */
.cover-subcontent p {
    font-family: 'Lora', Georgia, serif;
    font-size: clamp(20px, 2.5vw, 24px);
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    color: #5a5a5a;
    text-align: center;
    margin: 0 auto 50px;
    max-width: 650px;
    position: relative;
    z-index: 1;
}

.cover-page::after {
    content: '';
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        #c4622d,
        transparent
    );
    opacity: 0.6;
}


/* Theme styles - Add these! */
.light {
    color: #444;
    background-color: #fafafa;
}

.dark {
    color: #fafafa;
    background-color: #444;
}

/* Also add this for .step.active */
.step.active {
    opacity: 0.9 !important;
}

/* And ensure the inner div of step has the right padding */
.step > div {
    padding: 25px 50px;  /* Change from 25px to 25px 50px for better spacing */
    line-height: 25px;
    font-size: 13px;
}
}