@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');
:root {
    --primary: #003366; /* Navy blue */
    --primary-light: #0055aa;
    --primary-glow: rgba(0, 51, 102, 0.15);
    --bg: #ffffff;
    --surface: #f4f7f9;
    --surface-light: #e9eff5;
    --text: #001a33; /* Dark navy */
    --text-muted: #5a6b7d;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 51, 102, 0.1);
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Platform Colors */
    --color-net1: #2d6a4f; /* Emerald Green */
    --color-net2: #c05621; /* Burnt Orange */
    --color-ground: #003366; /* Deep Navy (Original Primary) */
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: block;
    font-weight: 500;
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    overflow-x: hidden;
    width: 100vw;
    position: relative;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: visible; /* Allow internal scrolling to work better */
        width: auto;
    }
}



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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-padding-top: 120px; /* Adjusted for larger header */
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Typography */
h1, h2, h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 140px 0 60px; /* Perfectly balanced: clears the 120px header with a 20px professional gap */
    display: none; 
}

section {
    padding: 110px 0 60px; /* Precise gap: clears header with a small, professional 10px buffer */
    display: none; 
}

section.active-page {
    display: block !important;
    animation: fadeIn 0.5s ease-out;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.6rem 0; /* Tighter bar to allow content to sit higher */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 85px; /* Perfectly balanced logo size */
    width: auto;
    display: block;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 1.1rem; /* Slightly larger text for premium feel */
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.8rem;
    z-index: 1100;
    min-height: 44px; /* Ensure accessible tap target */
    min-width: 44px;
    justify-content: center;
    align-items: center;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-only { display: none !important; }

/* Hero Section */
#home {
    min-height: 100vh;
    display: none; 
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    text-align: center;
    position: relative;
    padding: 110px 0 40px; 
}

@media (max-width: 768px) {
    #home {
        min-height: auto; /* Remove 100vh on mobile to tighten space */
        padding-top: 85px; /* Aligned with header */
    }
}

#home.active-page {
    display: flex; /* Show only when active */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: brightness(0.9);
}

.hero-content {
    max-width: 100%;
    width: 100%;
}

.hero-slogan {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.hero-image-wrapper {
    width: 100%;
    margin: 0; 
    aspect-ratio: 21 / 9; /* Wide cinematic ratio for desktop */
    min-height: 400px;
    max-height: 75vh;
    overflow: hidden;
    margin-bottom: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    background: var(--surface-light);
}

@media (max-width: 1024px) {
    .hero-image-wrapper {
        aspect-ratio: 16 / 9;
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .hero-image-wrapper {
        aspect-ratio: auto; 
        height: auto;
        min-height: 0;
        max-height: 60vh;
        border-radius: 12px;
        background: transparent !important; /* Remove gray background */
        margin-bottom: 1.5rem;
    }
    .hero-full-img {
        height: auto;
        max-height: 60vh;
        object-fit: contain; 
        background: transparent !important;
    }
}

@media (min-width: 1400px) {
    .hero-image-wrapper {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: 0;
    }
}

.hero-full-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-image-wrapper:hover .hero-full-img {
    transform: scale(1.05);
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

@media (min-width: 600px) {
    .why-us-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
    min-height: 44px; /* Standard Tap Target */
    min-width: 44px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px var(--primary-glow);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Reduced min-width to prevent overflow on 320px screens */
    gap: 2rem;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.service-image {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    object-fit: cover;
}

/* Booking Calendar */
.booking-container {
    background: var(--surface);
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid var(--glass-border);
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 2rem;
}

.cal-day {
    flex: 0 0 85px; /* Fixed width on mobile, don't shrink */
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-light);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.cal-day:hover:not(.booked) {
    background: var(--primary);
    color: #fff;
}

.cal-day.booked {
    opacity: 0.3;
    pointer-events: none;
    text-decoration: line-through;
}

.cal-day.selected {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Contact Wrapper */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Booking Rules Grid */
.rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .rules-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

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

.input-group input, .input-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text);
    outline: none;
}

.input-group input:focus, .input-group textarea:focus {
    border-color: var(--primary);
}

/* Gallery & Updates */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.slider-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto; /* Enable scrolling on touch devices */
    scroll-behavior: smooth;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for cleaner look if buttons exist, but allow scroll */
.slider-container::-webkit-scrollbar {
    height: 4px;
}
.slider-container::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.update-card {
    min-width: 280px; /* Slightly smaller for better fit on small mobile */
    max-width: 320px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

@media (min-width: 768px) {
    .update-card {
        min-width: 320px;
    }
    .slider-container {
        overflow-x: hidden; /* Hide on desktop, use buttons */
        padding-bottom: 0;
    }
}

.update-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.update-card-banner {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.update-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.update-card:hover .update-card-banner img {
    transform: scale(1.1);
}

.update-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.9);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    z-index: 2;
}

.update-card-content {
    padding: 2rem;
}

.update-card-content h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    line-height: 1.3;
}

.update-card-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* active-page handles the display of sections in script.js */

#home.active-page {
    display: flex !important;
}

[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.6s ease-out;
}

[data-animate].animate {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

h2.gradient-text {
    margin-top: 0 !important;
}

@media (max-width: 992px) {
    .nav-links {
        display: none; 
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%; 
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center; 
        align-items: center;
        padding: 2rem;
        gap: 2rem;
        z-index: 1050;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(-100%); 
    }

    .nav-links.active {
        display: flex;
        transform: translateY(0);
    }

    .menu-toggle {
        display: flex;
    }

    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    
    .logo img {
        height: 65px; /* Increased mobile logo size */
    }

    /* Gallery Mobile Adjustments */
    #gallery-display-area {
        height: 350px !important;
    }
    #gallery-featured-container {
        border-radius: 16px !important;
    }
    .gallery-controls button {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem;
    }

    .nav-links a:not(.btn) {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary);
    }
    
    .nav-links .btn {
        color: #ffffff !important; /* Forces text to be white on the blue button */
        width: 80%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
    .hero-slogan { font-size: clamp(1.6rem, 7vw, 2.2rem); line-height: 1.1; margin-bottom: 0.8rem; }
    .hero-full-img { height: auto; max-height: 60vh; }
    .contact-wrapper { grid-template-columns: 1fr; }
    
    .slots-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .calendar-horizontal {
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        touch-action: pan-x;
        width: 100%;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
    }

    .calendar-horizontal .cal-day {
        flex: 0 0 85px !important;
        min-width: 85px !important;
    }
    
    .logo img {
        height: 55px; 
    }
    
    section {
        padding: 60px 0 20px; /* Further reduced padding to justify content higher */
    }
    
    .container {
        overflow-x: visible; /* Changed from hidden to allow horizontal scroll components */
    }
}

