body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #1a1a1a; /* Dark background */
    color: #e0e0e0; /* Light text */
    /* Removed overflow: hidden to allow scrolling on mobile */
}

.scroll-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory; /* Snap scrolling vertically */
    scroll-behavior: smooth; /* Smooth scroll for JS-triggered scrolls */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.full-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Reverted from stretch to center */
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    scroll-snap-align: start; /* Each section snaps to the start of the viewport */
    position: relative;
    background-color: #1a1a1a; /* Default opaque background for all sections */
    /* Allow vertical scroll if content overflows */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* General content styling for sections */
.content {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 40px 60px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    text-align: left;
    padding-left: 60px !important;
    padding-right: 60px !important;
}

.content h2 {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

.content p,
.content ul,
.content ol {
    text-align: left;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Custom scrollbar styling for Webkit browsers (Chrome, Safari, Edge) */
.content::-webkit-scrollbar {
    width: 8px; /* Width of the scrollbar */
}

.content::-webkit-scrollbar-track {
    background: #2c2c2c; /* Color of the scrollbar track */
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb {
    background-color: #555; /* Color of the scrollbar thumb */
    border-radius: 4px;
    border: 2px solid #2c2c2c; /* Creates a padding effect around the thumb */
}

/* Section 1: Hero */
#section1 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('stanocid.png');
    background-size: cover;
    background-position: center;
    color: white;
    position: relative; /* Added for positioning context for scroll-down */
    justify-content: flex-start; /* Override center justification */
    padding-top: 60px; /* Add top padding to position content higher */
}

#section1 h1 {
    font-size: clamp(3rem, 10vw, 6rem); /* Responsive font size */
    margin-top: 0; /* Remove top margin */
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.8);
}

#section1 p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    margin-bottom: 40px;
    color: #f0f0f0;
    line-height: 1.7;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    /* Removed position: absolute, top, left, transform to allow natural flow and scroll-down positioning */
}

#section1::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white; /* Flash color */
    opacity: 0; /* Initially transparent */
    z-index: 1; /* Positioned above the section's background but below .hero-content */
    pointer-events: none; /* So it doesn't interfere with mouse events */
    animation: lightning-flash-effect 15s infinite; /* Animation applied */
}

@keyframes lightning-flash-effect {
    0% { opacity: 0; }
    1% { opacity: 0.4; }   /* Bright flash */
    2% { opacity: 0; }     /* Quickly off */
    2.5% { opacity: 0.25; } /* Softer, shorter flash */
    3.5% { opacity: 0; }   /* Off again */
    100% { opacity: 0; }   /* Remain off for the rest of the cycle */
}

.scroll-down {
    position: absolute; /* Positioned relative to #section1 */
    bottom: 30px; /* Distance from the bottom */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    cursor: pointer;
    animation: bounce 2s infinite;
}

.scroll-down p {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.scroll-down span {
    font-size: 2.2rem;
    display: block;
    animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-12px);
    }
    60% {
        transform: translateY(-6px);
    }
}

/* Section 2: Content */
#section2 .content {
    max-width: 800px;
}

#section2 h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 40px;
    color: #f5f5f5;
}

.text-anim-container {
    position: relative;
    min-height: 150px; /* Adjust based on typical paragraph length */
    overflow: hidden; /* Important for the slide effect */
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-block {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    line-height: 1.7;
    max-width: 650px;
    position: absolute; /* For smooth transition */
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(40px); /* Start from bottom */
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.text-block.active {
    opacity: 1;
    transform: translateY(0); /* Slide to original position */
}

.text-block.exit {
    opacity: 0;
    transform: translateY(-40px); /* Slide up */
}

/* General content styling for sections 3, 4, 6, 7, 8 */
#section3 .content,
#section4 .content,
#section6 .content,
#section7 .content,
#section8 .content,
#section9 .content,
#section10 .content,
#section-data-impact .content {
    max-width: 800px; /* Explicitly ensure they use the desired max-width */
    margin-left: auto; /* Center the block */
    margin-right: auto; /* Center the block */
    text-align: left; /* Ensure text inside is left-aligned */
    /* Padding is handled by global .content and !important overrides if needed */
}

/* Add background image to section3 */
#section3 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('gup.png'); /* Adjusted overlay to be less opaque */
    background-size: cover;
    background-position: center;
    position: relative; /* Needed for z-indexing if content needs to be above a pseudo-element overlay */
}

