:root {
    --primary: #ffcc00;
    --primary-dark: #b89200;
    --background: #0a0a0b;
    --surface: #121214;
    --accent: #ff4d4d;
    --text: #e1e1e6;
    --text-muted: #a8a8b3;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo a {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary);
}

.btn-admin {
    padding: 8px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text) !important;
}

.btn-admin:hover {
    background: var(--primary);
    color: var(--background) !important;
}

/* Hero Section */
.hero {
    height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider {
    position: relative;
    height: 600px;
    width: 100%;
    z-index: 5;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 2;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.77,0,0.175,1), opacity 0.4s ease;
}

.slide.active {
    opacity: 1;
    pointer-events: all;
    z-index: 5;
    transform: translateX(0);
}
.slide.slide-out {
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
}

.slider-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--glass-border);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.nav-dot:hover {
    background: var(--primary);
}

.nav-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn-primary {
    display: inline-block;
    padding: 16px 32px;
    background: var(--primary);
    color: var(--background);
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(255, 204, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 204, 0, 0.4);
}

/* Results Section */
.latest-results {
    padding: 100px 0;
    background: var(--surface);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 800;
}

.section-title p {
    color: var(--text-muted);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.result-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s, border-color 0.3s;
    backdrop-filter: blur(5px);
}

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

.result-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.result-date {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.result-actions {
    display: flex;
    gap: 15px;
}

.btn-small {
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
    text-align: center;
}

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

.btn-pdf {
    background: var(--glass);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

/* Footer */
.main-footer {
    padding: 100px 0 40px;
    background: #080809;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

.footer-info h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--primary);
    letter-spacing: 1px;
}

.footer-info p {
    color: var(--text-muted);
    max-width: 450px;
    font-size: 16px;
    line-height: 1.8;
}

.footer-links h4 {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    text-decoration: none;
    color: var(--text-muted);
    transition: all 0.3s;
    font-size: 15px;
}

.footer-links ul li a:hover {
    color: var(--primary);
    padding-left: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 14px;
}

/* Mobile Bottom Nav (hidden on desktop) */
.mobile-bottom-nav { display: none; }

/* =============================================
   COMPREHENSIVE MOBILE RESPONSIVE SYSTEM
   ============================================= */

/* Hamburger Button (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Tablet: 1024px ── */
@media (max-width: 1024px) {
    .hero h1 { font-size: 52px; }
    .section-title h2 { font-size: 36px; }
    .results-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .footer-grid { gap: 40px; }
}

/* ── Mobile: 768px ── */
@media (max-width: 768px) {

    /* --- Global --- */
    .container { padding: 0 16px; }

    /* Hide desktop footer, show mobile nav */
    .desktop-footer { display: none; }
    main { padding-bottom: 70px; } /* clear space above bottom nav */

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2000;
        background: rgba(10,10,11,0.96);
        backdrop-filter: blur(16px);
        border-top: 1px solid var(--glass-border);
        height: 62px;
        align-items: stretch;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mob-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--text-muted);
        transition: color 0.2s;
        padding: 6px 0;
    }
    .mob-nav-item.mob-active { color: var(--primary); }
    .mob-icon { font-size: 20px; line-height: 1; }
    .mob-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
    .mob-nav-item:active { background: rgba(255,204,0,0.08); }

    /* --- Header / Nav --- */
    .hamburger { display: flex; }

    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: #0a0a0b;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 36px;
        z-index: 9000;
        margin: 0;
        padding: 0;
    }
    nav ul.open { display: flex; }
    .hamburger { z-index: 9100; position: relative; }
    nav ul li a { font-size: 22px; font-weight: 800; color: var(--text); }
    nav ul li a:hover, nav ul li a.nav-active { color: var(--primary); }
    nav ul li a.btn-logout { color: #e74c3c !important; }

    /* --- Hero --- */
    .hero { height: 280px; min-height: unset; padding: 0; }
    .hero-slider { height: 280px; min-height: unset; }
    .slide { position: absolute; min-height: unset; height: 100%; padding: 0; }
    .hero-content { display: none; }
    .nav-dot { width: 7px; height: 7px; }
    .slider-nav { bottom: 10px; gap: 8px; }

    .hero h1 { font-size: 38px; line-height: 1.15; }
    .hero p { font-size: 16px; }
    .btn-primary { padding: 14px 24px; font-size: 15px; }
    .hero-content { text-align: left; }
    .slider-nav { bottom: 20px; }

    /* --- Results --- */
    .latest-results { padding: 60px 0; }
    .section-title { margin-bottom: 40px; }
    .section-title h2 { font-size: 28px; }
    .results-grid { grid-template-columns: 1fr; gap: 20px; }

    /* --- Features section (homepage 2-col → 1-col) --- */
    .features-section .container { grid-template-columns: 1fr !important; gap: 30px !important; }
    .features-section .container > div:first-child { order: 2; }
    .features-section .container > div:last-child { order: 1; }

    /* --- Blog Grid --- */
    .latest-blogs-section .container > div { grid-template-columns: 1fr !important; }

    /* --- CTA --- */
    .cta-section { padding: 60px 0 !important; }
    .cta-section h2 { font-size: 30px !important; }
    .cta-section p { font-size: 16px !important; }
    .cta-section div[style*="display: flex"] { flex-direction: column; align-items: center; }

    /* --- Footer --- */
    .main-footer { padding: 60px 0 30px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; margin-bottom: 40px; }
    .footer-info p { max-width: 100%; }

    /* --- Contact Page --- */
    .page-content .container > div[style*="display: grid"] { grid-template-columns: 1fr !important; gap: 30px !important; }

    /* --- Admin Panel --- */
    .dashboard-container { padding: 15px !important; }
    .dash-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    table { font-size: 13px; }
    th, td { padding: 10px 8px; }
    /* Hide less important admin table columns on mobile */
    .table-hide-mobile { display: none; }
}

/* ── Small Mobile: 480px ── */
@media (max-width: 480px) {
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 14px; }
    .section-title h2 { font-size: 24px; }
    .results-grid { grid-template-columns: 1fr; }
    .result-card h3 { font-size: 18px; }
    .btn-small { font-size: 12px !important; padding: 10px 8px !important; }

    /* Blog page card */
    .latest-blogs-section div[style*="22px"] { font-size: 17px !important; }

    /* Admin: stack top bar */
    .dashboard-container > div[style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
}
