:root {
    --primary-black: #111111;
    --secondary-dark: #1F1F1F;
    --accent-orange: #fb562a; 
    --footer-orange: #ee5c02; 
    --accent-blue: #003399;
    --text-white: #ffffff;
    --text-black: #000000;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Arial', sans-serif; }

/* --- 1. BODY LIMPIO (Sin imagen aquí para evitar error en iPhone) --- */
body { 
    min-height: 100vh;
    color: var(--text-white); 
    overflow-x: hidden;
    position: relative; 
}

/* --- 2. CAPA FIJA DETRÁS (Solución iPhone) --- */
body::before {
    content: "";
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    
    /* IMAGEN DE FONDO .PNG + Gradiente 0.2 (Luminoso) */
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('../assets/img/logo-sinletras.png');
    
    /* POSICIÓN: CENTRO CENTRO */
    background-position: center center;
    background-repeat: no-repeat;
    
    /* En PC usamos cover */
    background-size: cover; 
    
    background-color: #ffffff;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- NAVBAR FIJO --- */
#navbar {
    position: fixed; top: 0; width: 100%; height: 90px;
    background-color: rgba(0, 0, 0, 0.4); 
    display: flex; justify-content: center; align-items: center; 
    padding: 0; 
    z-index: 1000; 
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

nav { 
    width: 100%; max-width: 1200px; height: 100%; 
    display: flex; align-items: center; justify-content: space-between;
}

/* ESTILOS DEL MENÚ DE ESCRITORIO */
.nav-links { list-style: none; display: flex; height: 100%; width: 100%; justify-content: space-between; margin: 0; padding: 0; }
.nav-links li { height: 100%; flex-grow: 1; display: flex; align-items: center; position: relative; } 
.nav-links a { 
    color: var(--text-white); font-weight: 900; font-size: 1rem;
    text-transform: uppercase; width: 100%; height: 100%; 
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease-in-out; letter-spacing: 1px;
}
.nav-links a:hover, .nav-links a.active { background-color: var(--accent-orange); color: var(--text-white); }

/* --- BOTÓN HAMBURGUESA (MÓVIL) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
}
.menu-toggle .bar {
    width: 30px; height: 4px; background-color: white;
    margin: 3px 0; transition: 0.3s; border-radius: 2px;
}

/* Dropdown Desktop */
.dropdown-content {
    display: none; position: absolute; background-color: #1a1a1a;
    min-width: 250px; top: 90px; 
    border-top: 4px solid var(--accent-orange);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); z-index: 1001;
}
.dropdown-content a { height: auto; padding: 20px; font-size: 1rem; justify-content: flex-start; color: var(--text-white); }
.dropdown-content a:hover { background-color: #333; color: var(--accent-orange); }

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content { display: block; }
}

/* --- HERO SECTION (RESTAURADO) --- */
.hero {
    height: 100vh; background: transparent; 
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding-top: 0; 
}
.hero-content { margin-top: 0; padding: 0 20px; }

.hero h1 { 
    font-size: 3.8rem; margin-bottom: 15px; text-transform: uppercase; 
    letter-spacing: 2px; color: var(--accent-orange); font-weight: 900;
    /* RESTAURADO: Sombra difuminada */
    text-shadow: 2px 2px 10px rgba(0,0,0,0.9);
}

.hero h2 {
    font-size: 1.8rem; color: white; font-weight: 700; letter-spacing: 4px; 
    text-transform: uppercase; margin-bottom: 20px; 
    /* RESTAURADO */
    text-shadow: 2px 2px 5px rgba(0,0,0,0.9);
}

.hero p {
    font-size: 1.4rem; font-style: italic; 
    /* RESTAURADO: Color gris claro original */
    color: #ddd; 
    max-width: 800px; 
    margin: 0 auto; 
    /* RESTAURADO */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
}

/* --- GRID Y CARTAS (HOME) --- */
.info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; padding: 80px 5%;
}