#section3 .content {
    position: relative;
    z-index: 1;
    padding: 20px;
    border-radius: 8px;
    opacity: 1;
    text-align: left;
}

#section3 h2,
#section4 h2,
#section5 h2,
#section6 h2,
#section7 h2,
#section8 h2 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 20px;
    color: #f5f5f5;
}

#section3 p,
#section4 p,
#section6 p,
#section7 p,
#section8 p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    line-height: 1.7;
    max-width: 650px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 15px; /* Add some space between paragraphs in section 8 */
}

#section7 p,
#section8 p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    line-height: 1.7;
    max-width: 650px;
    margin-left: auto; /* Ensure block itself is centered if not already by flex */
    margin-right: auto; /* Ensure block itself is centered if not already by flex */
    margin-bottom: 15px;
}

/* Section 6: Koliko se moze izgraditi - Specific Layout Adjustments */
#section6 .content {
    text-align: left;
    /* max-width: 800px; is inherited */
    display: flex; /* Use flexbox for vertical distribution */
    flex-direction: column; /* Stack children vertically */
    justify-content: flex-start; /* Align content to the top, then distribute space */
    align-items: flex-start; /* Align children to the left instead of center */
    height: calc(100% - 40px); /* Adjust height considering parent padding, if needed, or simply 100% if padding is on content */
    /* Ensure .content itself doesn't overflow .full-page due to its own padding if any */
}

#section6 h2 {
    /* font-size and margin-bottom are inherited */
    flex-shrink: 0; /* Prevent title from shrinking */
    margin-top: 0; /* Remove default top margin if any to stick to top of flex container */
}

#section6 p {
    text-align: left;
    /* font-size, line-height, max-width, margin-bottom are inherited */
    flex-shrink: 0; /* Prevent paragraph from shrinking */
}

#section6 .table-image {
    /* max-width: 80%; border, border-radius are inherited from general .table-image */
    margin-top: 20px; /* Keep some space above the image */
    flex-grow: 1; /* Allow image to take up available vertical space */
    flex-shrink: 1; /* Allow image to shrink if space is very limited */
    min-height: 0;  /* Crucial for allowing an image to shrink properly in flexbox */
    object-fit: contain; /* Scale image down to fit, maintaining aspect ratio */
    width: auto; /* Adjust width automatically to maintain aspect ratio with object-fit:contain */
    max-height: 100%; /* Ensure it doesn't overflow the space given by flex-grow */
    display: block;
    margin-left: 0; /* Align to left instead of center */
    margin-right: auto;
}

/* Section 5: Fullscreen Background Image */
#section5.image-section {
    background-image: url('klara.png');
    background-size: cover;
    background-position: center;
    background-color: #111; /* Fallback if image doesn't load, or for contrast */
    padding: 0; /* Remove padding to allow image to fill */
}

#section5 .content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center H2 vertically */
    align-items: center;     /* Center H2 horizontally */
    /* Text inside .content is already left-aligned by global .content rule, but h2 is centered by its own rule */
}

#section5 h2 {
    /* position: absolute; top: 40px; left: 50%; transform: translateX(-50%); */ /* Removing absolute positioning */
    /* The h2 will now be centered by the flex properties of .content */
    z-index: 10;
    color: #fff;
    background-color: rgba(0,0,0,0.65); /* Slightly increased opacity for better readability */
    padding: 15px 25px; /* Adjusted padding */
    border-radius: 8px; /* Slightly larger radius */
    font-size: clamp(2.5rem, 7vw, 4rem); /* Ensure it's prominent */
}

/* Removed .fullscreen-image rule as it's no longer used */
/*
.fullscreen-image {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.fullscreen-image.visible {
    opacity: 1;
}
*/

