/* ==========================================================
   1. CONFIGURACIÓN GENERAL Y TIPOGRAFÍA
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;900&display=swap');

:root {
    --l2-bg-color: #0b0907;
    --l2-top-bg: #14110e;
    --l2-sub-bg: #0f0d0a;
    --l2-border-color: #33271d;
    --l2-border-light: #5c4a35;
    --l2-text-color: #b5aba0;
    --l2-text-gold: #f3e5ab;
    --l2-gold-btn: linear-gradient(to bottom, #f1c40f 0%, #d4ac0d 50%, #b7950b 100%);
    --l2-gold-btn-hover: linear-gradient(to bottom, #f39c12 0%, #e67e22 100%);
    --l2-dark-btn: #1f1a16;
    --l2-dark-btn-hover: #2c2520;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--l2-bg-color);
    color: var(--l2-text-color);
    font-family: Arial, sans-serif;
    min-height: 100vh;
}

/* ==========================================================
   2. CABECERA Y NAVEGACIÓN (ANCHO 1400px)
   ========================================================== */
.l2-header {
    width: 100%;
    border-bottom: 2px solid #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.l2-top-bar {
    background-color: var(--l2-top-bg);
    border-bottom: 1px solid var(--l2-border-color);
    padding: 8px 20px;
}

.l2-nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-container img {
    max-height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

/* Menú Principal */
.l2-main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

.l2-main-menu li {
    position: relative;
}

.l2-main-menu a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--l2-text-gold);
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.l2-main-menu a i {
    font-size: 12px;
    color: #c29b38;
}

.l2-main-menu a:hover {
    color: #fff;
}

/* Desplegables de hasta 3 niveles */
.l2-main-menu .l2-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #14110e;
    border: 1px solid #5c4a35;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.8);
    z-index: 999;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
}

.l2-main-menu .l2-submenu li {
    width: 100%;
    position: relative;
}

.l2-main-menu .l2-submenu a {
    padding: 10px 15px;
    font-size: 12px;
    color: var(--l2-text-color);
    white-space: nowrap;
    border-bottom: 1px solid rgba(92, 74, 53, 0.2);
    display: block;
}

.l2-main-menu .l2-submenu a:hover {
    background-color: #2c2520;
    color: var(--l2-text-gold);
}

.l2-main-menu .l2-submenu .l2-submenu {
    top: 0;
    left: 100%;
}

.l2-main-menu li.has-dropdown:hover > .l2-submenu {
    display: flex;
}

/* Botones de la derecha (Login e Install) */
.l2-header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-login {
    background-color: var(--l2-dark-btn);
    border: 1px solid var(--l2-border-light);
    color: var(--l2-text-gold);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-login:hover {
    background-color: var(--l2-dark-btn-hover);
    color: #fff;
}

.btn-install {
    background: var(--l2-gold-btn);
    border: 1px solid #7d6608;
    color: #1a1400;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.2s;
}

.btn-install:hover {
    background: var(--l2-gold-btn-hover);
}

/* ==========================================================
   3. BARRA INFERIOR (RANKINGS Y ESTADOS)
   ========================================================== */
.l2-sub-bar {
    background-color: var(--l2-sub-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 6px 20px;
}

.l2-sub-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

.l2-sub-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.l2-sub-menu a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--l2-text-color);
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    transition: color 0.2s;
}

.l2-sub-menu a i {
    font-size: 10px;
}

.l2-sub-menu a:hover {
    color: var(--l2-text-gold);
}

.highlight-update {
    color: #3498db !important;
}

/* ==========================================================================
   4. Sección de Características sin Marco de Ventana - L2Kingdoms
   ========================================================================== */
.l2-feature-section {
    width: 100%;
    padding: 56px 20px 68px;
    box-sizing: border-box;
}

.l2-feature-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Cabecera centrada */
.l2-section-intro {
    max-width: 820px;
    margin: 0 auto 44px;
    text-align: center;
}

.l2-section-intro h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
}

.l2-section-kicker {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--l2-text-gold, #ffd700);
    margin-bottom: 14px;
}

.l2-section-intro p {
    margin: 0;
    font-size: 15px;
    line-height: 1.68;
    color: #cfc5b4;
}

/* Grid de 4 tarjetas */
.l2-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.l2-info-card {
    background: linear-gradient(165deg, rgba(25, 20, 16, 0.85) 0%, rgba(12, 10, 8, 0.92) 100%);
    border: 1px solid rgba(255, 215, 0, 0.16);
    border-radius: 10px;
    padding: 24px;
    box-sizing: border-box;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.l2-info-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 0.45);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.65);
}