.card-link-wrapper {
    display: block; height: 450px; border-radius: 15px; overflow: hidden; 
    position: relative; border: 3px solid transparent;
    transition: transform 0.3s, border-color 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.card-link-wrapper:hover { transform: translateY(-10px); border-color: var(--accent-orange); }

.info-card {
    height: 100%; width: 100%; background-size: cover; 
    background-position: center; position: relative; opacity: 1 !important; 
}

.card-content {
    position: absolute; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 40%, transparent 100%);
    width: 100%; padding: 30px; text-align: center; height: 100%;
    display: flex; flex-direction: column; justify-content: flex-end; 
}
.card-content h3 { font-size: 1.8rem; margin-bottom: 10px; text-transform: uppercase; color: var(--accent-orange); font-weight: 800; text-shadow: 2px 2px 4px black; }
.card-content p { font-size: 1.1rem; color: white; text-shadow: 1px 1px 2px black; }

.cta-button {
    background-color: var(--accent-orange); color: white; padding: 15px 30px; 
    border-radius: 5px; font-weight: bold; text-transform: uppercase;
    display: inline-block; border: none; cursor: pointer; font-size: 1rem;
}
.cta-button:hover { background-color: white; color: var(--accent-orange); }

/* --- SLIDER DEPORTES --- */
.slider-container-wrapper { position: relative; display: flex; align-items: center; padding: 0 20px; }
.horizontal-scroll-container {
    display: flex; overflow-x: auto; gap: 30px; padding: 20px 10px;
    width: 100%; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none; -ms-overflow-style: none;
}
.horizontal-scroll-container::-webkit-scrollbar { display: none; }
.scroll-card { flex: 0 0 350px; height: 500px; scroll-snap-align: center; }

/* Botones Flecha */
.scroll-btn {
    background-color: var(--accent-orange); color: white; border: none;
    width: 50px; height: 50px; border-radius: 50%; cursor: pointer; z-index: 10;
    font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
    transition: 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.5); flex-shrink: 0;
}
.scroll-btn:hover { background-color: white; color: var(--accent-orange); transform: scale(1.1); }
.left-btn { margin-right: 15px; } .right-btn { margin-left: 15px; }

/* --- INTERNAS --- */
.page-container { padding: 140px 5% 80px; min-height: 70vh; } 
.page-title {
    color: var(--accent-orange); font-size: 2.5rem; margin-bottom: 30px;
    font-weight: 900; text-transform: uppercase;
    border-bottom: 4px solid var(--accent-blue); display: inline-block;
}

