/* --- 1. GLOBAL & BODY --- */
body {
    margin: 0;
    padding-top: 20px !important; /* Force the gap at the very top */
    padding-bottom: 60px; 
    width: 100%;
    overflow-x: hidden; /* Prevents side-scrolling on mobile */
}
img[src="Images/Banner.png"] {
    display: block;
    margin: 0 auto 10px auto; /* Removed the top 20px here */
    max-width: 100%;
    height: auto;
}
html, body {
    background-color: white !important; /* Forces white background */
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Germania One', serif;
    font-size: 20px;
}

h2 {
    font-family: 'Blaka', serif;
    font-size: 44px;
}

/* --- 2. THE MIDDLE CONTAINER (Centered on Desktop) --- */
.middle {
    margin: 0 auto;
    background-color: white;
    width: 45%; 
    padding: 20px 10px;
    position: relative;
    z-index: 5; /* Lower than menu, higher than background */
}

section img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 3. NAVBAR #1: ORIGINAL (Inside Middle) --- */
.navbar {
    display: flex; 
    justify-content: center; 
    padding: 10px 0; 
    background-color: white;
    flex-wrap: wrap;
}

/* 1. The Navbar Container */
.navbar {
    display: flex;
    justify-content: center; /* Centers your links */
    gap: 30px;              /* THIS FIXES THE SPACING - adds 30px between links */
    padding: 20px;
}

/* 2. The Link itself */
.navbar a {
    text-decoration: none;
    position: relative;
    color: #000;            /* Dark grey/black text */
    font-family: 'Germania One', serif; /* Optional: classic history feel */
    padding: 5px 0;
    transition: color 0.3s;
}

/* 3. The Sliding Line */
.navbar a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;          /* Slightly thinner, more elegant line */
    bottom: 0;
    left: 0;
    background-color: #000; /* Black line (change to #555 for grey) */
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

/* --- 4. THE HOVER STATE --- */
.navbar a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.navbar a:hover {
    color: #000;
    /* This makes it look bold without moving the other links */
    text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
    transition: 0.2s;
}

/* --- 5. THE SYNCED PHONE TRANSITION --- */
@media screen and (max-width: 768px) {
    .middle {
        width: 100% !important;       
        padding: 0 15px;    
        box-sizing: border-box; 
    } /* This closes .middle */

    .navbar {
        gap: 15px;          
        padding: 10px;
    } /* This closes .navbar */
} /* <--- THIS IS THE MISSING BRACKET that closes the @media rule */

/* --- 6. POP-UP (THE "BLOCKING" FIX) --- */
/* Use the class name here so it applies to the wrapper */
/* --- 6. POP-UP (THE "FIXED" FIX) --- */
.popup-overlay {
    display: none; 
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.7) !important; 
    z-index: 999999 !important;
    pointer-events: auto !important;
}

.popup-content {
    background-color: white;
    padding: 30px;
    border: 10px solid #000;
    width: 85%;  
    max-width: 400px;  
    text-align: center;
    
    /* This centers the box perfectly in the middle of the screen */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    
    z-index: 1000000 !important;
}

/* Ensure the X stays in the top right */
.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
}
.popup-close:hover {
    color: #ff3131;
    transform: scale(1.2);
    transition: 0.2s;
}

/* --- 7. BUTTON STYLES --- */
.popup-donate-button, .donate-button {
    display: block;
    background-color: #ff3131;
    color: white;
    padding: 15px;
    margin: 20px auto;
    text-decoration: none;
    font-weight: bold;
    border: 5px solid black;
    width: fit-content;

}
.popup-donate-button:hover, .donate-button:hover {
    background-color: #008CFF;   /* Swap background to black */
    color: #00000;            /* Swap text to red */
    transform: scale(1.05);    /* Makes the button grow slightly (5%) */
    cursor: pointer;           /* Ensures the "hand" icon appears */
    transition: 0.2s;
}
/* --- 8. NEWS TICKER --- */
.news-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #000; /* Classic black background */
    color: #fff;            /* White text */
    height: 40px;
    line-height: 40px;
    overflow: hidden;
    z-index: 999;           /* Above site content, but below the popup shield */
    border-top: 2px solid #555;
    font-family: 'Germania One', serif; /* Old news wire feel */
    font-weight: bold;
}

.ticker-wrapper {
    display: flex;
    width: 200%; /* Enough room for two copies of the text */
}

.ticker-content {
    display: flex;
    flex-shrink: 0;
    white-space: nowrap;
    animation: ticker-move 30s linear infinite; /* Adjust '30s' to change speed */
}

.ticker-content span {
    padding: 0 50px; /* Space between headlines */
}

/* THE ANIMATION */
@keyframes ticker-move {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Pause the news when the user hovers so they can read a specific one */
.news-ticker:hover .ticker-content {
    animation-play-state: paused;
}
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px; /* Pushes it away from the content above it */
    font-family: 'Germania One', sans-serif; /* Uses your existing cool font */
    font-size: 14px;
    color: #555;
}
body {
    padding-bottom: 60px; /* Pushes your content up so the footer never covers it */
}
/* The main box for each edition */
.edition-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    border: 4px solid #000; /* Historical newspaper frame style */
    padding: 25px;
    margin-bottom: 40px; /* Pushes the next box down */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Left Column: Text space */
.edition-info {
    flex: 1;
    padding-right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligns everything, including the button, to the left */
}

.edition-title {
    font-family: 'Germania One', sans-serif;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 5px;
}

.edition-period {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

/* The Buy Button on the bottom left */
.buy-button {
    display: inline-block;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    font-family: 'Germania One', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid #000;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.buy-button:hover {
    background-color: #fff;
    color: #000;
}

/* Right Column: Image space */
.edition-image img {
    width: 180px; /* Adjust based on how wide your MagCloud covers are */
    height: auto;
    border: 1px solid #ddd;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.1); /* Makes the physical mag "pop" off the screen */
}

/* 📱 Mobile Responsive: Stacks text on top of image on small screens */
@media screen and (max-width: 600px) {
    .edition-container {
        flex-direction: column-reverse; /* Puts image at top or bottom on mobile */
        text-align: center;
    }
    .edition-info {
        padding-right: 0;
        align-items: center; /* Centers button on mobile for easier tapping */
    }
    .edition-image {
        margin-bottom: 20px;
    }
}