/* ========================================================= */
/* 01 - VARIABLES GENERALES                                  */
/* ========================================================= */

:root {
    --blue: #00b8ff;
    --white: #ffffff;
    --muted: #d7e5ef;
    --gold: #ffd36b;
    --border: rgba(0, 207, 255, 0.58);
    --panel: rgba(0, 10, 25, 0.74);
}


/* ========================================================= */
/* 02 - ESTILOS GENERALES                                    */
/* ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    min-height: 100vh;

    color: var(--white);

    font-family: Arial, Helvetica, sans-serif;

    background:
        #020715
        url("../images/ciudad-futurista.png")
        center center / cover
        fixed
        no-repeat;
}

body::before {
    content: "";

    position: fixed;
    inset: 0;
    z-index: -1;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.78),
            rgba(0, 0, 0, 0.18),
            rgba(0, 0, 0, 0.72)
        );
}


/* ========================================================= */
/* 03 - INTRO DE 3 SEGUNDOS                                  */
/* ========================================================= */

.intro {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #000000;

    transition:
        opacity 0.8s ease,
        visibility 0.8s ease;
}

.intro--hidden {
    opacity: 0;
    visibility: hidden;
}

.intro__logo {
    width: min(220px, 46vw);

    max-width: 220px;

    filter:
        drop-shadow(
            0 0 30px rgba(0, 184, 255, 0.90)
        );
}


/* ========================================================= */
/* 04 - CONTENEDOR PRINCIPAL                                 */
/* ========================================================= */

.page {
    width: min(1560px, calc(100% - 36px));

    margin: 0 auto;
    padding: 22px 0;

    transition: opacity 0.8s ease;
}

.page--hidden {
    opacity: 0;
}


/* ========================================================= */
/* 05 - CABECERA                                             */
/* ========================================================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;

    gap: 16px;
}

.brand__logo {
    width: 122px;
    height: 122px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 0 20px rgba(0, 184, 255, 0.75)
        );
}

.brand__text h1 {
    margin: 0;

    font-size: clamp(1.25rem, 2.3vw, 2.2rem);

    text-transform: uppercase;
}

.brand__line {
    margin: 4px 0 0;

    color: var(--blue);

    font-size: 0.78rem;

    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.brand__line--small {
    color: var(--muted);
    font-size: 0.72rem;
}

.development-label {
    display: inline-block;

    margin: 8px 0 0;
    padding: 5px 10px;

    color: var(--gold);

    font-size: 0.72rem;
    font-weight: bold;

    letter-spacing: 0.16em;

    border: 1px solid var(--gold);
    border-radius: 999px;
}


/* ========================================================= */
/* 06 - MENÚ PRINCIPAL                                       */
/* ========================================================= */

.main-menu{
    order:3;
}

.ingrid-image-wrapper{
    order:2;
}

.ingrid-text{
    order:4;
}
.main-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;

    gap: 8px;

    max-width: 1050px;
}

.main-menu a,
.language-button,
.ingrid-links a {
    padding: 9px 12px;

    color: var(--white);

    font-size: 0.72rem;

    text-decoration: none;
    text-transform: uppercase;

    background: rgba(0, 184, 255, 0.08);

    border: 1px solid rgba(0, 184, 255, 0.30);
    border-radius: 999px;
}

.main-menu a:hover,
.language-button:hover,
.ingrid-links a:hover {
    color: var(--blue);

    box-shadow:
        0 0 20px rgba(0, 184, 255, 0.28);
}


/* ========================================================= */
/* 07 - ZONA CENTRAL                                         */
/* ========================================================= */

.hero {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;

    align-items: start;

    gap: 28px;

    margin-top: 18px;
}


/* ========================================================= */
/* 08 - COLUMNA DE INGRID                                    */
/* El orden no cambia entre ordenador y móvil                */
/* ========================================================= */

.ingrid-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 14px;

    min-height: 560px;

    padding-left: 18px;
}


/* ========================================================= */
/* 09 - IDIOMAS                                              */
/* ========================================================= */

.language-selector {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    width: 100%;
}

.language-button {
    font-family: inherit;

    cursor: pointer;
}

.language-button--active {
    background: rgba(0, 184, 255, 0.24);
}


/* ========================================================= */
/* 10 - FOTO DE INGRID                                       */
/* ========================================================= */

.ingrid-image-wrapper {
    display: flex;
    justify-content: flex-start;

    width: 100%;
}

