/* ============================================================
   IMPORTACIÓN DE FUENTES
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   VARIABLES CSS (Sistema de diseño)
   ============================================================ */
:root {
    /* Fondos */
    --bg: #060D17;              /* Fondo principal oscuro */
    --panel: #101827;           /* Panel base para tarjetas */
    --panel2: #182232;          /* Panel alternativo (hover) */

    /* Dorados (acento principal) */
    --gold: #C8AA6E;            /* Dorado estándar */
    --gold-light: #E0CC9A;      /* Dorado claro para textos destacados */

    /* Textos */
    --text: #EDEDED;            /* Texto principal (blanco roto) */
    --text2: #8E9BB4;           /* Texto secundario (gris azulado) */

    /* Bordes */
    --border: #1F2D40;          /* Borde estándar */
    --border-gold: rgba(200, 170, 110, 0.25); /* Borde dorado semi-transparente */

    /* Utilidades */
    --hover: rgba(200, 170, 110, 0.06); /* Fondo hover sutil */
    --radius: 16px;             /* Radio de borde estándar */
}

/* ============================================================
   RESET GLOBAL
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;     /* Incluye padding y borde en el tamaño total */
}

/* ============================================================
   ESTILOS BASE DEL BODY
   ============================================================ */
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;  /* Suavizado de fuentes en WebKit */
}

/* ============================================================
   HEADER - Barra de navegación fija
   ============================================================ */
header {
    position: sticky;               /* Se pega al hacer scroll */
    top: 0;
    z-index: 100;                   /* Por encima de todo */
    background: rgba(8, 14, 24, 0.92); /* Fondo semi-transparente */
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);    /* Efecto vidrio esmerilado */
    -webkit-backdrop-filter: blur(12px); /* Soporte Safari */
}

/* Contenedor interno del header */
.header-container {
    max-width: 1400px;
    margin: auto;
    height: 80px;
    display: flex;
    justify-content: space-between; /* Logo izq, nav der */
    align-items: center;            /* Centrado vertical */
    padding: 0 40px;
}

/* Logo con degradado dorado */
.logo h1 {
    background: linear-gradient(135deg, #E8D5A3, #C8AA6E, #A8884A);
    -webkit-background-clip: text;  /* Recorta el fondo al texto */
    -webkit-text-fill-color: transparent; /* Hace el texto transparente */
    background-clip: text;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;           /* Compacta ligeramente las letras */
}

/* Subtítulo del logo */
.logo span {
    color: var(--text2);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.2px;          /* Espacia las letras */
    text-transform: uppercase;
}

/* ============================================================
   NAVEGACIÓN
   ============================================================ */
#main-nav {
    display: flex;
    gap: 6px;
}

/* Botones de navegación */
#main-nav button {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text2);
    cursor: pointer;
    padding: 12px 22px;
    border-radius: 30px;            /* Forma de píldora */
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;      /* Transición suave en hover */
}

/* Hover de botones de navegación */
#main-nav button:hover {
    background: var(--hover);
    color: #fff;
    border-color: var(--border-gold);   /* Borde dorado al pasar ratón */
    transform: translateY(-1px);        /* Ligera elevación */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   HERO - Sección principal de bienvenida
   ============================================================ */
#hero {
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    /* Capa oscura sobre la imagen de fondo */
    background: 
        linear-gradient(180deg, rgba(6,13,23,0.75) 0%, rgba(6,13,23,0.9) 100%),
        url("img/rift.jpg");
    background-size: cover;
    background-position: center;
}

/* Contenedor del contenido del hero */
.hero-content {
    max-width: 900px;
}

/* Título principal con degradado dorado */
.hero-content h2 {
    font-size: 60px;
    font-weight: 900;
    margin-bottom: 25px;
    line-height: 1.1;
    letter-spacing: -2px;
    background: linear-gradient(180deg, #FFFFFF, #E8D5A3, #C8AA6E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Texto descriptivo del hero */
.hero-content p {
    color: var(--text2);
    font-size: 20px;
    margin-bottom: 40px;
}

/* ============================================================
   BARRA DE BÚSQUEDA DEL HERO
   ============================================================ */
.hero-search input {
    width: 600px;
    max-width: 100%;                /* Responsive */
    padding: 18px 26px;
    border: 2px solid rgba(200, 170, 110, 0.15);
    border-radius: 50px;            /* Completamente redondeado */
    background: rgba(16, 24, 39, 0.85);
    color: white;
    font-size: 17px;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Placeholder de la búsqueda */
.hero-search input::placeholder {
    color: rgba(142, 155, 180, 0.6);
}

/* Efecto focus de la búsqueda (doble sombra para brillo dorado) */
.hero-search input:focus {
    border-color: var(--gold);
    box-shadow: 
        0 0 0 3px rgba(200, 170, 110, 0.08),   /* Anillo exterior */
        0 0 20px rgba(200, 170, 110, 0.15),      /* Brillo dorado */
        0 4px 20px rgba(0, 0, 0, 0.3);           /* Sombra base */
}

/* ============================================================
   CONTENIDO PRINCIPAL
   ============================================================ */
main {
    max-width: 1400px;
    margin: auto;
    padding: 70px 40px;
}

/* Secciones ocultas por defecto (sistema de pestañas) */
.section {
    display: none;
    animation: fadeIn 0.35s ease-out;  /* Animación al aparecer */
}

/* Sección activa (visible) */
.section.active {
    display: block;
}

/* Animación de entrada para secciones */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px);   /* Entra desde abajo */
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Cabecera de cada sección */
.section-header {
    margin-bottom: 50px;
    text-align: center;
}

.section-header h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.section-header p {
    color: var(--text2);
    font-size: 18px;
}

/* ============================================================
   FEATURES - Tarjetas de características (HOME)
   ============================================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* 4 columnas iguales */
    gap: 24px;
}

/* Tarjeta individual */
.feature-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 26px;
    /* Solo animar propiedades que no causan repaint */
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Efecto hover: elevación y borde dorado */
.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-gold);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.feature-card h3 {
    margin-bottom: 12px;
    color: var(--gold-light);
    font-size: 21px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text2);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================================
   FILTROS - Búsqueda y selector de estilo
   ============================================================ */
