:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --background: #f8f9fa;
    --surface: #ffffff;
    --accent: #ff4d4d;
    --text: #121214;
    --text-muted: #495057;
    --glass: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Poppins', 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(235, 245, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

header 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);
}

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

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

header 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: #121214 !important;
}

/* Hero Section */
.hero {
    aspect-ratio: 2000 / 600;
    width: 100%;
    height: auto;
    max-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

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

.hero-slider {
    position: relative;
    width: 100%;
    height: 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, #111 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    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: #121214;
    text-decoration: none;
    font-weight: 700;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.2);
}

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

/* --- Winners Section --- */
.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}
.winner-card {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}
.winner-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.winner-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.icon-gold { background: #fff3e0; color: #e67e22; }
.icon-silver { background: #f1f2f6; color: #95a5a6; }
.icon-bronze { background: #fdf2e9; color: #d35400; }
.icon-blue { background: #e3f2fd; color: #2980b9; }
.icon-pink { background: #fce4ec; color: #e84393; }

.winner-ticket {
    background: #f9ebeb;
    color: #4a235a;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.winner-name {
    font-weight: 700;
    font-size: 14px;
    color: #2c3e50;
}
.winner-phone {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 3px;
}

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

/* --- Offers Section --- */
.offers-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 20px;
    padding-bottom: 20px;
    scrollbar-width: none; /* Firefox */
}
.offers-carousel::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}
.offer-card {
    flex: 0 0 calc(25% - 15px); /* 4 items on desktop (20px gap: 3 gaps = 60px / 4 = 15px) */
    scroll-snap-align: start;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.offer-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
}
.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}
.carousel-dot.active {
    background: var(--primary);
    width: 20px;
    border-radius: 10px;
}
.slider-btn {
    position: absolute;
    top: calc(50% - 15px);
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #121214;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: 0.3s;
}
.slider-btn:hover {
    background: var(--primary);
    color: #000;
}
.prev-btn {
    left: 10px;
}
.next-btn {
    right: 10px;
}

.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(2, 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: #121214;
}

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

/* Footer */
.main-footer {
    padding: 80px 0 30px;
    background: #0f172a; /* Dark premium blue */
    color: #cbd5e1;
    border-top: 4px solid var(--primary);
}

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

.footer-info h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 20px;
    color: #ffffff;
    letter-spacing: 1px;
}

.footer-info p {
    color: #94a3b8;
    max-width: 400px;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-radius: 50%;
    transition: 0.3s;
    font-size: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

.social-links a:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.footer-links h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

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

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

.footer-links ul li a {
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    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; }
    .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(255,255,255,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; }

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

    /* --- Hero --- */
    .hero { min-height: unset; padding: 0; }
    .hero-slider { min-height: unset; height: 100%; }
    .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; }
    
    /* --- Offers Carousel --- */
    .offer-card {
        flex: 0 0 calc(50% - 10px); /* 2 items on mobile (20px gap / 2 = 10px) */
    }

    /* --- 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;
    }
}