.l2-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    background: rgba(255, 215, 0, 0.09);
    border: 1px solid rgba(255, 215, 0, 0.28);
    color: var(--l2-text-gold, #ffd700);
    font-size: 17px;
}

.l2-info-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.3;
}

.l2-info-card p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.62;
    color: #bfb5a5;
}

/* Banner inferior horizontal */
.l2-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: linear-gradient(165deg, rgba(25, 20, 16, 0.88) 0%, rgba(12, 10, 8, 0.94) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 28px 32px;
    box-sizing: border-box;
}

.l2-cta-banner-text {
    max-width: 820px;
}

.l2-cta-banner-text h3 {
    font-family: 'Cinzel', serif;
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
}

.l2-cta-banner-highlight {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--l2-text-gold, #ffd700);
    margin-bottom: 10px;
}

.l2-cta-banner-text p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #bfb5a5;
}

.l2-cta-banner-action {
    flex-shrink: 0;
}

.l2-cta-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: 7px;
    background: linear-gradient(to bottom, #ffe866 0%, #e5b812 58%, #b88b06 100%);
    border: 1px solid #fff099;
    color: #120d00;
    font-family: 'Cinzel', serif;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.l2-cta-primary-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    color: #0b0800;
}

@media (max-width: 1100px) {
    .l2-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .l2-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px;
    }

    .l2-cta-primary-btn {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}

@media (max-width: 580px) {
    .l2-cards-grid {
        grid-template-columns: 1fr;
    }

    .l2-info-card {
        padding: 20px;
    }
}

/* ==========================================================================
   5. Sección de Redes Sociales y Canales Oficiales - L2Kingdoms
   ========================================================================== */
.l2-socials-section {
    width: 100%;
    padding: 36px 20px 80px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.l2-socials-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.l2-social-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    background: linear-gradient(165deg, rgba(25, 20, 16, 0.85) 0%, rgba(12, 10, 8, 0.92) 100%);
    border: 1px solid rgba(255, 215, 0, 0.16);
    border-radius: 10px;
    text-decoration: none;
    box-sizing: border-box;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.l2-social-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 215, 0, 0.52);
    background: linear-gradient(165deg, rgba(34, 27, 21, 0.92) 0%, rgba(15, 12, 9, 0.96) 100%);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.7), 0 0 16px rgba(255, 215, 0, 0.1);
}

.l2-social-left {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.l2-social-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.09);
    border: 1px solid rgba(255, 215, 0, 0.28);
    color: var(--l2-text-gold, #ffd700);
    font-size: 20px;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.l2-social-card:hover .l2-social-icon {
    background: rgba(255, 215, 0, 0.18);
    border-color: rgba(255, 215, 0, 0.6);
    color: #ffe866;
}

.l2-social-info {
    min-width: 0;
}

.l2-social-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px 0;
    line-height: 1.25;
}

.l2-social-info span {
    display: block;
    font-size: 12.5px;
    color: #b5aa99;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.l2-social-arrow {
    flex-shrink: 0;
    font-size: 14px;
    color: rgba(255, 215, 0, 0.65);
    transition: transform 0.25s ease, color 0.25s ease;
}

.l2-social-card:hover .l2-social-arrow {
    color: #ffd700;
    transform: translateX(4px);
}

@media (max-width: 1100px) {
    .l2-socials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .l2-socials-grid {
        grid-template-columns: 1fr;
    }

    .l2-social-card {
        padding: 18px 20px;
    }
}

/* ==========================================================================
6. Separación superior y ancho en ventanas de subpáginas
   ========================================================================== */

/* El slider mantiene su unión directa con la barra superior */
.l2-subpage-main > .hero-slider {
    margin-top: -1px !important;
}

/* Ventanas con marco en subpáginas (tops, características, etc.) */
.l2-subpage-main > .l2-content-window {
    max-width: 1200px;
    margin: 28px auto 0 !important;
    box-sizing: border-box;
}

/* Otras secciones o bloques directos en subpáginas (excluyendo slider y stats) */
.l2-subpage-main > section:not(.hero-slider),
.l2-subpage-main > div:not(.hero-slider):not(.l2-stats-section):not(.l2-content-window) {
    margin-top: 28px;
}

/* Si una ventana con marco va justo después del slider en la home */
.hero-slider + .l2-content-window {
    margin-top: 40px !important;
}

@media (max-width: 768px) {
    .l2-subpage-main > .l2-content-window {
        margin: 20px auto 0 !important;
    }

    .l2-subpage-main > section:not(.hero-slider),
    .l2-subpage-main > div:not(.hero-slider):not(.l2-stats-section):not(.l2-content-window) {
        margin-top: 20px;
    }
}