.tournament-details { display: flex; flex-wrap: wrap; gap: 40px; background: rgba(31, 31, 31, 0.95); padding: 40px; border-radius: 15px; }
.tournament-img { flex: 1; min-width: 280px; }
.tournament-img img { width: 100%; border-radius: 10px; border: 3px solid var(--accent-orange); }
.tournament-info { flex: 1; min-width: 280px; }
.tournament-info h2 { color: var(--accent-orange); margin-bottom: 20px; font-size: 1.8rem; }
.tournament-info ul { list-style: none; margin-bottom: 30px; }
.tournament-info li { margin-bottom: 15px; border-bottom: 1px solid #444; padding-bottom: 10px; font-size: 1.1rem; }
.tournament-info i { color: var(--accent-blue); margin-right: 15px; }

.create-event-box { 
    background: rgba(31, 31, 31, 0.95); padding: 30px; 
    border-radius: 15px; max-width: 800px; margin: 0 auto; 
    border-top: 6px solid var(--accent-orange); 
}
.create-event-box label { display: block; margin-top: 20px; color: var(--accent-orange); font-weight: bold; }
.full-form-input { 
    width: 100%; padding: 15px; margin-top: 8px; 
    background: #fff; border: 2px solid #ccc; color: #000; 
    border-radius: 5px; font-size: 1rem;
}

/* --- FOOTER --- */
#contacto { background-color: var(--footer-orange); color: white; padding: 60px 5% 40px; }
.footer-container { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.form-section, .info-section { flex: 1; min-width: 280px; }

.footer-title {
    color: white; font-size: 1.5rem; text-transform: uppercase;
    font-weight: 900; margin-bottom: 25px; letter-spacing: 1px;
    border-bottom: 3px solid white; display: inline-block;
}
.contact-text { line-height: 1.8; margin-bottom: 25px; font-size: 1.1rem; color: #fff; }

.contact-form input, .contact-form textarea { width: 100%; padding: 15px; margin: 10px 0; background: #ffffff; border: none; color: #000000; border-radius: 4px; }
.contact-form button { background-color: #ffffff; color: var(--footer-orange); font-size: 1.2rem; font-weight: 900; margin-top: 15px; transition: 0.3s; border: 2px solid white; width: 100%; padding: 15px; cursor: pointer; }
.contact-form button:hover { background-color: transparent; color: white; }

.contact-list li { margin-bottom: 25px; font-size: 1.1rem; display: flex; align-items: center; color: white; font-weight: bold; }
.contact-list i { background: white; width: 40px; height: 40px; line-height: 40px; text-align: center; border-radius: 50%; margin-right: 15px; color: var(--footer-orange); font-size: 1.2rem; flex-shrink: 0; }

.social-links { display: flex; flex-direction: column; gap: 15px; }
.social-links a { display: inline-flex; align-items: center; font-size: 1.1rem; font-weight: 800; color: white; padding: 12px 25px; border-radius: 40px; transition: 0.3s; width: fit-content; }
.social-links a.whatsapp { background-color: #25D366; border: 2px solid #25D366; }
.social-links a.whatsapp:hover { background-color: white; color: #25D366; }
.social-links a.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); border: 2px solid transparent; }
.social-links a.instagram:hover { background: white; color: #bc1888; border: 2px solid #bc1888; }

.copyright-area { margin-top: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-top: 1px solid rgba(255,255,255,0.3); padding-top: 30px; text-align: center; }
.footer-logo-img { height: 100px; margin-right: 0; margin-bottom: 15px; border-radius: 5px; background: white; padding: 5px; }

/* --- ANIMACIONES --- */
@keyframes navLinkFade {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MEDIA QUERIES (ADAPTACIÓN MÓVIL) --- */
@media (max-width: 1024px) { 
    .nav-links a { padding: 0 10px; font-size: 0.9rem; } 
    .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) { 
    /* AJUSTE IMAGEN MÓVIL EN LA CAPA TRASERA */
    body::before {
        background-size: 100% auto; 
        
        /* CAMBIO CLAVE: Posición CENTRO CENTRO */
        background-position: center center; 
    }

    #navbar { justify-content: space-between; padding: 0 20px; }
    .menu-toggle { display: flex; z-index: 1002; }
    
    .nav-links {
        display: none; width: 100%; position: absolute; top: 90px; left: 0;
        background-color: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px);
        flex-direction: column; height: auto;
        padding-bottom: 20px; border-top: 2px solid var(--accent-orange);
    }
    .nav-links.active { display: flex; }
    
    .nav-links li { width: 100%; display: block; text-align: center; margin: 0; border-bottom: 1px solid rgba(255,255,255,0.1); opacity: 0; }
    .nav-links.active li { animation: navLinkFade 0.5s ease forwards; }
    .nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { animation-delay: 0.5s; }

    .nav-links a { padding: 20px; font-size: 1.2rem; }
    .dropdown-content { display: none !important; }
    .dropdown i { display: none; }

    /* Slider móvil */
    .slider-container-wrapper { padding: 0; }
    .horizontal-scroll-container { gap: 0; padding: 20px 0; }
    .scroll-card { flex: 0 0 100%; }
    
    .scroll-btn {
        position: absolute; top: 50%; transform: translateY(-50%);
        background-color: rgba(251, 86, 42, 0.7); 
        width: 40px; height: 40px; font-size: 1.2rem;
    }
    .left-btn { left: 10px; margin: 0; }
    .right-btn { right: 10px; margin: 0; }
    
    .hero h1 { font-size: 2rem; }
    .hero h2 { font-size: 1.2rem; }
}