/* Section 6: Table Image */
.table-image {
    max-width: 100%;
    height: auto;
    margin-top: 20px;
    border: 2px solid #444;
    border-radius: 5px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Section 7: Fit Space Image */
.fit-space-image {
    display: none; /* Or adjust its properties if it's still used elsewhere */
}

.image-comparison-container {
    display: flex;
    justify-content: space-around; /* Distributes space around items */
    align-items: center; /* Aligns items vertically */
    width: 100%; /* Takes full width of its container */
    margin-top: 20px; /* Adds some space above the container */
}

.comparison-image {
    max-width: 45%; /* Adjust as needed, allows for some space between images */
    max-height: 50vh; /* Adjust as needed, ensures images fit vertically */
    width: auto; /* Maintains aspect ratio */
    height: auto; /* Maintains aspect ratio */
    object-fit: contain; /* Scales the image down to fit within its bounds */
}

/* Adjust section7 content specifically if needed */
#section7 .content {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically */
    align-items: center; /* Centers content horizontally */
    text-align: left;
}

#section7 .content h2,
#section7 .content p {
    margin-bottom: 1rem; /* Adds some space below the text elements */
}

/* Section 9: Mapa stratišta */
#section9 .content {
    width: 100%; /* Allow content to span wider for the map */
    max-width: 90%; /* Adjust as needed */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center content vertically */
    height: 100%; /* Ensure content div takes full height of section for map positioning */
}

#section9 h2 {
    /* Styles for h2 are already covered by a general rule,
       but if specific overrides are needed for section 9 title, they can go here.
       e.g., margin-bottom: 15px; to give a bit more space to the map. */
    margin-bottom: 15px; 
}

#map {
    height: 75vh; /* Adjust height as desired, e.g., 70% or 75% of viewport height */
    width: 100%;  /* Take full width of its container (.content's max-width) */
    max-width: 1200px; /* Optional: cap max width of map, adjust as needed */
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #2c2c2c; /* Darker placeholder background before map tiles load */
    box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Optional: add some shadow for depth */
}

/* Leaflet popup customization (optional) */
.leaflet-popup-content-wrapper {
    background: #2a2a2a;
    color: #e0e0e0;
    border-radius: 5px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

.leaflet-popup-content {
    font-size: 0.9rem;
    line-height: 1.4;
}

.leaflet-popup-tip {
    background: #2a2a2a;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #c0c0c0;
}
.leaflet-container a.leaflet-popup-close-button:hover {
    color: #ffffff;
}

/* Section 10: Postoji drukciji nacin... */
#section10 .content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    max-width: 800px; /* Adjust for readability */
    padding: 20px;
    height: auto;
    max-height: none;
}

#section10 {
    justify-content: flex-start !important; /* Override the center justification */
    padding-top: 40px; /* Add some top padding */
    padding-bottom: 40px; /* Ensure bottom padding */
}

#section10 h2 {
    margin-bottom: 25px;
    font-size: 2.8em; /* Slightly larger for emphasis */
}

#section10 .text-content p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    line-height: 1.7;
    margin-bottom: 15px;
    color: #c0c0c0; /* Lighter text for readability on dark background */
}

#section10 .text-content p:last-child {
    margin-bottom: 0;
}

#section10 .text-content a {
    color: #FF851B; /* Use a prominent color for the link */
    text-decoration: none;
    font-weight: bold;
}

#section10 .text-content a:hover {
    text-decoration: underline;
    color: #FF4136;
}

/* Styling for ALL links in section10 content */
#section10 .content a {
    color: #FF851B; /* Orange color for all links */
    text-decoration: none;
    font-weight: bold;
}

#section10 .content a:hover {
    text-decoration: underline;
    color: #FF4136; /* Darker orange on hover */
}

/* Section: Razmjeri katastrofe */
#section-data-impact {
    position: relative; /* For positioning the ::before pseudo-element */
    /* background-color: #1a1a1a; is inherited from .full-page */
}

#section-data-impact .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left;
    max-width: 800px;
    width: 90%;
    padding: 20px;
    /* Remove height and max-height so content can grow naturally */
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

#section-data-impact h2 {
    margin-bottom: 20px; /* Reduced margin for mobile */
    font-size: clamp(2rem, 7vw, 2.8em); /* Responsive font size */
    text-align: center; /* Center the title */
    width: 100%; /* Ensure title takes full width to center properly */
}

#section-data-impact .text-content {
    max-width: 100%; /* Text content can use the full width of .content */
    overflow-y: visible; /* Text itself should not scroll, parent .content does */
    width: 100%; /* Ensure it uses the width of .content */
}

#section-data-impact .stats-container {
    width: 100%;
    margin-top: 15px;
}

#section-data-impact .stat-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

