/* ==========================================================================
   SARAH'S COTTAGE CRAFTS - MASTER STYLESHEET
   Table of Contents:
   1. Variables & Base Styles
   2. Typography & Buttons
   3. Header & Navigation
   4. Hero Section
   5. Trust Badges
   6. About Section
   7. Categories Section
   8. Events Section & Tabs
   9. Contact Section
   10. Footer
   11. Global Modals (Gallery Popup)
   12. Admin Portal Styles
   13. Responsive Media Queries (Mobile/Tablet)
   ========================================================================== */

/* --- 1. Variables & Base Styles --- */
:root {
    --white: #ffffff;
    --green: #398630;
    --brown-string: #C19A6B;
    --text-dark: #333333;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
}

section {
    padding: 3rem 2rem;
}

/* The "Silver Bullet" for responsive math */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- 2. Typography & Buttons --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--green); 
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-block;
    background-color: var(--green);
    color: var(--white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: var(--brown-string);
    color: var(--white);
    transform: translateY(-3px);
}

.btn-small {
    background-color: var(--white);
    color: var(--green);
    border: 2px solid var(--green);
    padding: 0.5rem 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-top: auto;
}

.btn-small:hover {
    background-color: var(--green);
    color: var(--white);
}

/* --- 3. Header & Navigation --- */
header {
    background-color: var(--white);
    padding: 0.5rem 3rem; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    z-index: 1000;
}

.logo-img {
    height: 70px; 
    width: auto;
    display: block;
}

nav {
    flex-grow: 1; 
    display: flex;
    justify-content: center; 
}

nav ul {
    list-style: none; 
    display: flex; 
    margin: 0;
    padding: 0;
    gap: 3rem; 
}

header a {
    font-family: var(--font-heading);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

header a:hover {
    color: var(--green); 
}

.header-socials {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-socials i {
    font-size: 1.4rem; 
    color: var(--green);
    transition: all 0.3s ease;
}

.header-socials a:hover i {
    color: var(--brown-string);
    transform: translateY(-2px); 
}

.menu-toggle {
    display: none; 
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--green);
}

/* --- 4. Hero Section --- */
#hero {
    background-image: url('https://firebasestorage.googleapis.com/v0/b/sarah-s-cottage-crafts.firebasestorage.app/o/scc-hero%20(1).webp?alt=media&token=f5b1b4cc-39f8-4dbb-a42d-4e309cd87db8');
    background-size: cover;
    background-position: center;
    min-height: 80vh; 
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    padding: 0 8%; 
}

.hero-content {
    max-width: 550px;
    background: rgba(255, 255, 255, 0.85); 
    padding: 3rem;
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--green);
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
}

.hero-sub {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-family: var(--font-body); 
    margin: 0 0 2rem 0;
    font-weight: 400;
}

.hero-content h3 {
    font-size: 1.5rem;
    color: var(--brown-string); 
    margin: 0 0 1rem 0;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
}

/* --- 5. Trust Badges --- */
#trust-badges {
    background-color: var(--white);
    padding: 2rem 5%; 
    border-bottom: 1px solid #f0f0f0; 
}

.badge-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap; 
    gap: 1.5rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.75rem; 
}

.badge i {
    font-size: 1.5rem;
    color: var(--green); 
}

.badge span {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* --- 6. About Section --- */
#about {
    padding: 6rem 2rem;
    background-color: var(--white);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 20px 20px 0px var(--brown-string); 
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 1.5rem;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.value-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.value-item i {
    font-size: 1.8rem;
    color: var(--green);
    margin-bottom: 5px;
}

.value-item span {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 7. Categories Section --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 2rem;
    max-width: 1300px; 
    margin: 0 auto;
    align-items: stretch; 
}

.category-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; 
}

.category-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); 
}

.category-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover img {
    transform: scale(1.05) rotate(3deg);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.card-content h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.card-content p {
    color: #555;
    margin-bottom: 1.5rem;
}

/* --- 8. Events Section & Tabs (Split Layout) --- */
#events {
    background-color: var(--white);
    padding: 6rem 2rem;
}

.events-split-container {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start; 
}

.events-description {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.events-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: -15px 15px 0px var(--brown-string); 
}

.events-right {
    background: #fafafa;
    padding: 3rem 2rem;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.events-tabs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.8rem 2.5rem;
    background: transparent;
    border: 2px solid var(--green);
    color: var(--green);
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--green);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.locations-wrapper {
    position: relative;
    width: 100%; 
    display: flex;
    align-items: center;
}

.locations-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 2rem;
    padding: 1rem; 
    scrollbar-width: none; 
    width: 100%;
}

.locations-slider::-webkit-scrollbar {
    display: none; 
}

