/* =============================================================
   home.css — Mobile-first responsive
   Breakpoints: 480 | 768 | 992 | 1200
   ============================================================= */

/* ---------- Variables ---------- */
:root {
    --primary:     #094c79;
    --secondary:   #0b1138;
    --accent:      #ffd700;
    --white:       #ffffff;
    --text-dark:   #2d3436;
    --text-muted:  #4f5d75;
    --bg-light:    #f9fbfd;
    --shadow-sm:   0 3px 10px rgba(9, 76, 121, 0.08);
    --shadow-md:   0 8px 24px rgba(9, 76, 121, 0.12);
    --shadow-lg:   0 15px 40px rgba(9, 76, 121, 0.16);
    --radius-sm:   10px;
    --radius-md:   16px;
    --radius-lg:   24px;
    --transition:  all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

img { max-width: 100%; display: block; }

/* =============================================================
   1. HERO
   ============================================================= */
.hero-section {
    position: relative;
    min-height: 100svh;       /* safe viewport height */
    min-height: 600px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(145deg, rgba(9,76,121,0.93) 0%, rgba(11,17,56,0.92) 100%),
        url("../img/viejos-crack-logo.8121a6446660.png") center / cover no-repeat;
    overflow: hidden;
}

.hero-video-container {
    position: relative;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.55) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 1.25rem 4rem;
    text-align: center;
}

/* --- Títulos hero (móvil primero) --- */
.hero-title {
    font-size: clamp(1.8rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--white);
    text-shadow: 0 4px 18px rgba(0,0,0,0.35);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 3.5vw, 1.8rem);
    color: rgba(255,255,255,0.9);
    font-weight: 300;
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* --- Resolución semanal info --- */
.resolucion-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin: 0.6rem 0 0.8rem;
}

.resolucion-fecha {
    font-size: 0.95rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.resolucion-fecha i { margin-right: 0.35rem; }

.resolucion-titulo {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

/* --- CTA Buttons --- */
.cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 280px;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--accent);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    color: var(--secondary);
    background: var(--accent);
}

.cta-btn.outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.7);
}

.cta-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    transform: translateX(-105%);
    transition: var(--transition);
}

.cta-btn:hover::after  { transform: translateX(0); }
.cta-btn:active        { transform: scale(0.97); }

/* --- Variante pequeña (documentos) --- */
.cta-btn--sm {
    padding: 0.5rem 1.1rem;
    font-size: 0.78rem;
    letter-spacing: 0.4px;
    text-transform: none;
    border-width: 1.5px;
    border-color: rgba(255,255,255,0.45);
    font-weight: 600;
}

/* --- Variante documentos (Bases / Reglamento) --- */
.cta-btn--doc {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.75);
    padding: 0.72rem 1.6rem;
    font-size: 0.86rem;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.cta-btn--doc:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

/* ---------- Responsive hero ---------- */
@media (min-width: 480px) {
    .cta-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .cta-btn { width: auto; }
}

@media (min-width: 768px) {
    .hero-content { padding: 6rem 2rem 5rem; }
}

@media (min-width: 1200px) {
    .hero-content { text-align: left; }
    .cta-buttons  { justify-content: flex-start; }
    .resolucion-info { align-items: flex-start; }
}


/* =============================================================
   2. STATS
   ============================================================= */
.stats-section {
    padding: 3.5rem 1.25rem;
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

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

.stat-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    color: var(--white);
    font-size: 1.8rem;
}

.stat-content h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

/* ---------- Responsive stats ---------- */
@media (min-width: 576px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-card  { flex-direction: column; text-align: center; border-left: none; border-top: 4px solid var(--primary); }
    .stat-icon  { width: 70px; height: 70px; }
}

@media (min-width: 992px) {
    .stats-section { padding: 5rem 2rem; }
    .stat-icon      { width: 76px; height: 76px; }
    .stat-icon i    { font-size: 2rem; }
}


/* =============================================================
   3. INFO SECTION
   ============================================================= */
.info-section {
    padding: 3.5rem 1.25rem;
    background: var(--bg-light);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.info-content h2 {
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    color: var(--secondary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.info-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.features-list li:hover { transform: translateX(6px); }

.features-list li i {
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.info-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: var(--transition);
}

.info-image:hover img { transform: scale(1.04); }

/* ---------- Responsive info ---------- */
@media (min-width: 768px) {
    .info-image img { height: 380px; }
}

@media (min-width: 992px) {
    .info-section   { padding: 6rem 2rem; }
    .info-grid      { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
    .info-image img { height: 460px; }
}


/* =============================================================
   4. ÚLTIMOS RESULTADOS (CARRUSEL)
   ============================================================= */
.results-section {
    padding: 3.5rem 0;
    background: var(--white);
}

.results-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.results-header h2 {
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: var(--primary);
    margin: 0;
}

/* Controles carrusel en línea junto al título */
.right-controls {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-shrink: 0;
}

.carousel-prev,
.carousel-next {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex-shrink: 0;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: var(--secondary);
    transform: scale(1.08);
}

.carousel-prev:active,
.carousel-next:active { transform: scale(0.95); }

/* Scroll container */
.results-carousel-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;   /* Firefox */
    padding-bottom: 0.5rem;
}

.results-carousel-wrapper::-webkit-scrollbar { display: none; }

.results-carousel {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0.25rem 0.5rem;
}

/* --- Result card --- */
.result-card {
    flex: 0 0 88vw;             /* Móvil: casi full width */
    max-width: 340px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.match-serie {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--secondary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.match-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #999;
}

.match-date::after { content: ' ·'; }

.teams-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    gap: 0.35rem;
}

.team img,
.logo-placeholder {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #f0f4f8;
}

.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder i {
    font-size: 1.4rem;
    color: #bbb;
}

.team-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: var(--secondary);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    min-width: 64px;
}

.score {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.separator {
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
}

/* ---------- Responsive carrusel ---------- */
@media (min-width: 480px) {
    .result-card { flex: 0 0 300px; }
}

@media (min-width: 768px) {
    .results-section { padding: 4.5rem 0; }
    .result-card     { flex: 0 0 320px; max-width: 340px; }
}

@media (min-width: 992px) {
    .results-section { padding: 5rem 0; }
}


/* =============================================================
   5. SPONSORS
   ============================================================= */
.sponsors-section {
    padding: 3rem 1.25rem;
    background: var(--bg-light);
}

.sponsors-section h3 {
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.sponsors-grid img {
    height: 50px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: var(--transition);
}

.sponsors-grid img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-4px);
}

@media (min-width: 768px) {
    .sponsors-section { padding: 4rem 2rem; }
    .sponsors-grid img { height: 70px; }
}


/* =============================================================
   7. ANIMACIONES
   ============================================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
