/* Reset y Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #16a34a;
    --accent-color: #fbbf24;
    --text-dark: #111827;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
}

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

/* Header y Navegación */
.main-header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-left: 10px;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.1);
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover > a::after {
    transform: rotate(180deg);
}

.nav-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.nav-dropdown:hover .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-submenu li {
    list-style: none;
}

.nav-submenu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
}

.nav-submenu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 25px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    margin-top: 70px;
    padding: 60px 0;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Quiniela Demo */
.quiniela-demo {
    background-color: #fef3c7;
    border: 2px solid #d97706;
    border-radius: 8px;
    padding: 30px;
    margin: 30px auto 20px auto;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    position: relative;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(217, 119, 6, 0.03) 10px,
        rgba(217, 119, 6, 0.03) 20px
    );
}

.quiniela-header {
    text-align: center;
    margin-bottom: 20px;
}

.quiniela-header h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.quiniela-table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    overflow: hidden;
}

.quiniela-table thead {
    background-color: #d97706;
    color: white;
}

.quiniela-table th {
    padding: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.partido-col {
    text-align: left;
    width: 60%;
}

.resultado-col {
    width: 13.33%;
    text-align: center;
}

.quiniela-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.quiniela-table tbody tr:last-child {
    border-bottom: none;
}

.quiniela-table td {
    padding: 8px 10px;
}

.partido {
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 500;
}

.pleno-15 {
    background-color: #fee2e2;
}

.pleno-15 .partido::before {
    content: "P15: ";
    font-weight: 700;
    color: #dc2626;
}

.resultado {
    text-align: center;
    position: relative;
}

.mark {
    display: inline-block;
    width: 25px;
    height: 25px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.mark.selected {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    font-weight: bold;
    opacity: 0;
    animation: fadeInMark 0.5s ease forwards;
}

@keyframes fadeInMark {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Área de Animaciones Unificada */
.area-animaciones {
    text-align: center;
    margin-top: 15px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* IA Calculando */
.ia-calculando {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ia-calculando.show {
    opacity: 1;
}

.calculando-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    height: 50px;
    box-sizing: border-box;
}

.calculando-icono {
    font-size: 1.1rem;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.calculando-texto {
    font-size: 0.9rem;
}

.puntos-animados {
    display: flex;
    gap: 2px;
}

.puntos-animados span {
    animation: puntosAnimacion 1.5s infinite;
    font-size: 1.2rem;
    font-weight: bold;
}

.puntos-animados span:nth-child(1) {
    animation-delay: 0s;
}

.puntos-animados span:nth-child(2) {
    animation-delay: 0.5s;
}

.puntos-animados span:nth-child(3) {
    animation-delay: 1s;
}

@keyframes puntosAnimacion {
    0%, 50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    25% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Simulador de Goles */
.simulador-goles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.simulador-goles.show {
    opacity: 1;
}

.gol-mensaje {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    height: 50px;
    box-sizing: border-box;
}

.gol-icono {
    font-size: 1.1rem;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.gol-texto {
    font-size: 0.9rem;
}

/* Escrutinio */
.escrutinio {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.escrutinio.show {
    opacity: 1;
}

.escrutinio-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    height: 50px;
    box-sizing: border-box;
}

.escrutinio-icono {
    font-size: 1.1rem;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0.3;
    }
}

.escrutinio-texto {
    font-size: 0.9rem;
}

/* Resultado Integrado */
.resultado-integrado {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-radius: 6px;
    padding: 10px 16px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    height: 50px;
    box-sizing: border-box;
}

.resultado-integrado.show {
    opacity: 1;
}

.resultado-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
}

.iconos-animados {
    display: flex;
    gap: 6px;
}

.icono-bounce {
    font-size: 1.3rem;
    display: inline-block;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.resultado-texto p {
    color: white;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 600;
}

/* Hero CTA */
.hero-cta {
    margin-top: 40px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.cta-note {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Sección Análisis Semanal */
.analisis-semanal {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.analisis-semanal h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.analisis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.analisis-card {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.analisis-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.analisis-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.analisis-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Sección Por Qué IA */
.por-que-ia {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.por-que-ia h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.ventajas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.ventaja {
    text-align: center;
}

.ventaja-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.ventaja h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.ventaja p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Sección Próximamente */
.proximamente {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.proximamente h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.proximamente-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-preview {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.feature-preview h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-preview p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Newsletter */
.newsletter-signup {
    background-color: var(--primary-color);
    color: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-signup h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.newsletter-signup p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
}

.newsletter-form .btn {
    background-color: white;
    color: var(--primary-color);
}

.newsletter-form .btn:hover {
    background-color: var(--bg-light);
}

/* Checkbox de Consentimiento */
.consent-checkbox {
    margin-top: 15px;
    text-align: left;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    min-width: 18px;
    height: 18px;
    background-color: white;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    display: block;
}

.consent-text {
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
}

.consent-text a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.consent-text a:hover {
    color: #fbbf24;
}

/* Footer */
.main-footer {
    background-color: var(--text-dark);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-column p {
    color: #d1d5db;
    line-height: 1.8;
}

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

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Banner de Cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 20px;
    z-index: 10000;
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 0;
    line-height: 1.5;
}

.cookie-text p:first-child {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.cookie-text p:last-child {
    font-size: 0.9rem;
    opacity: 0.85;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-accept {
    background-color: var(--primary-color);
    color: white;
}

.cookie-accept:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cookie-reject {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-reject:hover {
    background-color: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: block;
    }
    
    /* Mobile dropdown styles */
    .nav-dropdown > a::after {
        content: '▼';
        font-size: 0.7rem;
        margin-left: 8px;
        transition: transform 0.3s ease;
    }
    
    .nav-submenu {
        position: static;
        background-color: rgba(248, 250, 252, 0.95);
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-left: 20px;
        margin-top: 10px;
        display: none;
    }
    
    .nav-dropdown.active .nav-submenu {
        display: block;
    }
    
    .nav-dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    .nav-submenu a {
        padding: 10px 15px;
        font-size: 0.9rem;
        border-radius: 4px;
        margin: 2px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .quiniela-demo {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .partido {
        font-size: 0.75rem;
    }
    
    .mark {
        width: 20px;
        height: 20px;
    }
    
    .area-animaciones {
        height: 45px;
        margin-top: 10px;
    }
    
    .gol-mensaje,
    .escrutinio-content,
    .resultado-integrado,
    .calculando-content {
        height: 45px;
        padding: 8px 12px;
    }
    
    .gol-texto,
    .escrutinio-texto,
    .calculando-texto {
        font-size: 0.8rem;
    }
    
    .puntos-animados span {
        font-size: 1rem;
    }
    
    .resultado-content {
        gap: 8px;
    }
    
    .icono-bounce {
        font-size: 1.1rem;
    }
    
    .resultado-texto p {
        font-size: 0.8rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input,
    .newsletter-form .btn {
        width: 100%;
    }
    
    .analisis-grid,
    .ventajas-grid,
    .proximamente-content {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Cookie banner móvil */
    .cookie-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 12px;
    }
    
    .cookie-text p:first-child {
        font-size: 1rem;
    }
    
    .cookie-text p:last-child {
        font-size: 0.85rem;
    }
}