/* ==========================================================================
   ESTILOS GENERALES Y SITIO PÚBLICO: LIGA BALONCESTO LA CALERA (LBC)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800;900&display=swap');

/* Variables de Diseño System */
:root {
    --bg-main: #0c0d12;
    --bg-card: rgba(20, 22, 31, 0.7);
    --bg-input: #1b1e2a;
    --border-color: rgba(255, 107, 0, 0.15);
    --border-glow: rgba(255, 107, 0, 0.3);
    --primary: #ff6b00;
    --primary-hover: #ff8533;
    --primary-glow: rgba(255, 107, 0, 0.4);
    --text-main: #ffffff;
    --text-muted: #8e96a7;
    --font-title: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(20, 22, 31, 0.65);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* Reset y Estilos Básicos */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar Custom */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #232736;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Tipografía y Contenedores */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: -0.5px;
}

p {
    color: var(--text-muted);
}

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

.section-padding {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    text-transform: uppercase;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Botón Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--text-main);
    font-family: var(--font-title);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   HEADER / NAVBAR (Semi-transparente flotante)
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(12, 13, 18, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.header.scrolled {
    background: rgba(12, 13, 18, 0.95);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 5px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-main);
}

.logo-img {
    height: 50px;
    width: auto;
    margin-right: 12px;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.1));
}

.logo-text {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.3rem;
    line-height: 1.1;
}

.logo-text span {
    color: var(--primary);
}

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

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--primary);
}

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

/* Icono Login Pequeño y Elegante */
.login-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.login-icon-btn:hover {
    background: rgba(255, 107, 0, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.08);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.login-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Hamburger Menu (Responsive) */
.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-main);
}

/* ==========================================================================
   HERO SECTION (Fondo deportivo impactante)
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: linear-gradient(to bottom, rgba(12, 13, 18, 0.4), rgba(12, 13, 18, 0.95)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 10;
}

.hero-tagline {
    font-family: var(--font-title);
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1rem;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.05;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
    animation: fadeInUp 0.8s ease;
}

.hero-title span {
    color: var(--primary);
    display: block;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    animation: fadeInUp 1.2s ease;
}

/* ==========================================================================
   SECCIÓN NOSOTROS (Glassmorphism Cards)
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.08);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.feature-card h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

/* ==========================================================================
   SECCIÓN TABLA DE POSICIONES Y FIXTURE (Estadísticas Avanzadas)
   ========================================================================== */
.sports-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
}

.sports-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    backdrop-filter: blur(12px);
}

.sports-card h3 {
    font-size: 1.6rem;
    margin-bottom: 24px;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

/* Tabla Estética */
.table-responsive {
    overflow-x: auto;
}

.posiciones-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.posiciones-table th, .posiciones-table td {
    padding: 14px 16px;
}

.posiciones-table th {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--glass-border);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.posiciones-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-smooth);
}

.posiciones-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.team-logo-small {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.pts-col {
    color: var(--primary);
    font-weight: 800;
}

/* Fixture (Lista de Encuentros) */
.fixture-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.match-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-smooth);
}

.match-item:hover {
    border-color: rgba(255,107,0,0.3);
}

.match-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 40%;
}

.match-team.away {
    justify-content: flex-end;
}

.match-score {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    width: 20%;
    text-align: center;
}

.match-score span {
    color: var(--primary);
}

.match-score-vs {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================================
   GALERÍA DE MEDIOS (Grilla Dinámica de Imagen/Video)
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.gallery-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.gallery-media {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Relación de Aspecto 16:9 */
    background: #000;
}

.gallery-media img, .gallery-media iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.gallery-info {
    padding: 20px;
}

.gallery-tag {
    display: inline-block;
    background: rgba(255, 107, 0, 0.15);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.gallery-card h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.gallery-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   SECCIÓN EQUIPOS (Cards Dinámicas con Color Acento)
   ========================================================================== */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.team-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--team-accent, var(--primary));
}

.team-card:hover {
    transform: translateY(-8px);
    border-color: var(--team-accent, var(--primary));
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.team-logo-large {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 20px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.team-card h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.team-siglas {
    font-family: var(--font-title);
    font-weight: 800;
    color: var(--team-accent, var(--primary));
    font-size: 0.95rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.team-coach {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.team-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   FORMULARIO DE CONTACTO (Inputs premium y Ajax Loader)
   ========================================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(12px);
}

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

.contact-info-card p {
    font-size: 1rem;
    margin-bottom: 30px;
}

.contact-detail {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-detail-icon {
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.contact-detail h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-detail p, .contact-detail a {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
}

.contact-detail a:hover {
    color: var(--primary);
}

/* Formulario */
.contact-form-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(12px);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-control {
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255,107,0,0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Toasts de Alerta */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: #14161f;
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary);
    border-radius: 6px;
    padding: 16px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    transform: translateY(50px);
    opacity: 0;
    animation: slideInToast 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success {
    border-left-color: #2ed573;
}

.toast.error {
    border-left-color: #ff4757;
}

/* ==========================================================================
   FOOTER (Diseño estético y redes sociales)
   ========================================================================== */
.footer {
    background: #06070a;
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.footer-info p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

.social-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.footer-links h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

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

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

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 30px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ==========================================================================
   ANIMACIONES DE KEYFRAME
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInToast {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   RESPONSIVO (Ajustes de Adaptabilidad)
   ========================================================================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .sports-grid {
        grid-template-columns: 1fr;
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: 70px;
    }
    .hamburger {
        display: block;
    }
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #0d0e12;
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        transition: var(--transition-smooth);
        z-index: 999;
    }
    .nav-menu.active {
        left: 0;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
