/* BASE & VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700;900&display=swap');

:root {
    --bg-base: #E8E5D9;
    --bg-surface: #F4F1E1;
    --color-red: #CC3300;
    --color-blue: #336699;
    --color-yellow: #CC9900;
    --text-main: #1A1A1A;
    --text-dim: #666666;
    --border-heavy: #1A1A1A;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    /* Cero scroll vertical global */
}

/* =========================================
   1. NAVEGACIÓN (Recuperada)
========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 80px;
    background-color: var(--bg-base);
    border-bottom: 3px solid var(--border-heavy);
    z-index: 1000;
    position: relative;
}

.logo {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    margin: 0 15px;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--color-red);
}

.lang-selector {
    position: relative;
}

#lang-btn {
    background: none;
    border: none;
    font-weight: 900;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-main);
}

.lang-dropdown {
    position: absolute;
    right: 0;
    top: 30px;
    background: var(--bg-surface);
    border: 3px solid var(--border-heavy);
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.lang-dropdown.hidden {
    display: none;
}

.lang-dropdown a {
    padding: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: bold;
    border-bottom: 2px solid var(--border-heavy);
}

.lang-dropdown a:hover {
    background: var(--color-red);
    color: white;
}

/* =========================================
   2. BOTONES Y ETIQUETAS (Colores recuperados)
========================================= */
.btn-main {
    background-color: var(--color-red);
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 900;
    border: 3px solid var(--border-heavy);
    border-bottom: 6px solid var(--border-heavy);
    cursor: pointer;
    transition: transform 0.1s, border-width 0.1s;
}

.btn-main:active {
    transform: translateY(3px);
    border-bottom-width: 3px;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 900;
    border: 2px solid var(--border-heavy);
    margin-bottom: 20px;
}

.tag.blue {
    background-color: rgba(51, 102, 153, 0.2);
    color: var(--color-blue);
}

.tag.red {
    background-color: rgba(204, 51, 0, 0.2);
    color: var(--color-red);
}

.tag.yellow {
    background-color: rgba(204, 153, 0, 0.2);
    color: var(--color-yellow);
}

/* =========================================
   3. SISTEMA DE CÓMIC (Mecánica Horizontal)
========================================= */
.comic-viewport {
    width: 100vw;
    height: calc(100vh - 80px);
    overflow: hidden;
    position: relative;
}