.ingrid-image {
    display: block;

    max-width: 90%;
    max-height: 402px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 0 32px rgba(0, 184, 255, 0.45)
        );
}


/* ========================================================= */
/* 11 - TEXTO DE INGRID                                      */
/* ========================================================= */

.ingrid-text {
    width: 100%;
    max-width: 410px;
}

.section-label {
    margin: 0 0 10px;

    color: var(--blue);

    font-size: 0.76rem;

    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.ingrid-title {
    margin: 0;

    font-size: 1.45rem;
    font-weight: 300;
}

.ingrid-title strong {
    display: block;

    margin-top: 4px;

    color: var(--blue);

    font-size: 1.55em;
    font-weight: 500;
}

.ingrid-text p {
    color: var(--muted);

    line-height: 1.55;
}

.ingrid-question {
    color: var(--white) !important;
    font-size: 1.12rem;
}


/* ========================================================= */
/* 12 - BOTONES BAJO INGRID                                  */
/* ========================================================= */

.ingrid-links {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    width: 100%;
}


/* ========================================================= */
/* 13 - PANEL DE CURSOS                                      */
/* ========================================================= */

.courses-panel {
    padding: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(4, 24, 52, 0.78),
            var(--panel)
        );

    border: 1px solid var(--border);
    border-radius: 22px;

    box-shadow:
        0 0 30px rgba(0, 184, 255, 0.30);
}

.courses-panel h2 {
    margin: 0 0 18px;

    color: var(--blue);

    text-align: center;
    text-transform: uppercase;
}

.course-card {
    display: flex;
    align-items: center;

    gap: 16px;

    margin: 12px 0;
    padding: 16px;

    color: var(--white);
    text-decoration: none;

    background: rgba(0, 13, 31, 0.54);

    border: 1px solid rgba(0, 184, 255, 0.34);
    border-radius: 16px;
}

.course-card__icon {
    display: grid;
    place-items: center;

    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    color: var(--blue);

    border: 1px solid rgba(0, 184, 255, 0.45);
    border-radius: 50%;
}

.course-card strong {
    display: block;

    color: var(--blue);

    text-transform: uppercase;
}

.course-card small {
    display: block;

    margin-top: 5px;

    color: var(--muted);

    line-height: 1.35;
}


/* ========================================================= */
/* 14 - TARJETAS DE CONTACTO                                 */
/* ========================================================= */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 16px;

    margin-top: 22px;
}

.contact-card {
    min-height: 126px;
    padding: 20px;

    color: var(--white);

    text-align: center;
    text-decoration: none;

    background:
        linear-gradient(
            135deg,
            rgba(4, 24, 52, 0.78),
            var(--panel)
        );

    border: 1px solid var(--border);
    border-radius: 22px;

    box-shadow:
        0 0 30px rgba(0, 184, 255, 0.30);
}

.contact-card strong {
    display: block;

    color: var(--blue);

    text-transform: uppercase;
}

.contact-card small {
    color: var(--muted);
}


/* ========================================================= */
/* 15 - PANEL DEL PROFESOR                                   */
/* ========================================================= */

.teacher-panel {
    display: flex;
    align-items: center;

    gap: 18px;

    max-width: 720px;

    margin-top: 22px;
    margin-left: auto;
    padding: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(4, 24, 52, 0.78),
            var(--panel)
        );

    border: 1px solid var(--border);
    border-radius: 22px;
}

.teacher-panel img {
    width: 116px;
    height: 116px;

    object-fit: cover;

    border: 1px solid var(--border);
    border-radius: 16px;
}

.teacher-panel h2 {
    margin: 4px 0 8px;

    color: var(--blue);

    font-size: 1rem;
}

.teacher-panel p {
    margin: 6px 0;

    color: var(--muted);
}


/* ========================================================= */
/* 16 - PIE DE PÁGINA                                        */
/* ========================================================= */

.footer {
    padding: 22px 0;

    color: var(--muted);

    text-align: center;
}


/* ========================================================= */
/* 17 - TABLET Y MÓVIL                                       */
/* El orden de Ingrid permanece igual                         */
/* ========================================================= */

