/* ========================================
   APUESTAS LEGALES MÉXICO - PREMIUM STYLES
   ======================================== */

/* ========== CSS VARIABLES ========== */
:root {
    /* Mexican Flag Colors + Premium Accents */
    --primary-green: #006847;
    --primary-white: #FFFFFF;
    --primary-red: #CE1126;

    /* Modern Color Palette */
    --accent-gold: #FFD700;
    --accent-emerald: #10B981;
    --accent-ruby: #EF4444;

    /* Neutral Grays */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: var(--gray-50);
    --bg-dark: var(--gray-900);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-emerald) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-gold) 0%, #FFA500 100%);
    --gradient-hero: linear-gradient(135deg, rgba(0, 104, 71, 0.95) 0%, rgba(16, 185, 129, 0.9) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Link Normalization (Prevent Blue Links) */
a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

a:hover {
    color: var(--primary-green);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ========== ACCESSIBILITY ========== */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-green);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    z-index: 9999;
    border-radius: 0 0 var(--radius-md) 0;
    font-weight: 600;
}

.skip-to-content:focus {
    top: 0;
}

/* ========== UTILITY CLASSES ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.gradient-text {
    background-image: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-weight: 800;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ========== HEADER / NAVIGATION ========== */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--gray-100);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    color: var(--text-primary);
}

.logo-accent {
    color: var(--primary-green);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--spacing-xs);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-green);
    background: var(--gray-100);
}

/* Mobile Menu */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition-base);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        width: 100%;
        padding: var(--spacing-sm);
    }

    /* Touch targets: min 44x44px — mobile accessibility */
    .menu-toggle {
        min-height: 44px;
        min-width: 44px;
        justify-content: center;
    }
    .nav-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* ========== HERO SECTION ========== */
.hero {
    background: var(--gradient-hero);
    color: white;
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

/* Search Box */
.search-container {
    margin-bottom: var(--spacing-xl);
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    font-size: 1.5rem;
    margin-right: var(--spacing-sm);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: var(--spacing-xs);
}

/* ========== SECTIONS ========== */
.section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.section-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* ========== OPERATORS GRID ========== */
.operators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.operator-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.operator-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-green);
}

.operator-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-sm);
}

.operator-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.operator-rating {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
}

.operator-license {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.operator-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.feature-tag {
    background: var(--gray-100);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.operator-cta {
    display: block;
    text-align: center;
    background: var(--primary-green);
    color: white;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-top: var(--spacing-sm);
}

.operator-cta:hover {
    background: var(--accent-emerald);
    color: white;
}

/* ========== FEATURES GRID ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    text-align: center;
    padding: var(--spacing-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.feature-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== QUICK LINKS ========== */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.quick-link-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    border: 2px solid transparent;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-green);
}

.quick-link-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.quick-link-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.quick-link-text {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.quick-link-arrow {
    color: var(--primary-green);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ========== TRUST SECTION ========== */
.trust-section {
    background: var(--gray-50);
}

.trust-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.trust-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.trust-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.badge-icon {
    color: var(--accent-emerald);
    font-size: 1.5rem;
    font-weight: 700;
}

.badge-text {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--bg-dark);
    color: var(--gray-300);
    padding: var(--spacing-2xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-title {
    color: white;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.footer-text {
    line-height: 1.7;
    color: var(--gray-400);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: var(--gray-400);
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--accent-emerald);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: var(--spacing-md);
    text-align: center;
}

.footer-copyright {
    color: var(--gray-500);
    margin-bottom: var(--spacing-xs);
}

.footer-disclaimer {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero {
        padding: var(--spacing-xl) 0;
    }

    .hero-stats {
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: 2rem;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

    .operators-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   MOBILE ENHANCEMENTS (min-height touch targets)
   ======================================== */
html,
body {
    overflow-x: hidden;
}

body {
    -webkit-tap-highlight-color: transparent;
}

.btn,
.operator-cta,
.nav-link,


.menu-toggle {
    min-width: 44px;
    border-radius: var(--radius-sm);
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .operators-grid {
        gap: var(--spacing-sm);
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
    }
}

/* ========================================
   ACCESSIBILITY — Focus Visible
   ======================================== */
*:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

.nav-link:focus-visible,
.operator-cta:focus-visible,
.footer-links a:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 3px;
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in,
    .fade-in-up {
        animation: none;
    }
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */
@media (forced-colors: active) {

    .btn,
    .operator-cta {
        border: 2px solid ButtonText;
    }

    .operator-card {
        border: 1px solid ButtonText;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .header,
    .hero,
    .menu-toggle,
    .trust-section,
    footer {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.75em;
        color: #666;
    }

    .operator-card {
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}
/* === Refresh meta === */
.refresh-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .4rem;
    flex-wrap: wrap;
}
