/*
 * CasinoAudits.com - Light Audit Theme
 * TailwindCSS-based design system
 */

/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
    /* Primary - Deep Blue */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Accent - Amber/Gold */
    --accent-400: #fbbf24;
    --accent-500: #f59e0b;
    --accent-600: #d97706;

    /* Backgrounds */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;

    /* Status Colors */
    --status-safe: #16a34a;
    --status-caution: #ea580c;
    --status-danger: #dc2626;
    --status-info: #2563eb;

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
}

/* ========================================
   BASE STYLES
   ======================================== */
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   FLOATING BACKGROUND CONTAINER
   ======================================== */
#audit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.audit-icon {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    font-size: 24px;
    color: var(--primary-200);
    filter: blur(0.3px);
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg);
    }
    5% {
        opacity: 0.15;
    }
    95% {
        opacity: 0.15;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) rotate(360deg);
    }
}

/* ========================================
   GRID OVERLAY
   ======================================== */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav-main {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-700);
}

.nav-logo span {
    color: var(--accent-500);
}

.nav-link {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-600);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, var(--bg-elevated) 50%, #ffffff 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
    animation: heroGlow 15s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, -5%); }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--primary-700);
    font-weight: 500;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

/* Casino Card */
.casino-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.casino-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.casino-card-header {
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
    border-bottom: 1px solid #e2e8f0;
}

.casino-card-body {
    padding: 24px;
}

/* ========================================
   RATING SYSTEM
   ======================================== */
.rating-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    position: relative;
    border: 4px solid;
}

.rating-safe {
    background: #f0fdf4;
    color: var(--status-safe);
    border-color: var(--status-safe);
}
.rating-caution {
    background: #fff7ed;
    color: var(--status-caution);
    border-color: var(--status-caution);
}
.rating-danger {
    background: #fef2f2;
    color: var(--status-danger);
    border-color: var(--status-danger);
}

.rating-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    transition: width 1s ease-out;
}

/* ========================================
   BADGES & TAGS
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-safe {
    background: #dcfce7;
    color: var(--status-safe);
}

.badge-caution {
    background: #ffedd5;
    color: var(--status-caution);
}

.badge-danger {
    background: #fee2e2;
    color: var(--status-danger);
}

.badge-info {
    background: #dbeafe;
    color: var(--status-info);
}

/* ========================================
   AUDIT SECTION
   ======================================== */
.audit-box {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.audit-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-500), var(--primary-600));
}

.audit-step {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
}

.audit-step-number {
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary-500);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    background: var(--primary-600);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-600);
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--primary-300);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--primary-50);
    border-color: var(--primary-500);
}

.btn-cta {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-600) 100%);
    color: white;
    padding: 16px 36px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.45);
}

/* ========================================
   STAT CARDS
   ======================================== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
}

.stat-number {
    font-size: clamp(1.125rem, 5vw, 2rem);
    font-weight: 800;
    color: var(--primary-600);
    line-height: 1.1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}

/* ========================================
   METHODOLOGY GRID
   ======================================== */
.method-card {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.method-card:hover {
    border-color: var(--primary-300);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.method-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

/* ========================================
   CATEGORY CARDS
   ======================================== */
.category-card {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-400);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.15);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

/* ========================================
   PROS & CONS
   ======================================== */
.pros-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 24px;
}

.cons-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 24px;
}

.pros-box li::before {
    content: '✓';
    color: var(--status-safe);
    font-weight: bold;
    margin-right: 10px;
}

.cons-box li::before {
    content: '✗';
    color: var(--status-danger);
    font-weight: bold;
    margin-right: 10px;
}

/* ========================================
   FAQ ACCORDION
   ======================================== */
.faq-item {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--bg-elevated);
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    line-height: 1.7;
    display: none;
}

.faq-answer.active {
    display: block;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid #e2e8f0;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--primary-600);
}

/* ========================================
   RESPONSIBLE GAMBLING
   ======================================== */
.responsible-gambling {
    background: #fffbeb;
    border-top: 3px solid var(--accent-500);
    padding: 24px;
}

/* ========================================
   QUICK NAV (Review Pages)
   ======================================== */
.quick-nav {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.quick-nav-link {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    color: var(--primary-700);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.quick-nav-link:hover {
    background: var(--primary-500);
    color: white;
    border-color: var(--primary-500);
}

/* ========================================
   TABLES
   ======================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.data-table th {
    background: var(--primary-600);
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: var(--bg-elevated);
}

/* ========================================
   USER REVIEW CARDS
   ======================================== */
.user-review {
    background: var(--bg-card);
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary-500);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.review-stars {
    color: var(--accent-500);
}

.review-source {
    display: inline-block;
    background: var(--primary-600);
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========================================
   STICKY CTA
   ======================================== */
.sticky-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stagger-children > * {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.8s; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .quick-nav {
        position: static;
    }

    .sticky-cta {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .sticky-cta .btn-cta {
        width: 100%;
        justify-content: center;
    }
}


/* ========================================
   MOBILE NAVIGATION
   ======================================== */
.hamburger-line {
    transition: all 0.3s ease;
}

#mobile-menu-panel {
    overflow-y: auto;
}

/* ========================================
   ENHANCED MOBILE RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
    /* Hero */
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    /* Nav padding */
    .nav-main {
        padding: 12px 16px;
    }

    /* Stat cards — tighten padding so numbers like "100K+" don't get clipped */
    .stat-card {
        padding: 14px 8px;
    }

    .stat-label {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        margin-top: 4px;
    }

    /* Cards */
    .casino-card-header,
    .casino-card-body {
        padding: 16px;
    }

    /* Rating circles */
    .rating-circle {
        width: 64px;
        height: 64px;
        font-size: 1.25rem;
    }

    /* Method cards */
    .method-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* Category cards */
    .category-icon {
        font-size: 2rem;
    }

    /* Buttons */
    .btn-cta {
        padding: 14px 24px;
        font-size: 0.95rem;
    }

    /* Tables */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Quick nav */
    .quick-nav {
        position: static;
        margin-bottom: 16px;
    }

    .quick-nav-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Sticky CTA */
    .sticky-cta {
        bottom: 12px;
        right: 12px;
        left: 12px;
    }

    /* Footer */
    .footer {
        padding: 40px 16px;
    }

    /* Pros/Cons */
    .pros-box,
    .cons-box {
        padding: 16px;
    }

    /* User reviews */
    .user-review {
        padding: 16px;
    }

    /* Audit steps */
    .audit-step {
        padding: 16px;
    }

    .audit-step-number {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* FAQ */
    .faq-question {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .faq-answer {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    /* Responsible gambling */
    .responsible-gambling {
        padding: 20px 16px;
        font-size: 0.9rem;
    }

    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* Touch targets - ensure minimum 44px */
@media (pointer: coarse) {
    .nav-link,
    .quick-nav-link,
    .faq-question {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}