.location-card {
    scroll-snap-align: center;
    flex: 0 0 100%; 
    display: flex;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.location-info {
    width: 100%;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; 
    text-align: center;
}

.location-info h3 {
    font-size: 1.8rem;
    color: var(--green);
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.location-info p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

.location-info p i {
    color: var(--brown-string); 
    margin-right: 0.5rem;
}

.empty-state-card {
    width: 100%;
    background: transparent;
    border: 2px dashed #b2d8b2;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state-card i {
    font-size: 2.5rem;
    color: var(--brown-string);
}

.empty-state-card h3 {
    color: var(--green);
    font-size: 1.5rem;
    margin: 0;
}

.empty-state-card p {
    color: #666;
    margin: 0;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    color: var(--green);
    border: 1px solid #eee;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 10;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--green);
    color: var(--white);
}

.left-nav { left: -15px; }
.right-nav { right: -15px; }

/* --- 9. Contact Section --- */
.contact-section {
    background-color: #fafafa; 
    padding: 5rem 2rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--green);
    margin-top: 0;
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.detail-item i {
    color: var(--brown-string);
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.detail-item a {
    color: var(--green);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.detail-item a:hover {
    color: var(--brown-string);
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    box-sizing: border-box; 
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--green); 
}

.contact-form .btn {
    width: 100%;
    font-size: 1.1rem;
}

/* --- 10. Footer --- */
footer {
    background-color: var(--brown-string);
    color: var(--white);
    padding: 4rem 2rem 1rem 2rem;
    font-family: var(--font-body);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto 3rem auto;
}

.footer-col h4 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.footer-col p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-col a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-socials i {
    width: 25px; 
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* --- 11. Global Modals (Gallery Popup) --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    overflow-y: auto;
    padding-top: 50px;
}

.modal-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center; 
    gap: 2rem; 
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.modal-content img {
    width: 300px; 
    height: 300px; 
    object-fit: cover; 
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4); 
    border: 4px solid var(--white); 
    cursor: pointer; 
    transition: transform 0.3s ease;
}

.modal-content img:hover {
    transform: scale(1.05); 
}

.close-modal {
    position: fixed;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--green);
}

.fullscreen-viewer {
    position: fixed;
    z-index: 3000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); 
    display: none;
    align-items: center;
    justify-content: center;
}

.fullscreen-viewer img {
    max-width: 90%;
    max-height: 90vh;
    border: 4px solid var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    object-fit: contain; 
}

.close-fullscreen {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 3001;
    transition: color 0.3s ease;
}

.close-fullscreen:hover {
    color: var(--green);
}

/* --- 12. Admin Portal Styles --- */
.portal-body {
    background-color: #f0f2f5; 
    font-family: var(--font-body);
}

.portal-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
}

.portal-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
}

.login-card {
    max-width: 400px;
    margin-top: 5vh;
    text-align: center;
}

.login-card h2 {
    color: var(--green);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

#dashboard-screen {
    max-width: 1200px;
    width: 100%; 
    margin: 0 auto;
    box-sizing: border-box;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white); 
    padding: 1.5rem 2.5rem; 
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-header h2 {
    color: var(--green);
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: #444;
    margin-bottom: 0.5rem;
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green);
}

.error-msg {
    color: red;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.back-link {
    display: block;
    margin-top: 1.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--green);
}

.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.admin-list-item:last-child {
    border-bottom: none;
}

.admin-list-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}

.item-info {
    flex-grow: 1;
}

.item-info h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
    color: var(--green);
}

.item-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.btn-delete {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-delete:hover {
    background-color: #cc0000;
}

#admin-events-list,
#admin-gallery-list {
    max-height: 400px; 
    overflow-y: auto;  
    padding-right: 15px; 
    scrollbar-width: thin;
    scrollbar-color: var(--green) #f0f2f5;
}

#admin-events-list::-webkit-scrollbar,
#admin-gallery-list::-webkit-scrollbar {
    width: 8px;
}

#admin-events-list::-webkit-scrollbar-track,
#admin-gallery-list::-webkit-scrollbar-track {
    background: #f0f2f5;
    border-radius: 4px;
}

#admin-events-list::-webkit-scrollbar-thumb,
#admin-gallery-list::-webkit-scrollbar-thumb {
    background-color: var(--green);
    border-radius: 4px;
}

/* ==========================================================================
   13. RESPONSIVE MEDIA QUERIES (MOBILE / TABLET)
   ========================================================================== */

