/**
 * CSS Variables & Theme
 * Paleta: #FFFFFF, #E8F5E9, #B2DFDB, #80CBC4, #4DB6AC, #26A69A, #FFF9C4, #E3F2FD.
 * Fontes: Inter (Cuerpo), Outfit (Títulos)
 */
 :root {
    /* Colors */
    --clr-white: #FFFFFF;
    --clr-light: #E8F5E9; /* Verde extra claro - BG */
    --clr-mint: #B2DFDB; /* Menta clara */
    --clr-mint-dark: #80CBC4;
    --clr-teal-light: #4DB6AC;
    --clr-teal: #26A69A; /* Verde esmeralda central */
    --clr-teal-dark: #00796B;
    --clr-primary: #00796B;
    
    --clr-accent-yellow: #FFF9C4;
    --clr-accent-blue: #E3F2FD;
    --clr-danger: #e53935;

    --clr-text: #2c3e50;
    --clr-text-light: #607d8b;

    /* Fonts */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Shadows & Transitions */
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 121, 107, 0.15);
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==================================
   RESETS & GLOBAL
   ================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--clr-text);
    background-color: var(--clr-white);
    background-image: linear-gradient(rgba(248, 252, 251, 0.65), rgba(255, 255, 255, 0.70)), url('Fotos/Ecyd1.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--clr-teal-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.bg-light {
    background-color: rgba(232, 245, 233, 0.25);
    backdrop-filter: blur(2px);
}

.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--clr-teal);
    border-radius: 2px;
}

/* ==================================
   BUTTONS
   ================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-teal-light) 0%, var(--clr-teal) 100%);
    color: var(--clr-white);
    box-shadow: 0 4px 15px rgba(38, 166, 154, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(38, 166, 154, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--clr-teal);
    color: var(--clr-teal);
}

.btn-outline:hover {
    background-color: var(--clr-teal);
    color: var(--clr-white);
}

/* ==================================
   NAVIGATION (Glassmorphism)
   ================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    /* Glassmorphism base */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 65px;
    width: 55px;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--clr-teal-dark);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--clr-teal);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--clr-teal);
}

.nav-btn {
    background-color: var(--clr-teal);
    color: var(--clr-white);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(38, 166, 154, 0.3);
}

.nav-btn:hover {
    background-color: var(--clr-teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(38, 166, 154, 0.4);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--clr-teal-dark);
    cursor: pointer;
}

/* ==================================
   SPA ROUTING CSS (Views)
   ================================== */
.view {
    display: none;
    opacity: 0;
    animation: fadeIn var(--transition-smooth) forwards;
    padding-top: 80px; /* Offset for fixed navbar */
    min-height: calc(100vh - 80px);
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================
   HERO SECTION (Inicio)
   ================================== */
.hero {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: var(--clr-white);
    background-color: var(--clr-teal-dark); /* Color de fondo por si hay transparencia */
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%; /* Para efecto parallax */
    background-size: cover;
    background-position: center;
    z-index: -2;
    filter: brightness(0.85) saturate(1.2);
    opacity: 0.95;
    animation: panMove 30s ease-in-out infinite;
}

@keyframes panMove {
    0% { background-position: 50% 50%; }
    50% { background-position: 60% 60%; }
    100% { background-position: 50% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(38, 166, 154, 0.4) 0%, rgba(0, 121, 107, 0.8) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 249, 196, 0.2);
    border: 1px solid var(--clr-accent-yellow);
    color: var(--clr-accent-yellow);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 4rem;
    color: var(--clr-white);
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-slogan {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-actions .btn-outline {
    border-color: var(--clr-white);
    color: var(--clr-white);
}

.hero-actions .btn-outline:hover {
    background-color: var(--clr-white);
    color: var(--clr-teal-dark);
}

.hero-logos-container {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 3.5rem; 
    margin: 1.5rem 0 2.5rem;
}

.hero-logo-side {
    height: 160px; 
    width: 145px; 
    object-fit: contain; 
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.5));
}

.hero-logo-center {
    height: 250px; 
    width: auto; 
    object-fit: contain;
}

/* ==================================
   INFO TORNEO (Inicio)
   ================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--clr-white);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(178, 223, 219, 0.3);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--clr-teal-light), var(--clr-teal));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.info-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--clr-teal);
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background: var(--clr-light);
    border-radius: 50%;
}

.info-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* ==================================
   NOTICIAS (Inicio)
   ================================== */
#noticias-publico-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    justify-content: center;
}

