/* ==================================================
   PROGRAMAS GALLERS
   DISEÑO EDITORIAL RESPONSIVE - VERSIÓN 1.1
   ================================================== */


/* ==================================================
   01. COLORES Y TIPOGRAFÍAS
   ================================================== */

.gpg-single,
.gpg-track {
    --gpg-gold: #DFB76C;
    --gpg-gold-dark: #9B731E;
    --gpg-gold-light: #F4EBDD;
    --gpg-dark: #242424;
    --gpg-gray: #626262;
    --gpg-light: #F5F5F3;
    --gpg-white: #FFFFFF;

    --gpg-serif: Garamond, Georgia, serif;
    --gpg-sans: 'League Spartan', sans-serif;
}


/* ==================================================
   02. CONTENEDOR DE TARJETAS DE CURSOS
   ================================================== */

.gpg-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);

    gap: 18px;

    width: 100%;
    max-width: 1440px;

    padding: 0 0 10px !important;
    margin: 0 auto !important;

    list-style: none !important;

    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;

    scrollbar-width: thin;
    scrollbar-color: #C59B4E transparent;
}

.gpg-track > li {
    min-width: 0;
    list-style: none;
    scroll-snap-align: start;
}


/* ==================================================
   03. DISEÑO INDIVIDUAL DE LAS TARJETAS
   ================================================== */

.gpg-card {
    position: relative;
    isolation: isolate;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    aspect-ratio: 4 / 5;

    overflow: hidden;
    border-radius: 14px;

    background: linear-gradient(
        160deg,
        #786B58,
        #181818 75%
    );

    color: #FFFFFF !important;
    text-decoration: none !important;
    text-align: center;
}


/* Fotografía de fondo */

.gpg-photo {
    position: absolute;
    inset: 0;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover;
    object-position: center;

    z-index: -2;

    transition: transform .6s ease;
}


/* Degradado inferior */

.gpg-card::after {
    content: '';

    position: absolute;
    inset: 0;
    z-index: -1;

    background: linear-gradient(
        to bottom,
        transparent 15%,
        rgba(0,0,0,.12) 40%,
        rgba(0,0,0,.72) 75%,
        rgba(0,0,0,.95) 100%
    );
}


/* Textos de las tarjetas */

.gpg-copy {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 7px;

    width: 100%;
    padding: 20px 10px;
}

.gpg-copy strong {
    font-family: var(--gpg-serif);
    font-style: italic;
    font-weight: 400;

    font-size: clamp(24px, 2.7vw, 48px);
    line-height: 1.05;

    overflow-wrap: anywhere;
}

.gpg-copy > span {
    font-family: var(--gpg-sans);
    font-size: clamp(13px, 1.1vw, 17px);
    line-height: 1.25;
}

.gpg-copy > span:last-child {
    color: var(--gpg-gold);
    font-size: 22px;

    transition: transform .3s ease;
}


/* Animaciones de las tarjetas */

.gpg-card:hover .gpg-photo {
    transform: scale(1.07);
}

.gpg-card:hover .gpg-copy > span:last-child {
    transform: translate(3px, -3px);
}

.gpg-card:focus-visible {
    outline: 3px solid var(--gpg-gold);
    outline-offset: -3px;
}


/* ==================================================
   04. PÁGINA INDIVIDUAL DEL PROGRAMA
   ================================================== */

.gpg-single,
.gpg-single * {
    box-sizing: border-box;
}

.gpg-single {
    width: 100%;
    max-width: 1440px;

    margin: 0 auto;

    padding:
        clamp(110px, 9vw, 155px)
        clamp(20px, 4vw, 60px)
        70px;

    font-family: var(--gpg-sans);
    font-size: 18px;
    line-height: 1.6;

    color: var(--gpg-dark);
}


/* ==================================================
   05. BANNER PRINCIPAL
   ================================================== */

.gpg-hero {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    align-items: stretch;

    min-height: 480px;

    overflow: hidden;
    border-radius: 24px;

    background: linear-gradient(
        135deg,
        #38332B 0%,
        #242424 50%,
        #181818 100%
    );

    color: #FFFFFF;
}