#section-data-impact .stat-item strong {
    color: #FFB52E; /* A highlight color for the number */
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
}

/* Styling for the methodology notes list */
#section-data-impact .methodology-notes {
    margin-top: 15px; /* Add some space above the list */
    width: 100%; /* Ensure it takes the full width of its container */
    text-align: left; /* Align text to the left */
}

#section-data-impact .methodology-notes p {
    margin-bottom: 8px; /* Space between "Metodološke napomene:" and the list */
    font-weight: bold; /* Make the introductory text bold */
    color: #e0e0e0; /* Match general text color */
}

#section-data-impact .methodology-notes ul {
    list-style-type: disc; /* Standard disc bullets */
    padding-left: 20px; /* Indent the list a bit */
    margin: 0; /* Reset default ul margins */
}

#section-data-impact .methodology-notes li {
    margin-bottom: 5px; /* Space between list items */
    font-size: 0.9em; /* Slightly smaller font for notes */
    color: #c0c0c0; /* Lighter text for notes */
}

/* Remove pseudo-elements if they were causing issues, or style them appropriately */
#section-data-impact .text-content::before,
#section-data-impact .content::after {
    display: none; 
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    #section-data-impact .content {
        padding: 15px; /* Reduce padding on smaller screens */
        width: 95%; /* Allow a bit more width */
    }

    #section-data-impact h2 {
        margin-bottom: 15px;
    }

    #section-data-impact .stat-item {
        padding: 8px 12px;
        margin-bottom: 8px;
    }

    .content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Section 1 mobile padding and consistency */
    #section1 {
        padding-top: 120px; /* Double the desktop padding (60px * 2) */
    }
    
    #section1 .hero-content {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    #section1 p {
        margin-left: 0; /* Remove auto margins on mobile for consistency */
        margin-right: 0;
        max-width: 100%; /* Use full available width */
    }

    /* Adjust massacre map layout for mobile - KEEP IT TWO COLUMN */
    #section-massacre-viz .massacre-main-area {
        flex-direction: row !important; /* Force row layout */
    }
    #section-massacre-viz .massacre-map-container,
    #section-massacre-viz .massacre-info-panel {
        flex: 1 1 50% !important; /* Ensure they share space */
        width: auto !important;    /* Override any 100% width from previous mobile rules */
        max-height: none !important; /* Remove height restrictions that were for stacked layout */
        /* Adjust min-height for mobile if needed, but desktop one might be fine */
         min-height: 350px !important; /* Or a suitable mobile height */
    }
    #section-massacre-viz .massacre-map-container {
        /* height: auto !important; */ /* remove fixed vh height */
        margin-bottom: 0 !important; /* Remove margin from stacked layout */
    }

    /* Section 2: Make all content scroll together */
    #section2 .content {
        /* Ensure it can scroll all its children */
        /* overflow-y: auto; is already inherited from global .content */
        /* Consider if any flex properties on .content itself are needed/interfering */
    }

    #section2 h2 {
        /* Ensure it's part of the normal flow */
        position: static; /* Or relative, just not fixed/absolute */
    }

    #section2 .text-anim-container {
        overflow-y: visible !important; /* Let parent .content handle scrolling */
        min-height: unset !important;
        max-height: unset !important; /* No independent max-height */
        position: relative; /* Fine, as text-block is relative to it */
    }

    #section2 .text-block {
        position: relative !important; /* Ensure it's in flow */
        transform: none !important;
        opacity: 1 !important;
        height: auto !important; /* Let content determine height */
        width: 100%; /* Take available width */
    }

    #section2 .content-image {
        /* Ensure it's part of the normal flow */
        position: static; /* Or relative */
    }

    /* Section 1 Hero text for very small screens */
    #section1 h1 {
        font-size: clamp(2rem, 7vw, 3rem);
    }
    #section1 p {
        font-size: clamp(0.8rem, 1.8vw, 1rem);
    }
}

/* Section: Razmjeri katastrofe - Two Column Layout */
#section-data-impact .content h2 {
    text-align: center; /* Center the heading */
    margin-bottom: 2rem; /* Space below the heading */
}

.two-column-container {
    display: flex;
    justify-content: center; /* Center the columns container */
    align-items: flex-start; /* Align items to the top */
    width: 80%; /* Overall width of the two columns, adjust as needed */
    max-width: 1200px; /* Max width to prevent it from becoming too wide on large screens */
    margin: 0 auto; /* Center the container itself */
}