.comic-slider {
    display: flex;
    flex-direction: row;
    width: 300vw;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.comic-page {
    width: 100vw;
    height: 100%;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

/* =========================================
   4. ESCRITORIO (Horizontal, sin scroll)
========================================= */
.hero {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    line-height: 1;
    text-align: center;
}

.hero .subtitle {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 4px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.features {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
    padding: 0 40px;
    width: 100%;
    max-width: 1100px;
}

.feature-card {
    flex: 1;
    border: 3px solid var(--border-heavy);
    border-radius: 20px;
    padding: 20px;
    background: var(--bg-surface);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feat-number {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-weight: bold;
    margin-bottom: 10px;
}

.feature-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    font-weight: bold;
}

/* REGLAS PARA OTRAS PÁGINAS */
.lessongs-section {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    /* Esto permite que los links bajen al fondo */
}

.social-section {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lessongs-banner {
    background: var(--bg-surface);
    border: 4px solid var(--border-heavy);
    padding: 50px;
    text-align: center;
    max-width: 600px;
    box-shadow: 12px 12px 0px rgba(0, 0, 0, 0.1);
}

.logo-lessongs {
    font-size: 3rem;
    margin-bottom: 10px;
}

.coming-soon-title {
    font-size: 1.5rem;
    color: var(--text-dim);
    margin-bottom: 30px;
}

.coming-soon-badge {
    display: inline-block;
    background-color: var(--color-blue);
    color: white;
    padding: 10px 20px;
    font-weight: 900;
    border: 3px solid var(--border-heavy);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.social-section h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 50px;
    text-align: center;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.social-btn {
    background-color: var(--text-main);
    color: white;
    text-decoration: none;
    padding: 20px;
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 3px solid var(--border-heavy);
    border-radius: 8px;
}

/* Colores dinámicos al pasar el mouse o presionar */
/* Rojo para el 1º y 4º */
.social-btn:nth-child(3n+1):hover,
.social-btn:nth-child(3n+1):active {
    background-color: var(--color-red);
    color: white;
    transform: translateX(5px);
}

/* Azul para el 2º y 5º */
.social-btn:nth-child(3n+2):hover,
.social-btn:nth-child(3n+2):active {
    background-color: var(--color-blue);
    color: white;
    transform: translateX(5px);
}

/* Amarillo para el 3º y 6º */
.social-btn:nth-child(3n):hover,
.social-btn:nth-child(3n):active {
    background-color: var(--color-yellow);
    color: white;
    transform: translateX(5px);
}

.legal-links {
    position: absolute;
    bottom: 40px;
    display: flex;
    gap: 30px;
}

.legal-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--border-heavy);
    transition: all 0.2s;
}

.legal-links a:hover {
    color: var(--color-red);
    border-bottom-color: var(--color-red);
}

/* =========================================
   5. EL BOCETO MÓVIL (Pila Vertical + Micro Tipografía)
========================================= */
@media (max-width: 768px) {

    /* 1. Navbar compacta para ganar espacio vital */
    .navbar {
        height: 70px;
        padding: 0 20px;
    }

    .comic-viewport {
        height: calc(100dvh - 70px);
    }

    /* 2. Contenedor Maestro: Apilado vertical y centrado */
    .comic-page:nth-child(1) {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 5px 15px;
        gap: 15px;
        /* Separa el bloque del Hero de las Cápsulas */
    }

    /* 3. El Trono (Hero y JOIN) */
    .hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 0;
        gap: 8px;
        /* Todo muy pegadito arriba */
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 0;
        line-height: 0.9;
    }

    .hero .subtitle {
        font-size: 0.65rem;
        margin-bottom: 5px;
    }

    .btn-main {
        padding: 10px 35px;
        font-size: 1.1rem;
        border-width: 2px;
        border-bottom-width: 4px;
        margin: 0;
    }

    /* 4. Las Cápsulas de Información */
    .features {
        display: flex;
        flex-direction: column;
        /* Forzamos la pila vertical */
        gap: 8px;
        /* Distancia mínima entre cápsulas */
        padding: 0;
        width: 100%;
        max-width: 360px;
    }

    .feature-card {
        padding: 24px 15px;
        /* Más oxígeno arriba y abajo de la tarjeta completa */
        border-radius: 15px;
        border-width: 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
    }

    .feat-number {
        display: none;
    }

    .feature-card h2 {
        font-size: 1rem;
        margin-bottom: 12px;
        /* Más separación entre el título y la etiqueta */
    }

    .tag {
        font-size: 0.55rem;
        padding: 5px 10px;
        margin-bottom: 16px;
        /* Separación agresiva antes de empezar a leer el texto */
    }

    .feature-card p {
        display: block !important;
        font-size: 10.5px;
        line-height: 1.65;
        text-align: center;
        margin: 0 auto;
        /* Centra el bloque de texto en la tarjeta */
        max-width: 230px;
        /* 👈 LA MAGIA: Obliga al texto a romperse en 3 líneas */
    }

    /* Limpiamos los números para ahorrar pixeles valiosos */
    .feat-number {
        display: none;
    }

    .feature-card h2 {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }

    .tag {
        font-size: 0.5rem;
        padding: 2px 5px;
        margin-bottom: 6px;
    }

    /* 5. MICRO-TIPOGRAFÍA (La magia para que quepa sin scrollear) */
    .feature-card p {
        display: block !important;
        /* Aseguramos que se vean */
        font-size: 10px;
        /* Tamaño técnico */
        line-height: 1.25;
        margin: 0;
        text-align: center;
    }

    /* 6. Mantenimiento de las otras páginas para móvil */
    .social-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .social-section h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .social-btn {
        padding: 15px;
        font-size: 0.9rem;
    }

    .lessongs-banner {
        padding: 30px 20px;
        width: 90%;
    }

    .logo-lessongs {
        font-size: 2.2rem;
    }
}