.news-card {
    background: var(--clr-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid rgba(178, 223, 219, 0.3);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-date {
    font-size: 0.85rem;
    color: var(--clr-teal);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.news-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: var(--clr-teal-dark);
}

.news-card p {
    color: var(--clr-text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================================
   MULTIMEDIA PREVIEW (Inicio)
   ================================== */
/* ══════════════════════════════════════
   ACCIÓN EN VIVO — Carrouseles
══════════════════════════════════════ */
.av-row {
    margin-bottom: 2.5rem;
}

.av-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.av-row-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--clr-teal-dark);
}

.av-row-header h3 i {
    margin-right: 0.5rem;
    color: var(--clr-primary);
}

.av-arrows {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.av-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--clr-primary);
    background: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-primary);
    font-size: 0.82rem;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.av-btn:hover:not(:disabled) {
    background: var(--clr-primary);
    color: white;
}

.av-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.av-counter {
    font-size: 0.82rem;
    color: #888;
    min-width: 44px;
    text-align: center;
}

.av-viewport {
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
}

.av-track {
    display: flex;
    align-items: center; /* Evita que las fotos se estiren a lo alto */
    will-change: transform;
}

.av-slide {
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

/* Fotos */
.av-foto-slide {
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.av-foto-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.av-foto-slide:hover img {
    transform: scale(1.05);
}

/* Videos */
.av-video-slide {
    aspect-ratio: 16/9;
    position: relative;
    background: #000;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.av-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.av-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.2s;
}

.av-video-play i {
    font-size: 3rem;
    color: white;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}

.av-video-slide:hover .av-video-play {
    background: rgba(0,0,0,0.5);
}

.av-video-slide iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ==================================
   NOTICIAS (Inicio)
   ================================== */
/* ══════════════════════════════════════
   MODAL NOTICIA
══════════════════════════════════════ */
#noticia-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
    animation: nmFadeIn 0.22s ease;
}

@keyframes nmFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.nmodal-box {
    background: white;
    border-radius: 18px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    animation: nmSlideUp 0.25s ease;
}

@keyframes nmSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.nmodal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    transition: background 0.2s;
}

.nmodal-close:hover {
    background: rgba(0,0,0,0.7);
}

.nmodal-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px 18px 0 0;
}

.nmodal-body {
    padding: 1.5rem 1.75rem 2rem;
}

.nmodal-fecha {
    font-size: 0.85rem;
    color: var(--clr-teal);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.nmodal-titulo {
    font-size: 1.35rem;
    color: var(--clr-teal-dark);
    margin-bottom: 1rem;
    line-height: 1.35;
}

.nmodal-resumen {
    font-size: 1rem;
    color: #444;
    line-height: 1.75;
    white-space: pre-wrap;
}

/* Cards clicables */
.news-card {
    background: var(--clr-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.news-card:hover img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    font-size: 0.85rem;
    color: var(--clr-teal);
    font-weight: 600;
}

.news-content h3 {
    margin: 0.5rem 0 1rem;
    font-size: 1.2rem;
}

.news-link {
    display: inline-block;
    color: var(--clr-teal-dark);
    font-weight: 600;
    margin-top: 1rem;
}

.news-link::after {
    content: '\f105';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 5px;
    transition: margin-left 0.2s ease;
}

.news-link:hover::after {
    margin-left: 10px;
}

/* ==================================
   FOOTER
   ================================== */
.footer {
    background-color: var(--clr-teal-dark);
    color: var(--clr-mint);
    padding-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 70px;
    width: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.footer h4 {
    color: var(--clr-white);
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--clr-white);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--clr-white);
    transition: var(--transition-fast);
}

.social-icons a:hover {
    background: var(--clr-teal);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* ==================================
   ANIMATIONS & EFFECTS
   ================================== */

/* Scroll Reveal Initial states */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================================
   NOSOTROS (Vista)
   ================================== */
.nos-history {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.lead-text {
    font-size: 1.25rem;
    color: var(--clr-text-light);
    line-height: 1.8;
}

.counters-section {
    background: linear-gradient(135deg, var(--clr-teal-dark) 0%, var(--clr-teal) 100%);
    color: var(--clr-white);
    padding: 6rem 0;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.counter-value {
    display: inline-block;
    font-size: 4.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--clr-accent-yellow);
    margin-bottom: 0.5rem;
}

.counter-item p {
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================================
   REGLAMENTO (Vista Lightbox)
   ================================== */
.reglamento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.reglamento-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--clr-white);
    transition: var(--transition-smooth);
}

.reglamento-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.reglamento-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--clr-teal-light);
}