/* Tablet Optimization (Max-width: 992px) */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column; 
        text-align: center;
        gap: 3rem;
    }
    
    .about-image img {
        height: 350px;
        width: 90%; 
        box-shadow: 10px 10px 0px var(--brown-string);
    }
    
    .about-text h2 {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Phone Optimization (Max-width: 768px) */
@media (max-width: 768px) {
    
    /* 1. Global Screen Lock (Prevents all horizontal swiping) */
    body, html { 
        overflow-x: hidden; 
        width: 100%; 
    }

    /* Header & Nav */
    header { padding: 0.5rem 1rem; }
    .logo-img { height: 50px; }
    nav { flex-grow: 0; margin-left: auto; margin-right: 1rem; }
    .header-socials { gap: 0.75rem; }
    .header-socials i { font-size: 1.2rem; }
    
    .menu-toggle { display: block; }
    .nav-links {
        display: none; 
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 1500;
    }
    .nav-links.active { display: flex; }

    /* Hero Section */
    #hero {
        background-image: none; 
        background-color: #fafafa; 
        min-height: auto; 
        padding: 3rem 0 0 0; 
        display: flex; 
        flex-direction: column; 
        gap: 2rem; 
    }

    .hero-content {
        background: rgba(255, 255, 255, 0.95); 
        box-shadow: 0 8px 25px rgba(0,0,0,0.12); 
        padding: 2rem 1.5rem;
        text-align: center;
        margin: 0 1.5rem; 
    }

    .hero-content h1 { font-size: 2.2rem; }

    #hero::after {
        content: '';
        display: block;
        width: 100%; 
        height: 250px; 
        background-image: url('https://firebasestorage.googleapis.com/v0/b/sarah-s-cottage-crafts.firebasestorage.app/o/scc-mobile-hero-strip.jpg?alt=media&token=aced4628-d7ad-49ef-a2f3-2794e71601d6');
        background-size: cover;
        background-position: center;
    }

    /* Trust Badges */
    .badge-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr); 
        gap: 2rem 1rem;
        justify-items: center;
    }

    .badge {
        flex-direction: column; 
        text-align: center;
        gap: 0.5rem;
    }

    .badge i { font-size: 2rem; }

    .badge span {
        font-family: var(--font-body);
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 700;
    }

    /* General Section Padding */
    #about { padding: 3rem 1.5rem 1.5rem 1.5rem; }
    .section-title { font-size: 2.2rem; margin-bottom: 1.5rem; }
    .about-values { margin-top: 2rem; padding-top: 1.5rem; }
    
    /* --- Contact Section Mobile Fixes --- */
    .contact-container {
        grid-template-columns: 1fr; 
        gap: 3rem;
    }

    /* Force all text in the contact section to flush left on mobile */
    .contact-section .section-title,
    .contact-info,
    .contact-info h3,
    .contact-info p {
        text-align: left;
    }

    /* Ensure the icon list locks to the left edge */
    .contact-details {
        align-items: flex-start; 
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 3rem; 
    }

    /* ========================================== */
    /* 2. EVENTS SECTION MOBILE FIXES             */
    /* ========================================== */
    #events { 
        padding: 3rem 1rem; 
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: hidden; /* Hard stop to prevent anything from escaping the screen */
    }

    .events-split-container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        width: 100%;
    }

    .events-left, .events-right {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .events-image {
        height: 250px;
        width: 100%;
        margin: 0; 
        /* Swap the offset shadow for a soft, centered shadow so it fits mobile screens perfectly */
        box-shadow: 0 8px 20px rgba(0,0,0,0.15); 
        border-radius: 8px;
    }

    .events-right {
        padding: 1rem 0; 
        background: transparent; 
        border: none;
        box-shadow: none;
    }

    .events-tabs {
        display: flex;
        gap: 10px; 
        width: 100%;
        padding: 0;
        margin-bottom: 1.5rem;
    }

    .tab-btn {
        flex: 1; /* Forces a perfect 50/50 split */
        padding: 0.8rem 0; 
        font-size: 0.9rem;
        min-width: 0; 
        text-align: center;
        margin: 0;
    }

    .locations-wrapper {
        width: 100%;
        padding: 0;
        margin: 0;
        position: relative;
    }

    .locations-slider {
        width: 100%;
        padding: 1rem 0; /* Removed horizontal padding */
    }

    .location-info {
        padding: 2rem 1.5rem; 
        width: 100%;
        box-sizing: border-box;
    }

    .empty-state-card {
        padding: 2rem 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }

    /* Bring arrows safely inside */
    .left-nav { left: 0px; z-index: 100; }
    .right-nav { right: 0px; z-index: 100; }

    /* ========================================== */
    /* 3. GALLERY POPUP MOBILE FIXES              */
    /* ========================================== */
    .modal {
        padding-top: 60px; 
    }

    .modal-content {
        display: flex;
        flex-direction: column; /* Forces them into a neat vertical stack */
        align-items: center; /* Centers the stack */
        padding: 1rem;
        gap: 1.5rem; /* Spacing between photos */
        width: 100%; 
    }

    .modal-content img {
        width: 85%; /* Gives a nice border gap around the image so it doesn't touch the screen edge */
        max-width: 300px; 
        height: auto; 
        aspect-ratio: 1 / 1; 
        margin: 0; /* Margin handled by flexbox gap now */
        border-width: 3px; /* Slightly thinner border for phones */
    }

    .close-modal, 
    .close-fullscreen {
        right: 15px; 
        top: 15px;
        font-size: 35px;
        z-index: 2500;
        background: rgba(0,0,0,0.5); /* Adds a faint dark circle so it's always readable */
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .fullscreen-viewer img {
        max-width: 95%; 
        max-height: 80vh;
        width: auto;
    }
}

/* Small Phone Optimization (Max-width: 600px) */
@media (max-width: 600px) {
    .footer-container {
        grid-template-columns: 1fr; 
        text-align: center;
    }
    .footer-socials li {
        justify-content: center;
    }
}