.gpg-hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    padding: clamp(30px, 5vw, 80px);
}

.gpg-eyebrow {
    margin: 0 0 14px !important;

    font-family: var(--gpg-sans);
    font-size: 13px;
    font-weight: 500;

    letter-spacing: .17em;
    line-height: 1.4;
    text-transform: uppercase;

    color: var(--gpg-gold-dark);
}

.gpg-hero .gpg-eyebrow {
    color: var(--gpg-gold);
}

.gpg-hero h1 {
    margin: 0 0 15px !important;

    font-family: var(--gpg-serif);
    font-size: clamp(65px, 7vw, 115px);
    font-weight: 400;
    line-height: .98;

    overflow-wrap: anywhere;

    color: #FFFFFF;
}

.gpg-hero-phrase {
    margin: 10px 0 30px !important;

    font-family: var(--gpg-serif);
    font-size: clamp(25px, 3vw, 44px);
    font-style: italic;
    line-height: 1.2;

    color: var(--gpg-gold);
}


/* Fotografía del banner */

.gpg-hero-media {
    position: relative;
    min-height: 100%;
    overflow: hidden;
}

.gpg-hero-image {
    position: absolute;
    inset: 0;

    width: 100% !important;
    height: 100% !important;

    max-height: none !important;

    object-fit: cover;
    object-position: center;
}

.gpg-hero-no-image {
    grid-template-columns: 1fr;
}

.gpg-hero-no-image .gpg-hero-content {
    align-items: center;
    text-align: center;
}


/* ==================================================
   06. BOTONES
   ================================================== */

.gpg-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    min-height: 48px;

    padding: 14px 28px;

    background: linear-gradient(
        110deg,
        #DFB76C,
        #C59B4E
    );

    border-radius: 50px;

    font-family: var(--gpg-sans);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.3;

    text-align: center;
    text-decoration: none !important;

    color: #181818 !important;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.gpg-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197,155,78,.25);
}

.gpg-cta:focus-visible,
.gpg-module summary:focus-visible,
.gpg-video-link:focus-visible {
    outline: 3px solid #9B731E;
    outline-offset: 4px;
}


/* ==================================================
   07. INDICADORES ACADÉMICOS
   ================================================== */

.gpg-facts {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(140px, 1fr));

    gap: 0;

    margin: 25px 0 0;
    padding: 28px 12px;

    background: linear-gradient(
        120deg,
        #F4EBDD,
        #EAD7B6
    );

    border-radius: 18px;
}

.gpg-fact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 12px 16px;

    text-align: center;
}

.gpg-fact strong {
    display: block;

    font-family: var(--gpg-serif);
    font-size: clamp(22px, 2.1vw, 32px);
    font-weight: 400;
    line-height: 1.15;

    color: #876326;
}

.gpg-fact span {
    display: block;

    font-family: var(--gpg-sans);
    font-size: 15px;
    line-height: 1.3;

    color: #555555;
}


/* ==================================================
   08. ENCABEZADOS EDITORIALES
   ================================================== */

.gpg-section-heading {
    margin: 0 auto 32px;
    text-align: center;
}

.gpg-single h2 {
    margin: 0;

    font-family: var(--gpg-serif);
    font-size: clamp(38px, 4.5vw, 65px);
    font-weight: 400;
    line-height: 1.1;

    color: #181818;
}

.gpg-single h2 em {
    font-weight: 400;
    color: #626262;
}

.gpg-description h2 em {
    display: block;
}


/* ==================================================
   09. DESCRIPCIÓN DEL PROGRAMA
   ================================================== */

.gpg-single section {
    margin: 65px 0;
}

.gpg-description {
    padding: 25px 0;
    text-align: center;
}

.gpg-description-body {
    max-width: 900px;
    margin: 0 auto;

    font-family: var(--gpg-sans);
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.65;

    color: #555555;
}

.gpg-description-body p {
    margin: 0 0 20px;
}

.gpg-video-link {
    display: inline-block;

    margin-top: 15px;
    padding: 12px 24px;

    border: 1px solid #C59B4E;
    border-radius: 40px;

    text-decoration: none !important;
    color: #876326 !important;
}