.reglamento-item:hover img {
    transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
    object-fit: contain;
}

@keyframes zoomIn {
    from {transform: scale(0.9);}
    to {transform: scale(1);}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2005;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--clr-accent-yellow);
    text-decoration: none;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 2001;
}

.lightbox-next {
    right: 2%;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 2%;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
    color: var(--clr-accent-yellow);
}

/* ==================================
   MULTIMEDIA (Vista)
   ================================== */
.mb-2 { margin-bottom: 2rem; color: var(--clr-teal-dark); }

.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.masonry-item::after { 
    content: '\f00e';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: var(--clr-white);
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 2;
}

.masonry-item:hover {
    box-shadow: var(--shadow-hover);
}

.masonry-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.masonry-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-grid .iframe-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: #000;
}

.video-grid .iframe-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ==================================
   CONTACTO (Vista)
   ================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info {
    padding-right: 2rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--clr-text-light);
    margin-bottom: 2rem;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-list i {
    color: var(--clr-teal);
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.contact-form-container {
    background: var(--clr-white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(178, 223, 219, 0.4);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--clr-teal-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
    background: #f9fbfb;
}

.form-control:focus {
    outline: none;
    border-color: var(--clr-teal);
    box-shadow: 0 0 0 3px rgba(38, 166, 154, 0.2);
}

.form-success-msg {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.4s ease;
}

/* ==================================
   TORNEOS (Vista)
   ================================== */
.torneos-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 4rem;
}

.torneos-sidebar {
    background: var(--clr-white);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 100px;
}

.torneos-sidebar h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--clr-light);
}

.torneo-btn {
    width: 100%;
    text-align: left;
    padding: 1rem;
    background: transparent;
    border: none;
    font-weight: 600;
    color: var(--clr-text);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.torneo-btn:hover, .torneo-btn.active {
    background: var(--clr-teal-light);
    color: var(--clr-white);
}

.torneo-submenu {
    padding-left: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 2px solid var(--clr-light);
    display: none;
}

.submenu-title {
    font-size: 0.85rem;
    color: var(--clr-text-light);
    font-weight: 700;
    text-transform: uppercase;
    margin: 1rem 0 0.5rem 0.5rem;
}

.sub-btn {
    width: 100%;
    text-align: left;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    font-size: 0.95rem;
    color: var(--clr-text);
    cursor: pointer;
    border-radius: 5px;
    transition: 0.2s;
    margin-bottom: 0.2rem;
}

.sub-btn:hover, .sub-btn.active {
    background: var(--clr-light);
    color: var(--clr-teal-dark);
    font-weight: 600;
}

.torneos-content {
    background: var(--clr-white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    min-height: 600px;
}

.torneo-header {
    margin-bottom: 2rem;
}

.torneo-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--clr-accent-yellow);
    color: var(--clr-teal-dark);
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.9rem;
}

.torneo-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 2px solid var(--clr-light);
    margin-bottom: 2rem;
    gap: 1rem;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: var(--clr-text-light);
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--clr-teal);
}

.tab-btn.active {
    color: var(--clr-teal);
    border-bottom-color: var(--clr-teal);
}

/* Tables Styling */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--clr-light);
}

.data-table th {
    background: var(--clr-teal);
    color: var(--clr-white);
    font-weight: 600;
}

.data-table tr:hover {
    background: #fdfdfd;
}

/* Match Cards */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid var(--clr-light);
    border-radius: 10px;
    background: #fdfcfc;
    transition: var(--transition-fast);
}

.match-card:hover {
    box-shadow: var(--shadow-soft);
}

.team {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 35%;
    font-weight: 600;
}

.team-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #f0f0f0;
    object-fit: contain;
    padding: 5px;
}

.team-right {
    flex-direction: row-reverse;
    text-align: right;
}

.match-score {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--clr-teal-dark);
}

.match-time {
    text-align: center;
    color: var(--clr-text-light);
    font-size: 0.95rem;
    line-height: 1.4;
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--clr-text-light);
}

.empty-state i {
    font-size: 4rem;
    color: var(--clr-mint);
    margin-bottom: 1rem;
}

/* ==================================
   ENTRAR (Portal Privado & Dashboards)
   ================================== */