@media (max-width: 1000px) {

    .header {
        display: block;
    }

    .main-menu {
        justify-content: flex-start;

        margin-top: 18px;
    }

    .hero {
        display: block;
    }

    .ingrid-column {
        align-items: center;

        min-height: auto;

        padding-left: 0;

        text-align: center;
    }

    .language-selector,
    .ingrid-image-wrapper,
    .ingrid-links {
        justify-content: center;
    }

    .ingrid-text {
        margin: 0 auto;
    }

    .courses-panel {
        margin-top: 28px;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

}


/* ========================================================= */
/* 18 - MÓVILES PEQUEÑOS                                     */
/* ========================================================= */

@media (max-width: 600px) {

    .page {
        width: min(100% - 18px, 640px);
    }

    .brand__logo {
        width: 70px;
        height: 70px;
    }

    .brand__text h1 {
        font-size: 1rem;
    }

    .main-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);

        width: 100%;
    }

    .main-menu a {
        text-align: center;
    }

    .ingrid-image {
        max-width: 66%;
        max-height: 240px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .teacher-panel {
        flex-direction: column;

        margin-left: 0;

        text-align: center;
    }

}


/* ========================================================= */
/* 19 - AJUSTES ESPECÍFICOS PARA MÓVIL                       */
/* Escudo e Ingrid más pequeños                              */
/* ========================================================= */

@media (max-width: 600px) {

    .intro__logo {
        width: 160px !important;
        max-width: 64vw !important;
    }

    .brand__logo {
        width: 80px !important;
        height: 80px !important;
        flex: 0 0 80px !important;
    }

    .brand__text h1 {
        font-size: 0.95rem !important;
    }

    .brand__line {
        font-size: 0.58rem !important;
        letter-spacing: 0.08em !important;
    }

    .brand__line--small {
        font-size: 0.52rem !important;
    }

    .development-label {
        margin-top: 5px !important;
        padding: 3px 8px !important;
        font-size: 0.50rem !important;
        letter-spacing: 0.10em !important;
    }

    .ingrid-column {
        gap: 8px !important;
    }

    .language-selector {
        margin-bottom: 2px !important;
    }

    .language-button {
        padding: 7px 10px !important;
        font-size: 0.68rem !important;
    }

    .ingrid-image {
        width: 48% !important;
        max-width: 270px !important;
        max-height: 290px !important;
        height: auto !important;
    }

    .ingrid-text {
        margin-top: 2px !important;
    }
}


/* ========================================================= */
/* 20 - CORRECCIÓN DEFINITIVA PARA TELÉFONO MÓVIL            */
/* ========================================================= */

@media (max-width: 600px) {

    /* Logotipo de introducción: mitad de tamaño */
    .intro__logo {
        width: 190px !important;
        max-width: 190px !important;
        height: auto !important;
    }

    /* Logotipo de cabecera: mitad de tamaño */
    .brand {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .brand__logo {
        width: 106px !important;
        height: 106px !important;
        flex: 0 0 96px !important;
    }

    /* Orden fijo: idioma, Ingrid, texto, botones */
    .ingrid-column {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        min-height: auto !important;
        padding-left: 0 !important;
        text-align: center !important;
    }

    .language-selector {
        order: 1 !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 8px 0 4px !important;
    }

    .ingrid-image-wrapper {
        order: 2 !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Ingrid: mitad del tamaño de escritorio */
    .ingrid-image {
        width: auto !important;
        max-width: 80% !important;
        max-height: 251px !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    .ingrid-text {
        order: 3 !important;
        width: 100% !important;
        max-width: 410px !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    .ingrid-links {
        order: 4 !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* Recuperar presentación anterior del panel de cursos */
    .courses-panel {
        display: block !important;
        width: 100% !important;
        margin-top: 24px !important;
        padding: 18px !important;
    }

    .course-card {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        width: 100% !important;
        margin: 12px 0 !important;
        padding: 15px !important;
        text-align: left !important;
    }

    .course-card__icon {
        flex: 0 0 44px !important;
        width: 44px !important;
        height: 44px !important;
    }

    .course-card strong,
    .course-card small {
        text-align: left !important;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---------- BOTONES DEBAJO DE INGRID ---------- */

.ingrid-mobile-menu{
    display:none;
}

@media (max-width:600px){

    .ingrid-mobile-menu{

        display:grid;

        grid-template-columns:repeat(2,1fr);

        gap:8px;

        width:100%;

        margin-top:10px;

        margin-bottom:12px;

    }

    .ingrid-mobile-menu a{

        padding:10px;

        text-align:center;

        text-decoration:none;

        color:white;

        background:rgba(0,184,255,.12);

        border:1px solid rgba(0,184,255,.45);

        border-radius:40px;

    }

}