.column-left {
    flex: 1; /* Takes up half the space of .two-column-container */
    padding-right: 20px; /* Space between text and image columns */
    display: flex;
    justify-content: flex-end; /* Aligns text block to the right of its column */
}

.column-right {
    flex: 1; /* Takes up half the space of .two-column-container */
    padding-left: 20px; /* Space between text and image columns */
    display: flex;
    justify-content: flex-start; /* Aligns image to the left of its column */
}

.column-image {
    max-width: 100%;
    max-height: 70vh; /* Adjust based on typical text height */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px; /* Optional: if you want rounded corners for the image */
}

/* Ensure the main content div of the section is still centered if it wasn't already */
#section-data-impact .content {
    display: flex;
    flex-direction: column;
    align-items: center; /* This will center the .two-column-container if its width is less than .content */
    justify-content: center;
}

/* Urban Rules Table Styling */
#urban-rules-table-container {
    width: 100%;
    max-width: 95%; /* Adjust as needed, can be wider than other text content */
    margin-top: 20px;
    overflow-x: auto; /* Allows horizontal scrolling for wider tables */
}

.urban-rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em; /* Adjust for readability */
    color: #ccc; /* Lighter text for table content */
    background-color: #2c2c2c; /* Dark background for the table */
    border-radius: 5px;
    overflow: hidden; /* Ensures border-radius clips content */
}

.urban-rules-table th,
.urban-rules-table td {
    border: 1px solid #444; /* Slightly lighter border for cells */
    padding: 8px 10px;
    text-align: left;
    white-space: nowrap; /* Prevent text wrapping in cells, especially headers */
}

.urban-rules-table thead th {
    background-color: #3a3a3a; /* Darker background for header */
    color: #f0f0f0; /* Bright text for header */
    position: sticky; /* Make header sticky if container scrolls */
    top: 0; /* Necessary for sticky header */
    z-index: 2; /* Ensure header is above table body during scroll */
}

.urban-rules-table tbody tr:nth-child(even) {
    background-color: #333; /* Zebra striping for rows */
}

.urban-rules-table tbody tr:hover {
    background-color: #4a4a4a; /* Highlight row on hover */
}

.urban-rules-table td:first-child {
    font-weight: bold;
    color: #ddd;
    white-space: normal; /* Allow parameter names to wrap if long */
}

/* Special styling for Max stamb. jedinica row */
.urban-rules-table .max-jedinica-number {
    color: red !important;
    font-weight: bold;
    background-color: white !important;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.urban-rules-table .max-jedinica-infinity {
    color: darkblue !important;
    font-weight: bold;
    font-size: 1.2em;
    background-color: lightblue !important;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

/* Massacre Visualization Section */
#section-massacre-viz {
    position: relative; /* For positioning the overlay */
}

.blurred-initial .massacre-content {
    filter: blur(10px);
    pointer-events: none; /* Prevent interaction with blurred content */
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100; /* Above the blurred content */
    color: white;
    text-align: center;
}

.blur-overlay p {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.blur-overlay button {
    padding: 10px 20px;
    font-size: 1em;
    margin: 5px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
}

#massacre-back-btn {
    background-color: #555;
    color: white;
}

#massacre-proceed-btn {
    background-color: #c00;
    color: white;
}

#section-massacre-viz .content { /* This is also .massacre-content */
    max-width: none !important;
    width: 95% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 15px !important; /* Further reduced padding for more space */
    display: flex; /* Use flex to manage children heights */
    flex-direction: column;
    height: calc(100vh - 40px - 30px); /* Full viewport height minus section padding and some breathing room */
    box-sizing: border-box;
}

#section-massacre-viz .massacre-intro-text {
    text-align: center; /* Center this specific introductory text */
    padding: 10px 0; /* Restore or adjust padding as needed */
    width: 100%; /* Ensure it can center properly within its container */
}

.massacre-main-area { /* Applies within #section-massacre-viz */
    display: flex;
    flex-grow: 1; /* Key: This will make it take up remaining space in .content */
    width: 100%;
    align-items: stretch; /* Make columns equal height */
    overflow: hidden; /* Prevent content from spilling out of fixed height */
}

