/* Valdosta Local Buzz - Mobile Optimized Styles */

/* Valdosta Local Buzz - Mobile Optimized Styles */
@media screen and (max-width: 768px) {
/* 1. Reset Container for Small Screens */
.container {
    display: block; /* Disables the 70/30 grid */
    padding: 10px;
    margin: 0 auto;
}

/* 2. Stack the News Feed and Sidebar */
.news-feed, .sidebar {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* 3. Article Grid: From 3 columns to 1 column */
.article-grid {
    display: grid;
    grid-template-columns: 1fr !important; /* Forces single column */
    gap: 20px;
}

/* 6. Footer: Stack columns */
.footer-container {
    display: grid;
    grid-template-columns: 1fr !important; /* Stack footer sections */
    text-align: center;
    gap: 40px;
   }
}


/* 4. Navigation Layout (Only triggers on small screens) */
@media screen and (max-width: 768px) {
    /* Setup the hamburger icon */
    .menu-checkbox {
        display: none;
    }

    .hamburger {
        display: block;
        width: 30px;
        height: 25px;
        cursor: pointer;
        position: absolute;
        left: 20px; /* Positions it to the left */
        top: 30px;  /* Adjust based on your header spacing */
        z-index: 1000;
    }

    /* The three bars of the hamburger */
    .hamburger span {
        display: block;
        width: 100%;
        height: 4px;
        background: #ffcc00; /* Matches your brand yellow */
        margin-bottom: 5px;
        transition: 0.3s;
    }

    /* Style the Menu Drawer (Hidden off-screen to the left) */
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%; /* Hidden off-screen */
        width: 250px;
        height: 100%;
        background: #333; /* Dark background matches footer */
        padding-top: 80px;
        display: flex;
        flex-direction: column;
        transition: 0.4s ease-in-out;
        z-index: 999;
        text-align: left;
    }

    .main-nav a {
        padding: 15px 25px !important;
        color: white !important;
        text-decoration: none;
        font-size: 1.2rem;
        border-bottom: 1px solid #444;
        margin: 0 !important;
        display: block;
    }

    /* Hide the separator bars (|) on mobile */
    .main-nav span {
        display: none;
    }

    /* THE MAGIC: When checkbox is checked, slide the menu in */
    .menu-checkbox:checked ~ .main-nav {
        left: 0; /* Slides in from the left */
    }

    /* Optional: Animate hamburger to an 'X' when open */
    .menu-checkbox:checked + .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .menu-checkbox:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }
    .menu-checkbox:checked + .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -7px);
    }
}

/* 5. Header & Hero Adjustments */
h1 {
    font-size: 1.8rem; /* Shrink giant headlines so they don't wrap weirdly */
}

.hero-image {
    max-width: 100%;
    border-radius: 0; /* Full width looks better on mobile */
}

/* 7. Forms & Inputs: Ensure they are full-width */
.signup-box input[type="email"], 
.contact-form input, 
.contact-form textarea {
    width: 100% !important;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.signup-box button,
.contact-form button {
    width: 100%;
    padding: 15px;
}

/* 8. Sidebar Ad Adjustments */
.logo-ad-container {
    grid-template-columns: 1fr 1fr; /* Keep logos 2-wide or change to 1fr to stack */
}

.ad-box {
    max-width: 100%;
    height: auto !important; /* Allow ads to scale */
}

/* ONLY trigger these for screens smaller than 768px */
@media screen and (max-width: 768px) {

    /* 1. Stack the layout for mobile */
    .container {
        display: block !important;
        padding: 10px;
    }

    .news-feed, .sidebar {
        width: 100% !important;
        margin-bottom: 20px;
    }

    /* 2. Show the Hamburger */
    .hamburger {
        display: block !important;
        width: 30px;
        height: 25px;
        cursor: pointer;
        position: absolute;
        left: 20px;
        top: 30px;
        z-index: 1000;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 4px;
        background: #ffcc00;
        margin-bottom: 5px;
    }

    /* 3. The Slide-out Mobile Menu */
    .main-nav {
        position: fixed !important;
        top: 0;
        left: -100%; /* Hidden off-screen */
        width: 250px;
        height: 100%;
        background: #333;
        padding-top: 80px;
        display: flex !important;
        flex-direction: column !important;
        transition: 0.4s ease-in-out;
        z-index: 999;
        border: none !important;
    }

    .main-nav a {
        padding: 15px 25px !important;
        border-bottom: 1px solid #444;
        margin: 0 !important;
        text-align: left;
    }

    /* Hide the separators (|) on mobile */
    .nav-sep, .main-nav span {
        display: none !important;
    }

    /* Slide in when checked */
    .menu-checkbox:checked ~ .main-nav {
        left: 0 !important;
    }

    /* 4. Other Mobile Fixes */
    .article-grid {
        grid-template-columns: 1fr !important;
    }
    
    .footer-container {
        grid-template-columns: 1fr !important;
    }
}