/* ==================================================
   10. MÓDULOS ACADÉMICOS DESPLEGABLES
   ================================================== */

.gpg-modules {
    padding: clamp(24px, 5vw, 65px);

    background: #F1F1EF;
    border-radius: 24px;
}

.gpg-module-list {
    max-width: 1000px;
    margin: 0 auto;
}

.gpg-module {
    margin: 10px 0;

    background: #FFFFFF;

    border: 1px solid #E5E5E0;
    border-radius: 12px;

    overflow: hidden;

    transition: border-color .3s ease;
}

.gpg-module[open] {
    border-color: #C59B4E;
}

.gpg-module summary {
    display: flex;
    align-items: center;

    gap: 18px;

    min-height: 65px;
    padding: 18px 22px;

    list-style: none;
    cursor: pointer;
}

.gpg-module summary::-webkit-details-marker {
    display: none;
}

.gpg-module-number {
    flex-shrink: 0;

    font-family: var(--gpg-serif);
    font-size: 30px;
    font-weight: 400;

    color: #9B731E;
}

.gpg-module-title {
    flex: 1;

    font-family: var(--gpg-sans);
    font-size: clamp(17px, 1.6vw, 22px);
    font-weight: 500;
    line-height: 1.3;

    color: #242424;
}

.gpg-module-icon {
    flex-shrink: 0;

    font-size: 26px;
    line-height: 1;

    color: #9B731E;
}

.gpg-module-icon::before {
    content: '+';
}

.gpg-module[open] .gpg-module-icon::before {
    content: '−';
}

.gpg-module-body {
    padding: 0 24px 20px 65px;

    font-size: 18px;
    line-height: 1.6;

    color: #626262;
}

.gpg-module-body p {
    margin: 0;
}


/* ==================================================
   11. PRECIOS Y HORARIOS POR SEDE
   ================================================== */

.gpg-prices {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(240px, 1fr));

    gap: 20px;
}

.gpg-prices > article {
    padding: 28px;

    background: #F4EBDD;

    border: 1px solid #E8D7B7;
    border-radius: 18px;
}

.gpg-prices h3 {
    margin: 0 0 20px;

    font-family: var(--gpg-serif);
    font-size: 32px;
    font-weight: 400;

    color: #876326;
}

.gpg-price-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    gap: 10px;

    padding: 12px 0;

    border-bottom: 1px solid rgba(155,115,30,.15);
}


/* ==================================================
   12. SECCIÓN FINAL DE INSCRIPCIÓN
   ================================================== */

.gpg-enrollment {
    padding: clamp(40px, 7vw, 90px) 24px;

    background: linear-gradient(
        135deg,
        #38332B,
        #181818
    );

    border-radius: 24px;

    text-align: center;
    color: #FFFFFF;
}

.gpg-enrollment .gpg-eyebrow {
    color: var(--gpg-gold);
}

.gpg-enrollment h2 {
    color: #FFFFFF;
}

.gpg-enrollment h2 em {
    color: var(--gpg-gold);
}

.gpg-enrollment > p:not(.gpg-eyebrow) {
    margin: 20px auto 28px;

    font-size: 20px;

    color: #E1E1E1;
}


/* ==================================================
   13. RESPONSIVE - ESCRITORIO
   Cinco tarjetas visibles
   ================================================== */

@media (min-width: 1181px) {

    .gpg-track {
        grid-auto-columns:
            calc((100% - 72px) / 5);
    }

}


/* ==================================================
   14. RESPONSIVE - PANTALLAS EXTRAGRANDES
   ================================================== */

@media (min-width: 1600px) {

    .gpg-single {
        max-width: 1560px;
    }

    .gpg-hero {
        min-height: 620px;
    }

    .gpg-track {
        max-width: 1500px;
    }

}


/* ==================================================
   15. RESPONSIVE - TABLET HORIZONTAL
   Cuatro tarjetas visibles
   ================================================== */