.flip-card {
    background-color: transparent;
    width: 100%;
    max-width: 450px;
    height: 500px;
    perspective: 1000px;
    margin: 2rem 0;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card-inner.flipped {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card {
    background: var(--clr-white);
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(178, 223, 219, 0.4);
}

.flip-card-back {
    transform: rotateY(180deg);
}

.btn-link {
    background: none;
    border: none;
    color: var(--clr-teal-dark);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px); /* Height without fixed navbar */
    background: var(--clr-light);
}

.dashboard-sidebar {
    background: var(--clr-white);
    border-right: 1px solid rgba(0,0,0,0.05);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.dash-user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--clr-teal);
}

.dash-user-profile h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--clr-text);
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dash-nav-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--clr-text-light);
    margin: 1.5rem 0 0.5rem 0;
}

.dash-link {
    padding: 0.8rem 1rem;
    color: var(--clr-text);
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dash-link:hover, .dash-link.active {
    background: var(--clr-teal-light);
    color: var(--clr-white);
}

.dashboard-main {
    padding: 2rem 3rem;
}

.dash-topbar {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Credencial UI (Carnet Design) */
.credencial-box {
    width: 7.5cm !important;
    height: 4.5cm !important;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    margin: 0 auto;
}

.credencial-box::before {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -45%);
    width: 45%; height: 45%;
    background-image: url('Logos/LEP Varonil.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.08;
    z-index: 0;
}

.cred-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #004d40, #00695c);
    color: white;
    padding: 0.1cm 0.3cm;
    height: 0.9cm;
    position: relative;
    z-index: 1;
}

.cred-header img {
    height: 0.65cm;
    width: auto;
    max-width: 1.8cm;
    object-fit: contain;
    filter: drop-shadow(0px 1px 2px rgba(0,0,0,0.5));
}

.cred-header h5 {
    color: #fff;
    margin: 0;
    font-size: 0.5rem;
    line-height: 1.1;
    letter-spacing: 0.5px;
    font-weight: 800;
}

.cred-header span {
    font-size: 0.4rem;
    color: #b2dfdb;
}

.cred-body {
    display: flex;
    gap: 0.25cm;
    padding: 0.15cm 0.25cm;
    height: calc(4.5cm - 0.9cm - 0.35cm); /* Total - header - footer */
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.cred-photo-container {
    flex-shrink: 0;
}

.cred-photo-container img {
    width: 1.6cm;
    height: 2.2cm;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cred-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 0.02cm;
    overflow: hidden;
}

.cred-title {
    font-size: 0.65rem !important;
    font-weight: 800;
    color: #004d40;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0.05cm !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cred-detail {
    font-size: 0.48rem !important;
    color: #333;
    line-height: 1.2;
    margin-bottom: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cred-detail strong {
    color: #00695c;
}

.cred-bottom-info {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    background: #f4f8f7;
    border-radius: 4px;
    padding: 0.1cm 0.15cm;
    border: 1px solid #e0ebe9;
}

.cred-bottom-info div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cred-label {
    font-size: 0.35rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.cred-value, .cred-value-date {
    font-size: 0.75rem;
    font-weight: 900;
    color: #d32f2f;
    line-height: 1.1;
}

.cred-footer {
    font-size: 0.4rem;
    color: #fff;
    background: #004d40;
    text-align: center;
    padding: 0.08cm 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    height: 0.35cm;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================================
   RESPONSIVE (Mobile-first concepts layered into media queries)
   ================================== */
@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-sidebar {
        position: static;
        height: auto;
    }
    
    .torneos-layout {
        grid-template-columns: 1fr;
    }
    .torneos-sidebar {
        position: static;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }
    .contact-info {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0.5rem 5%;
    }
    
    .nav-logo {
        gap: 0.5rem;
    }
    
    .logo-img {
        height: 45px;
        width: 40px;
    }
    
    .logo-text {
        font-size: 1rem;
    }

    .hero-logos-container {
        gap: 1rem;
        margin: 1rem 0 1.5rem;
    }
    
    .hero-logo-side {
        height: 80px;
        width: 75px;
    }
    
    .hero-logo-center {
        height: 140px;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background: var(--clr-white);
        width: 100%;
        height: calc(100vh - 80px);
        align-items: center;
        padding-top: 2rem;
        transition: 0.3s ease-in-out;
    }
    
    .nav-menu.mobile-active {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links a:hover {
        padding-left: 0;
    }
    
    .social-icons {
        justify-content: center;
    }

    .masonry-grid {
        column-count: 2;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* ==================================
   MASCOTA ANIMATIONS
   ================================== */
.mascota-float {
    animation: floatMascota 4s ease-in-out infinite;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.3));
    z-index: 10;
    will-change: transform;
}

@keyframes floatMascota {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.mascota-hover {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    cursor: pointer;
    z-index: 10;
    will-change: transform;
}

.mascota-hover:hover {
    transform: translateY(-25px) scale(1.08) rotate(-5deg);
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.4));
}

/* ==================================
   PRINT ENGINE (Credenciales)
   ================================== */
#impresion-credenciales {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }
    
    #impresion-credenciales {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        visibility: visible !important;
    }
    
    #impresion-credenciales * {
        visibility: visible;
    }

    .print-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: min-content;
        gap: 1cm;
        justify-content: center;
        padding: 1cm;
        page-break-after: always;
    }

    .credencial-box {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        page-break-inside: avoid;
        box-shadow: none !important;
        margin: 0 auto;
    }

    @page { 
        margin: 0.5cm;
    }
}

