* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    background-color: #193550; /* Deep blue background */
    background-image: url('../src/background-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #EBE7E4; /* Light text color */
    position: relative;
}

/* Add black overlay to body background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: -1;
    pointer-events: none;
}

#scroll {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

#sections {
    position: relative;
    z-index: 1;
    width: 50%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}


#inspiration {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative;
}

/* When map is active, sections stay on left side */
body.map-active #sections {
    margin-left: 0;
    margin-right: auto;
}

/* When map is not active, sections are centered */
body:not(.map-active) #sections {
    margin-left: auto;
    margin-right: auto;
}

#map {
    position: fixed;
    top: 0;
    right: 0vw;
    width: 65vw;
    height: 100vh;
    z-index: 0;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

/* Show map only for iframe section */
body.map-active #map {
    opacity: 1;
    pointer-events: none; /* Default: no interaction */
}

/* Allow interaction ONLY on location_4 */
body.map-active.allow-interaction #map {
    pointer-events: auto;
}

/* Hide map when hero section is active */
body.hero-active #map {
    opacity: 0;
    pointer-events: none;
}

/* actual positioning is handled by #map */
#map-container {
    position: relative;
}

#map-container #map {
    width: 100%;
    height: 100%;
}

section.step {
    min-height: 100vh;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

section.step:not(.hero-section) {
    padding: 50vh 0;
    position: relative;
}

/* Ensure content is above the background */
section.step:not(.hero-section) .content {
    position: relative;
    z-index: 1;
}

section.step.active {
    opacity: 1;
}

/* Hero Section - Full Page Background */
section.hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    opacity: 1;
    background-image: url('../src/The Starry Night 1889.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: none;
    outline: none;
}

/* Black overlay on top of background image */
section.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Black with 0.3 opacity */
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

.hero-title {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: white;
}

.hero-caption {
    font-size: 1.5rem;
    color: white;
    font-style: italic;
}

section.step .content {
    background: rgba(25, 53, 80, 0.85); /* Deep blue with transparency */
    padding: 2rem;
    border-radius: 8px;
    max-width: 100%;
    color: #EBE7E4; /* Light text color */
    position: relative;
    z-index: 1;
}

section.step .content.full-width {
    width: 100%;
    max-width: 1560px; 
    margin: 0 auto;
}

/* Interactive Map sections - content container */
#sea .content,
#land .content,
#lake .content,
#city .content,
#location_1 .content,
#location_2 .content,
#location_3 .content,
#location_4 .content {
    max-width: 1800px;
    width: 70%;
    margin-left: 5%;
    margin-right: auto;
    padding: 3rem;
    font-size: 1.2rem;
}

/* When map is not active, make it even wider */
body:not(.map-active) #sea .content,
body:not(.map-active) #land .content,
body:not(.map-active) #lake .content,
body:not(.map-active) #city .content,
body:not(.map-active) #location_1 .content,
body:not(.map-active) #location_2 .content,
body:not(.map-active) #location_3 .content,
body:not(.map-active) #location_4 .content {
    max-width: 2000px;
    width: 95%;
    margin-left: 5%;
    margin-right: auto;
}

/* Larger headings for map sections */
#sea .content h2,
#land .content h2,
#lake .content h2,
#city .content h2,
#location_1 .content h2,
#location_2 .content h2,
#location_3 .content h2,
#location_4 .content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Ensure inspiration section content can expand to wider width */
#inspiration .content.full-width {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 2rem;
}

/* When map is not active, allow wider content */
body:not(.map-active) #inspiration .content.full-width {
    max-width: 1000px;
    width: 90%;
}

/* h1 is only used in hero section with .hero-title class, no generic h1 styles needed */

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #EBE7E4;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #EBE7E4;
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #EBE7E4;
    margin-bottom: 1rem;
}

.inspiration-board {
    margin-top: 2rem;
}

.inspiration-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.inspiration-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.inspiration-text p:last-child {
    margin-bottom: 0;
}

.polaroid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background: transparent;
    border-radius: 8px;
}

.polaroid {
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: rotate(calc(var(--rotation, 0) * 1deg));
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    z-index: 10;
}

/* Image wrapper for both vertical and horizontal */
.polaroid-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.polaroid-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Vertical Polaroid - for first image */
.polaroid-vertical {
    width: 280px;
    height: 350px;
}

/* Horizontal Polaroid - for second and third images */
.polaroid-horizontal {
    width: 350px;
    height: 280px;
}

/* Hover Overlay */
.polaroid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.polaroid:hover .polaroid-overlay {
    opacity: 1;
    pointer-events: auto;
}

.masterpiece-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
    color: white;
}

.masterpiece-year {
    font-size: 1rem;
    text-align: center;
    color: white;
    font-style: italic;
}

/* Color Palette Styles */
.color-palette-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    border-radius: 8px;
}

.color-swatches {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.swatch {
    width: 120px;
    height: 120px;
    border: 2px solid #000;
    border-radius: 4px;
}

.color-code {
    width: 120px;
    padding: 0.5rem;
    border: 1px solid #EBE7E4;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: rgba(25, 53, 80, 0.9);
    color: #EBE7E4;
}

.color-description {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.color-description strong {
    font-weight: bold;
    color: #EBE7E4;
}

/* Responsive design */
@media (max-width: 768px) {
    #sections {
        width: 100%;
        padding: 40vh 0;
    }
    
    #map {
        display: none;
    }
    
    section.step .content {
        margin: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-caption {
        font-size: 1.2rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .color-swatches {
        flex-direction: column;
        align-items: center;
    }
    
    .swatch {
        width: 100px;
        height: 100px;
    }
    
    .color-code {
        width: 100px;
    }
    
    .polaroid-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