#filters {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

/* Input y select con mismo estilo */
#filters input,
#filters select {
    padding: 14px 20px;
    background: var(--panel);
    color: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto focus con brillo dorado sutil */
#filters input:focus,
#filters select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(200, 170, 110, 0.1);
}

/* Input de búsqueda ocupa el espacio restante */
#filters input {
    flex: 1;
}

#filters input::placeholder {
    color: rgba(142, 155, 180, 0.5);
}

/* Select personalizado con flecha dorada */
#filters select {
    cursor: pointer;
    appearance: none;                   /* Oculta flecha nativa */
    -webkit-appearance: none;
    padding-right: 40px;                /* Espacio para la flecha */
    /* Flecha personalizada en SVG */
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23C8AA6E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

/* Opciones del select */
#filters select option {
    background: #101827;
    color: white;
}

/* ============================================================
   LISTA DE CAMPEONES
   ============================================================ */
#champion-list {
    display: grid;
    /* Columnas automáticas que se adaptan, mínimo 240px */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* Tarjeta de campeón */
.champion-card {
    overflow: hidden;               /* Recorta la imagen al border-radius */
    cursor: pointer;
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Hover: elevación pronunciada */
.champion-card:hover {
    transform: translateY(-10px);
    border-color: var(--border-gold);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

/* Imagen del campeón */
.champion-icon {
    width: 100%;
    height: 240px;
    object-fit: cover;              /* Cubre sin deformar */
    transition: transform 0.35s ease;
}

/* Zoom suave en hover */
.champion-card:hover .champion-icon {
    transform: scale(1.06);
}

.champion-card h3 {
    padding: 18px 20px 6px;
    font-size: 20px;
    font-weight: 700;
}

.champion-card p {
    padding: 0 20px 20px;
    color: var(--text2);
    font-size: 14px;
}

/* ============================================================
   CONCEPTOS - Grid de conceptos de jungla
   ============================================================ */
.concept-grid {
    display: grid;
    /* Columnas que se adaptan, mínimo 300px */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Tarjeta de concepto */
.concept-card {
    background: var(--panel);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.concept-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.concept-card h3 {
    color: var(--gold-light);
    margin-bottom: 12px;
    font-size: 21px;
    font-weight: 700;
}

.concept-card p {
    color: var(--text2);
    font-size: 15px;
    line-height: 1.6;
}

/* ============================================================
   FOOTER - Estilo elegante y minimalista
   ============================================================ */
footer {
    margin-top: 80px;
    padding: 40px 20px 30px;
    border-top: 2px solid var(--border-gold);
    background: linear-gradient(180deg, rgba(6,13,23,0.9) 0%, rgba(6,13,23,1) 100%);
    text-align: center;
    color: var(--text2);
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-content p {
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.footer-content p:first-child {
    font-weight: 500;
    color: var(--text);
}

.footer-content a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    border-bottom: 1px dotted transparent;
}

.footer-content a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(200, 170, 110, 0.3);
    border-bottom-color: var(--gold);
}

/* Separador decorativo entre el texto y el enlace */
.footer-content .separator {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--border-gold);
    margin: 4px 0;
}

/* Efecto de brillo en el borde superior */
footer::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: -42px auto 20px;
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(200, 170, 110, 0.2);
}

/* ============================================================
   SCROLLBAR PERSONALIZADA (WebKit)
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;                     /* Scrollbar fino */
}

::-webkit-scrollbar-track {
    background: var(--bg);          /* Fondo de la pista */
}

::-webkit-scrollbar-thumb {
    background: rgba(200, 170, 110, 0.25);  /* Pulgar dorado semi-transparente */
    border-radius: 10px;
}

/* ============================================================
   SELECCIÓN DE TEXTO
   ============================================================ */
::selection {
    background: rgba(200, 170, 110, 0.25);  /* Fondo dorado al seleccionar */
    color: #fff;
}

/* ============================================================
   RESPONSIVE - Tablet (máx 900px)
   ============================================================ */
@media(max-width: 900px) {
    
    /* Header en columna en lugar de fila */
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    /* Navegación centrada y con wrap */
    #main-nav {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Título más pequeño */
    .hero-content h2 {
        font-size: 40px;
    }

    /* Features: 2 columnas en vez de 4 */
    .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .section-header h2 {
        font-size: 34px;
    }

    /* Campeones: tarjetas más pequeñas */
    #champion-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 18px;
    }
}

/* ============================================================
   RESPONSIVE - Móvil (máx 600px)
   ============================================================ */
@media(max-width: 600px) {
    
    .hero-content h2 {
        font-size: 32px;
        letter-spacing: -1px;
    }

    .hero-content p {
        font-size: 16px;
    }

    /* Búsqueda más compacta */
    .hero-search input {
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Todo a 1 columna */
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .concept-grid {
        grid-template-columns: 1fr;
    }

    /* Filtros apilados verticalmente */
    #filters {
        flex-direction: column;
    }

    /* Menos padding lateral */
    main {
        padding: 40px 20px;
    }
}