@media (min-width: 1025px)
and (max-width: 1180px) {

    .gpg-track {
        grid-auto-columns:
            calc((100% - 54px) / 4);
    }

    .gpg-hero {
        min-height: 420px;
    }

    .gpg-hero h1 {
        font-size: clamp(55px, 6vw, 85px);
    }

}


/* ==================================================
   16. RESPONSIVE - TABLET VERTICAL
   Tres tarjetas visibles
   ================================================== */

@media (min-width: 768px)
and (max-width: 1024px) {

    .gpg-track {
        grid-auto-columns:
            calc((100% - 36px) / 3);
    }

    .gpg-copy strong {
        font-size: 34px;
    }

    .gpg-hero {
        min-height: 420px;
    }

    .gpg-hero-content {
        padding: 35px;
    }

    .gpg-hero h1 {
        font-size: clamp(48px, 7vw, 75px);
    }

    .gpg-facts {
        grid-template-columns:
            repeat(auto-fit, minmax(120px, 1fr));
    }

    .gpg-fact {
        padding: 12px 8px;
    }

}


/* ==================================================
   17. RESPONSIVE - DISPOSITIVOS MÓVILES
   Dos tarjetas visibles y desplazamiento táctil
   ================================================== */

@media (max-width: 767px) {

    .gpg-track {
        gap: 12px;

        grid-auto-columns:
            calc((100% - 12px) / 2);
    }

    .gpg-card {
        border-radius: 12px;
    }

    .gpg-copy {
        gap: 5px;
        padding: 14px 8px;
    }

    .gpg-copy strong {
        font-size: clamp(23px, 7vw, 36px);
    }

    .gpg-copy > span {
        font-size: 12px;
    }

    .gpg-single {
        padding: 95px 16px 35px;
    }

    .gpg-hero {
        grid-template-columns: 1fr;

        min-height: 0;
        border-radius: 18px;
    }

    .gpg-hero-content {
        align-items: center;

        padding: 38px 20px;

        text-align: center;
    }

    .gpg-hero h1 {
        font-size: clamp(55px, 13vw, 85px);
    }

    .gpg-hero-phrase {
        font-size: 30px;
        margin-bottom: 22px !important;
    }

    .gpg-hero-media {
        min-height: 0;
        aspect-ratio: 4 / 5;
    }

    .gpg-hero-image {
        object-position: center;
    }

    .gpg-facts {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        padding: 15px 8px;
        margin-top: 15px;

        border-radius: 14px;
    }

    .gpg-fact {
        padding: 15px 8px;
    }

    .gpg-fact:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .gpg-fact strong {
        font-size: 25px;
    }

    .gpg-fact span {
        font-size: 14px;
    }

    .gpg-single section {
        margin: 38px 0;
    }

    .gpg-single h2 {
        font-size: clamp(36px, 10vw, 50px);
    }

    .gpg-description {
        padding: 10px 5px;
    }

    .gpg-description-body {
        font-size: 18px;
        line-height: 1.6;
    }

    .gpg-modules {
        padding: 28px 14px;
        border-radius: 18px;
    }

    .gpg-module summary {
        gap: 12px;
        padding: 15px 12px;
    }

    .gpg-module-number {
        font-size: 24px;
    }

    .gpg-module-title {
        font-size: 17px;
    }

    .gpg-module-body {
        padding: 0 16px 18px 16px;
        font-size: 16px;
    }

    .gpg-prices {
        grid-template-columns: 1fr;
    }

    .gpg-enrollment {
        padding: 40px 20px;
        border-radius: 18px;
    }

    .gpg-cta {
        font-size: 15px;
        padding: 14px 22px;
    }

}


/* ==================================================
   18. ACCESIBILIDAD Y MOVIMIENTO REDUCIDO
   ================================================== */

@media (prefers-reduced-motion: reduce) {

    .gpg-photo,
    .gpg-card,
    .gpg-cta,
    .gpg-copy > span,
    .gpg-module {
        transition: none !important;
        transform: none !important;
        animation: none !important;
    }

}

/* PRUEBA DE CARGA GALLERS */

main.gpg-single {
    outline: 5px solid red !important;
}