/* Program Cards */
.program-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.program-card:hover h3 {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.program-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Registration Form Specifics */
.registration-wrapper {
    background: var(--surface);
    border-radius: 30px;
    padding: 4rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-grid .full-width {
    grid-column: span 2;
}

.registration-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.registration-form input, 
.registration-form select, 
.registration-form textarea {
    width: 100%;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    transition: var(--transition);
}

.registration-form input:focus, 
.registration-form select:focus, 
.registration-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    outline: none;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-grid .full-width {
        grid-column: span 1;
    }
    .registration-wrapper {
        padding: 2rem;
    }
}

/* Arena Booking Layout */
.arena-booking-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

.arena-platforms {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.platform-btn {
    padding: 1.5rem;
    text-align: left;
    background: var(--surface-light);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.platform-btn.active {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Coloring Logic based on data-active-platform on container */
[data-active-platform="net1"] .platform-btn[data-platform="net1"] { background: var(--color-net1); color: #fff; border-color: var(--color-net1); }
[data-active-platform="net1"] .cal-day.selected { background: var(--color-net1); color: #fff; box-shadow: 0 0 15px rgba(45, 106, 79, 0.3); }
[data-active-platform="net1"] .time-slot.selected { background: var(--color-net1); color: #fff; border-color: var(--color-net1); }

[data-active-platform="net2"] .platform-btn[data-platform="net2"] { background: var(--color-net2); color: #fff; border-color: var(--color-net2); }
[data-active-platform="net2"] .cal-day.selected { background: var(--color-net2); color: #fff; box-shadow: 0 0 15px rgba(192, 86, 33, 0.3); }
[data-active-platform="net2"] .time-slot.selected { background: var(--color-net2); color: #fff; border-color: var(--color-net2); }

[data-active-platform="ground"] .platform-btn[data-platform="ground"] { background: var(--color-ground); color: #fff; border-color: var(--color-ground); }
[data-active-platform="ground"] .cal-day.selected { background: var(--color-ground); color: #fff; box-shadow: 0 0 15px rgba(0, 51, 102, 0.3); }
[data-active-platform="ground"] .time-slot.selected { background: var(--color-ground); color: #fff; border-color: var(--color-ground); }

.platform-title {
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.platform-desc {
    font-size: 0.8rem;
    opacity: 0.7;
}

.calendar-horizontal {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.time-slot {
    padding: 1rem;
    background: var(--surface-light);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.time-slot.available:hover {
    background: var(--primary-light);
    color: #fff;
}

.time-slot.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.time-slot.booked {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #e5e7eb;
}

.time-slot.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    pointer-events: none;
}

.mini-form input {
    width: 100%;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

/* New Responsive Gallery Override */
#gallery-display-area {
    height: 600px;
}

@media (max-width: 768px) {
    #gallery-display-area {
        height: 350px !important;
    }
    .gallery-controls .btn {
        padding: 0.8rem 1.5rem !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .arena-booking-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .registration-wrapper {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .arena-platforms {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        margin-bottom: 2rem;
    }
    .platform-btn {
        padding: 1.2rem;
        text-align: left;
        flex-direction: column;
        min-height: auto;
    }
    .platform-title {
        font-size: 1rem;
        white-space: normal;
    }
    .platform-desc {
        display: block; /* Restored as requested */
    }
    .booking-scheduler {
        padding: 1.5rem;
    }
    .registration-wrapper {
        padding: 1.5rem 1rem;
    }
}

/* Modal & Rich Text Styles */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 10000; justify-content: center;
    align-items: center; backdrop-filter: blur(10px); padding: 1rem;
}
.modal-window {
    background: #fff; width: 100%; max-width: 900px; max-height: 90vh;
    border-radius: 24px; overflow: hidden; position: relative;
    display: flex; flex-direction: column;
}
.modal-content {
    overflow-y: auto; padding: 2rem;
}
.modal-title {
    font-size: 1.8rem; margin-bottom: 2rem; line-height: 1.2;
}
.modal-images {
    display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2rem;
}
.modal-desc {
    font-size: 1rem; color: #4b5563; line-height: 1.6;
}

@media (min-width: 768px) {
    .modal-overlay { padding: 2rem; }
    .modal-content { padding: 4rem; }
    .modal-title { font-size: 2.8rem; }
    .modal-images { grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 3rem; }
    .modal-desc { font-size: 1.15rem; line-height: 1.8; }
}

.rich-text-content p { margin-bottom: 1.8rem; }
.rich-text-content ul, .rich-text-content ol { margin-bottom: 1.8rem; padding-left: 2rem; }
.rich-text-content li { margin-bottom: 0.8rem; }
.rich-text-content b, .rich-text-content strong { color: var(--primary); }
.rich-text-content {
    animation: fadeIn 0.4s ease-out;
}

/* Admin Scoped Styles */
.admin-body { background: var(--surface); }
.admin-sidebar {
    width: 280px; background: #fff; height: 100vh; position: fixed;
    border-right: 1px solid var(--glass-border); padding: 2rem 2rem 5rem; /* Added bottom padding for scroll space */
    z-index: 1060; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto; /* Enable scrolling for long menus */
}
.admin-main { margin-left: 280px; padding: 3rem; background: var(--surface); min-height: 100vh; transition: padding 0.3s ease; }
.admin-nav-item {
    padding: 1rem; margin-bottom: 0.5rem; border-radius: 12px;
    cursor: pointer; font-weight: 600; color: var(--text-muted); transition: var(--transition);
}
.admin-nav-item.active { background: var(--primary); color: #fff; }

/* Staff Operations Specifics */
.staff-ops-form {
    background: #fff !important;
    padding: 3rem !important;
}

@media (max-width: 768px) {
    .staff-ops-form {
        padding: 1.5rem 1rem !important;
    }
}

/* Admin Mobile Controls */
/* Admin Mobile Header Improvements */
.admin-mobile-header {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 70px;
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1050; 
    padding: 0 1.5rem; 
    align-items: center; 
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.admin-menu-toggle {
    width: auto; height: 40px; background: #fff;
    border: 1px solid var(--glass-border); border-radius: 10px;
    display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 8px;
    cursor: pointer; position: relative; padding: 0 15px;
}
.admin-menu-toggle span {
    display: block; width: 22px; height: 2px; background: #fff;
    border-radius: 2px; transition: var(--transition);
}
.admin-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.admin-menu-toggle.active span:nth-child(2) { opacity: 0; }
.admin-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 1055;
}
.sidebar-overlay.active { display: block; }

@media (max-width: 992px) {
    .admin-mobile-header { display: flex; }
    .admin-sidebar { 
        left: -320px; 
        width: 280px; 
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    }
    .admin-sidebar.active { 
        transform: translateX(320px); 
    }
    .admin-main { 
        margin-left: 0 !important; 
        padding: 6rem 1.2rem 2rem !important; 
        width: 100% !important;
    }
    .admin-menu-toggle { display: flex; }
    .admin-table-container { 
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch;
        margin-bottom: 2rem;
        border-radius: 12px;
        border: 1px solid var(--glass-border);
    }
    /* Add a subtle indicator that the table is scrollable */
    .admin-table-container::after {
        content: 'Scroll horizontal →';
        display: block;
        text-align: right;
        font-size: 0.7rem;
        color: var(--text-muted);
        padding: 0.5rem;
        opacity: 0.6;
    }

    /* Admin Grid Layouts for Mobile */
    .admin-grid-layout, .admin-modal-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    .admin-table, #main-data-table {
        min-width: 800px; /* Force minimum width to enable horizontal scrolling */
    }
    
    .admin-grid-layout > div {
        padding: 1rem !important; /* Reduce padding inside cards on mobile to save space */
        min-width: 0; /* Important: allows grid items to shrink below content width for scrolling */
    }
}

.admin-grid-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

.admin-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .upload-form { padding: 1.5rem; border-radius: 12px; }
    .admin-main { padding: 5rem 1rem 1.5rem; }
    .update-post-card { flex-direction: column; gap: 1rem !important; }
    .update-post-card img { width: 100% !important; height: 180px !important; }
}

.admin-table th, .admin-table td, #main-data-table th, #main-data-table td {
    padding: 1rem 1.2rem; text-align: left;
    border: 1px solid var(--glass-border); 
    font-size: 0.8rem;
    line-height: 1.4;
}
.admin-table th, #main-data-table th {
    background: rgba(30, 58, 138, 0.05);
    text-transform: uppercase; font-size: 0.7rem; font-weight: 800;
    color: var(--primary); letter-spacing: 1px;
}

#main-data-table {
    border-collapse: collapse;
    width: 100%;
}

#main-data-table tr:hover {
    background: rgba(30, 58, 138, 0.02);
}

/* Specific wrapping for columns like 'Message' or 'Address' */
#main-data-table td {
    white-space: normal;
    word-break: break-word;
    min-width: 100px;
}

#main-data-table th {
    white-space: nowrap;
}

.recurring-row {
    background: rgba(34, 197, 94, 0.08) !important;
}

/* Login Scoped Styles */
.login-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
    padding: 2rem;
}
.login-container {
    background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1); padding: 3rem;
    border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%; max-width: 420px; text-align: center;
}
.login-logo {
    font-size: 2.5rem; font-weight: 800; color: #fff; margin-bottom: 0.5rem;
    letter-spacing: -1px;
}
.form-group {
    text-align: left; margin-bottom: 1.5rem;
}
.form-group label {
    display: block; color: #94a3b8; font-size: 0.85rem; margin-bottom: 0.5rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.input-wrapper {
    position: relative; display: flex; align-items: center;
}
.input-wrapper i {
    position: absolute; left: 1rem; color: #64748b; font-size: 1rem;
}
.input-wrapper input {
    width: 100%; padding: 1rem 1rem 1rem 3rem; background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px;
    color: #fff; font-size: 1rem; transition: var(--transition);
}
.input-wrapper input:focus {
    outline: none; border-color: #38bdf8; background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}
.btn-login {
    width: 100%; padding: 1rem; margin-top: 1rem; border-radius: 12px;
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    color: #fff; font-weight: 700; font-size: 1rem; border: none;
    cursor: pointer; transition: var(--transition); display: flex;
    justify-content: center; align-items: center; gap: 0.8rem;
}
.btn-login:hover {
    transform: translateY(-2px); box-shadow: 0 10px 20px rgba(2, 132, 199, 0.3);
}
.btn-login:active { transform: translateY(0); }

.message {
    padding: 1rem; border-radius: 10px; margin-top: 1.5rem; font-size: 0.9rem;
    display: none;
}
.error-message {
    display: block; background: rgba(239, 68, 68, 0.1); color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.success-message {
    display: block; background: rgba(34, 197, 94, 0.1); color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Fix browser autofill */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0px 1000px #0f172a inset;
    transition: background-color 5000s ease-in-out 0s;
}