/* ==================================
   GRUPOS VISUALIZACIÓN (Torneos)
   ================================== */
.grupos-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.grupo-section {
    background: var(--clr-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 121, 107, 0.08);
    border: 1px solid rgba(178, 223, 219, 0.5);
    transition: var(--transition-smooth);
}

.grupo-section:hover {
    box-shadow: 0 8px 30px rgba(0, 121, 107, 0.15);
    transform: translateY(-2px);
}

.grupo-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--clr-teal-dark) 0%, var(--clr-teal) 100%);
    color: white;
}

.grupo-badge {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
    letter-spacing: -0.5px;
}

.grupo-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Badges de posición en tabla */
.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    background: #e0e0e0;
    color: #555;
}

.pos-badge-1 {
    background: linear-gradient(135deg, #ffd700, #ffa000);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 160, 0, 0.4);
}

.pos-badge-2 {
    background: linear-gradient(135deg, #b0bec5, #78909c);
    color: white;
    box-shadow: 0 2px 8px rgba(120, 144, 156, 0.4);
}

.pos-badge-3 {
    background: linear-gradient(135deg, #cd8b4a, #a1632e);
    color: white;
    box-shadow: 0 2px 8px rgba(161, 99, 46, 0.35);
}

/* Filas destacadas en tablas con grupos */
.grupo-section .data-table tbody tr:first-child {
    background: rgba(255, 215, 0, 0.06);
}

.grupo-section .data-table tbody tr:nth-child(2) {
    background: rgba(176, 190, 197, 0.06);
}

/* Responsive grupos */
@media (max-width: 768px) {
    .grupo-header {
        padding: 0.85rem 1rem;
    }

    .grupo-badge {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .grupo-title {
        font-size: 1rem;
    }
}

/* ==================================
   TABLA GENERAL COMBINADA
   ================================== */
.tabla-general-section {
    background: var(--clr-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(0, 77, 64, 0.14);
    border: 2px solid rgba(0, 121, 107, 0.25);
    transition: var(--transition-smooth);
}

.tabla-general-section:hover {
    box-shadow: 0 12px 40px rgba(0, 77, 64, 0.2);
    transform: translateY(-2px);
}

.tabla-general-header {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 1.5rem;
    background: linear-gradient(135deg, #004d40 0%, #00796b 60%, #26a69a 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.tabla-general-header::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.tabla-general-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: 40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.tabla-general-icon {
    font-size: 2rem;
    color: #ffd54f;
    filter: drop-shadow(0 2px 6px rgba(255, 213, 79, 0.5));
    flex-shrink: 0;
}

.tabla-general-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.15rem 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tabla-general-sub {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Chip de grupo dentro de la Tabla General */
.grupo-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 7px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--clr-teal-dark), var(--clr-teal));
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Filas destacadas en Tabla General */
.tabla-general-section .data-table tbody tr:first-child {
    background: rgba(255, 215, 0, 0.07);
}

.tabla-general-section .data-table tbody tr:nth-child(2) {
    background: rgba(176, 190, 197, 0.06);
}

@media (max-width: 768px) {
    .tabla-general-header {
        padding: 0.9rem 1rem;
        gap: 0.75rem;
    }

    .tabla-general-icon {
        font-size: 1.6rem;
    }

    .tabla-general-title {
        font-size: 1rem;
    }
}