#section-massacre-viz .massacre-map-container,
#section-massacre-viz .massacre-info-panel {
    flex: 1 1 50%;
    padding: 10px;
    box-sizing: border-box;
    height: 100%; /* Fill the height of .massacre-main-area */
    overflow: hidden; /* Hide overflow for map-container, info-panel scrolls its own content */
}

#section-massacre-viz #massacre-map {
    width: 100%;
    height: 100%;
    border: 1px solid #444; /* Add border back if desired */
}

#section-massacre-viz .massacre-info-panel {
    background-color: rgba(255, 255, 255, 0.05);
    overflow-y: auto; /* This enables scrolling for the content INSIDE the info panel */
    height: 100%; /* Ensure it also fills the height */
}

#eliminated-skulls {
    font-size: 1.2em; /* Make skulls a bit larger */
    color: red;
    word-break: break-all; /* Ensure skulls wrap if too many */
}

.parcel-clicked {
    fill: black !important;
    fill-opacity: 0.7 !important;
}

/* Section Navigator Styles */
#section-navigator {
    position: fixed;
    left: 20px; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000; /* Ensure it's above other content */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center circles if they have different widths (e.g., due to borders) */
}

#section-navigator a {
    display: block;
    width: 12px; /* Size of the circle */
    height: 12px; /* Size of the circle */
    background-color: rgba(255, 255, 255, 0.5); /* Default circle color */
    border-radius: 50%; /* Makes it a circle */
    margin: 8px 0; /* Space between circles */
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

#section-navigator a.active {
    background-color: rgba(255, 255, 255, 1); /* Active circle color */
    transform: scale(1.3); /* Emphasize active circle */
}

#section-navigator a:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Media Queries for Responsive Adjustments */
@media (max-width: 480px) {
    #section-data-impact h2 {
        font-size: 1.6em; /* Further reduce for very small screens */
    }
    #section-data-impact .column-image {
        max-height: 25vh;
    }
    #section-data-impact .text-content p {
        font-size: 0.85em;
    }

    /* Urban rules table font size for very small screens */
    .urban-rules-table {
        font-size: 0.7em;
    }
    .urban-rules-table th,
    .urban-rules-table td {
        padding: 6px 8px;
    }

    /* Section 1 Hero text for very small screens */
    #section1 h1 {
        font-size: clamp(2rem, 7vw, 3rem);
    }
    #section1 p {
        font-size: clamp(1rem, 2.2vw, 1.2rem); /* Match other sections' font size */
    }
}

h2 {
    text-align: center;
}

p.quote-source {
    font-size: 0.8em;
    text-align: center;
    margin-top: 5px;
}

.quote-source a {
    color: #ccc;
}

#section-data-impact .content p,
#section10 .content p {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    line-height: 1.7;
    margin-bottom: 15px;
}

#section10 .related-links {
    margin-bottom: 80px;
    text-align: left;
    font-size: clamp(1rem, 2.2vw, 1.2rem); /* Match section10 paragraph font size */
    /* Remove align-items to avoid flex centering */
}
#section10 .related-links ul {
    padding-left: 20px;
    margin: 0;
    width: 100%;
    display: block;
}
#section10 .related-links li {
    margin-bottom: 6px;
    list-style-type: disc;
}
#section10 .related-links a {
    color: #FF851B;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(1rem, 2.2vw, 1.2rem); /* Explicitly set font size to match other links */
}
#section10 .related-links a:hover {
    text-decoration: underline;
    color: #FF4136;
}

/* Mobile adjustments will remain to keep columns side-by-side */
/* The min-height from mobile rules might need to be removed if conflicting with 100% height */
@media (max-width: 768px) {
    #section-massacre-viz .massacre-map-container,
    #section-massacre-viz .massacre-info-panel {
         min-height: unset !important; /* Remove fixed min-height from mobile to allow 100% height */
    }
}

/* Image in Section 2 */
.content-image {
    max-width: 100%; /* Make it take the full width of .content */
    height: auto;
    display: block; /* To allow margin auto to work for centering */
    margin: 20px auto 0 auto; /* Center it and add some top margin */
    border: 2px solid #444; /* Optional: if you want a border like .table-image */
    border-radius: 5px;   /* Optional: if you want a border like .table-image */
}
