/* =========================================================
   BLOCK GAMA
========================================================= */

.gama {
    padding: 128px 0;
    background: #f8f7f3;
}

.gama__container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-right: 48px;
    padding-left: 48px;
}

/* =========================================================
   CABECERA
========================================================= */

.gama__header {
    max-width: 720px;
}

.gama__section-label {
    display: flex;
    align-items: center;
    gap: 12px;

    color: #0077ab;

    font-size: 12px;
    font-weight: 800;
    line-height: 1;

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

.gama__section-number::after {
    content: "/";
    margin-left: 5px;
    color: rgba(17, 24, 39, 0.25);
}

.gama__title {
    max-width: 760px;

    margin: 24px 0 0;

    color: #111827;

    font-size: clamp(38px, 3.6vw, 56px);
    font-weight: 800;
    line-height: 1.08;

    letter-spacing: -0.03em;

    text-wrap: balance;
}

/* =========================================================
   DESKTOP
========================================================= */

.gama__desktop {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

    gap: 64px;

    margin-top: 96px;
}

/* =========================================================
   LISTADO IZQUIERDO
========================================================= */

.gama__desktop-list {
    min-width: 0;
}

.gama__desktop-item {
    border-top: 1px solid rgba(17, 24, 39, 0.10);
}

.gama__desktop-item:first-child {
    border-top: 0;
}

/* =========================================================
   TRIGGER
========================================================= */

.gama__desktop-trigger {
    display: flex;
    align-items: baseline;

    gap: 24px;

    width: 100%;

    padding: 32px 0;

    border: 0;

    background: transparent;

    text-align: left;

    cursor: pointer;
}

.gama__desktop-trigger:focus-visible {
    outline: 2px solid #0077ab;
    outline-offset: 4px;
}

.gama__number {
    flex: 0 0 auto;

    color: rgba(17, 24, 39, 0.20);

    font-size: 24px;
    font-weight: 800;
    line-height: 1;

    transition: color 0.3s ease;
}

.gama__desktop-main {
    flex: 1;
    min-width: 0;
}

.gama__item-title {
    display: block;

    color: rgba(17, 24, 39, 0.40);

    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;

    transition: color 0.3s ease;
}

.gama__desktop-item.is-active .gama__number {
    color: #0077ab;
}

.gama__desktop-item.is-active .gama__item-title {
    color: #111827;
}

/* =========================================================
   CONTENIDO DESPLEGABLE
========================================================= */

.gama__desktop-content {
    display: grid;
    grid-template-rows: 0fr;

    opacity: 0;

    transition:
        grid-template-rows 0.35s ease,
        opacity 0.3s ease;
}

.gama__desktop-inner {
    overflow: hidden;

    padding-left: 60px;
}

.gama__desktop-item.is-active .gama__desktop-content {
    grid-template-rows: 1fr;

    opacity: 1;
}

.gama__desktop-item.is-active .gama__desktop-inner {
    padding-bottom: 32px;
}

/* =========================================================
   SUBTÍTULO
========================================================= */

.gama__subtitle {
    margin-bottom: 12px;

    color: #0077ab;

    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;

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

/* =========================================================
   CLASSIC TEXT
========================================================= */

.gama__richtext {
    color: rgba(17, 24, 39, 0.70);

    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
}

.gama__richtext p {
    margin: 0 0 12px;
}

.gama__richtext p:last-child {
    margin-bottom: 0;
}

.gama__richtext ul,
.gama__richtext ol {
    margin: 12px 0 0;
    padding: 0;

    list-style: none;
}

.gama__richtext li {
    position: relative;

    margin-bottom: 8px;
    padding-left: 18px;
}

.gama__richtext li:last-child {
    margin-bottom: 0;
}

.gama__richtext li::before {
    content: "";

    position: absolute;
    top: 0.7em;
    left: 0;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #0077ab;

    transform: translateY(-50%);
}

.gama__richtext strong,
.gama__richtext b {
    color: #111827;
    font-weight: 700;
}

.gama__richtext a {
    color: #0077ab;

    text-decoration: underline;
    text-underline-offset: 2px;
}

/* =========================================================
   CTA
========================================================= */

.gama__cta-wrapper {
    margin-top: 24px;
}

.gama__cta {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 0;

    border: 0;

    background: transparent;
    color: #0077ab;

    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;

    text-decoration: none;

    cursor: pointer;

    transition: color 0.2s ease;
}

.gama__cta:hover,
.gama__cta:focus {
    color: #004d73;
    text-decoration: none;
}

.gama__cta svg {
    transition: transform 0.2s ease;
}

.gama__cta:hover svg,
.gama__cta:focus svg {
    transform: translateX(6px);
}

/* =========================================================
   IMAGEN DERECHA
========================================================= */

.gama__desktop-image-column {
    min-width: 0;
}

.gama__desktop-image-sticky {
    position: sticky;
    top: 112px;

    aspect-ratio: 4 / 5;

    overflow: hidden;

    border-radius: 8px;

    background: rgba(17, 24, 39, 0.05);
}

.gama__desktop-image {
    position: absolute;
    inset: 0;

    visibility: hidden;
    opacity: 0;

    transform: scale(0.98);

    transition:
        opacity 0.4s ease,
        transform 0.4s ease,
        visibility 0.4s ease;
}

.gama__desktop-image.is-active {
    visibility: visible;
    opacity: 1;

    transform: scale(1);
}

.gama__desktop-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

/* =========================================================
   MÓVIL
========================================================= */

.gama__mobile {
    display: none;
}

/* =========================================================
   POPUP
========================================================= */

.gama-popup {
    position: fixed;
    inset: 0;

    z-index: 999999;

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

    padding: 24px;

    visibility: hidden;
    opacity: 0;

    pointer-events: none;

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

.gama-popup.is-open {
    visibility: visible;
    opacity: 1;

    pointer-events: auto;
}

.gama-popup__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(8, 18, 26, 0.78);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.gama-popup__dialog {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 760px;
    max-height: calc(100dvh - 48px);

    overflow-y: auto;

    padding: 48px;

    border-radius: 8px;

    background: #ffffff;

    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.28);

    opacity: 0;

    transform:
        translateY(18px)
        scale(0.985);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.gama-popup.is-open .gama-popup__dialog {
    opacity: 1;

    transform:
        translateY(0)
        scale(1);
}

/* =========================================================
   CERRAR
========================================================= */

.gama-popup__close {
    position: absolute;
    top: 14px;
    right: 16px;

    z-index: 3;

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

    width: 38px;
    height: 38px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #111827;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.gama-popup__close:hover,
.gama-popup__close:focus {
    background: rgba(17, 24, 39, 0.07);
    color: #0077ab;
}

/* =========================================================
   HUBSPOT
========================================================= */

.gama-popup__content {
    width: 100%;

    color: #111827;
}

.gama-popup__content .hbspt-form,
.gama-popup__content .hs-form {
    width: 100%;
}

.gama-popup__content fieldset {
    max-width: none !important;
}

.gama-popup__content .hs-form-field {
    margin-bottom: 18px;
}

.gama-popup__content label {
    display: block;

    margin-bottom: 7px;

    color: #111827;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.gama-popup__content input[type="text"],
.gama-popup__content input[type="email"],
.gama-popup__content input[type="tel"],
.gama-popup__content input[type="number"],
.gama-popup__content input[type="url"],
.gama-popup__content input[type="date"],
.gama-popup__content select,
.gama-popup__content textarea {
    display: block;

    width: 100% !important;
    min-height: 50px;

    padding: 12px 14px !important;

    border: 1px solid rgba(17, 24, 39, 0.18) !important;
    border-radius: 4px !important;

    background: #ffffff !important;
    color: #111827 !important;

    font-family: inherit !important;
    font-size: 15px !important;

    box-shadow: none !important;
}

.gama-popup__content textarea {
    min-height: 120px;
    resize: vertical;
}

.gama-popup__content input:focus,
.gama-popup__content select:focus,
.gama-popup__content textarea:focus {
    border-color: #0077ab !important;

    outline: none !important;

    box-shadow:
        0 0 0 3px rgba(0, 119, 171, 0.12) !important;
}

.gama-popup__content .hs-submit {
    margin-top: 24px;
}

.gama-popup__content .hs-button,
.gama-popup__content input[type="submit"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-height: 50px;

    padding: 14px 24px !important;

    border: 1px solid #0077ab !important;
    border-radius: 4px !important;

    background: #0077ab !important;
    color: #ffffff !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;

    cursor: pointer;

    box-shadow: none !important;
}

.gama-popup__content .hs-button:hover,
.gama-popup__content input[type="submit"]:hover {
    border-color: #005f89 !important;
    background: #005f89 !important;
}

html.gama-popup-open,
body.gama-popup-open {
    overflow: hidden;
}

/* =========================================================
   TABLET Y MÓVIL
========================================================= */

@media (max-width: 1023px) {

    .gama {
        padding: 104px 0;
    }

    .gama__container {
        padding-right: 32px;
        padding-left: 32px;
    }

    .gama__desktop {
        display: none;
    }

    .gama__mobile {
        display: flex;
        flex-direction: column;

        gap: 12px;

        margin-top: 56px;
    }

    .gama__mobile-item {
        overflow: hidden;

        border: 1px solid rgba(17, 24, 39, 0.10);
        border-radius: 6px;

        background: #ffffff;
    }

    .gama__mobile-trigger {
        display: flex;
        align-items: center;

        gap: 16px;

        width: 100%;

        padding: 20px;

        border: 0;

        background: transparent;

        text-align: left;

        cursor: pointer;
    }

    .gama__mobile-number {
        flex: 0 0 auto;

        color: #0077ab;

        font-size: 20px;
        font-weight: 800;
        line-height: 1;
    }

    .gama__mobile-title {
        flex: 1;

        color: #111827;

        font-size: 18px;
        font-weight: 700;
        line-height: 1.3;
    }

    /* PLUS */

    .gama__mobile-icon {
        position: relative;

        flex: 0 0 auto;

        width: 20px;
        height: 20px;

        opacity: 0.5;
    }

    .gama__mobile-icon::before,
    .gama__mobile-icon::after {
        content: "";

        position: absolute;
        top: 50%;
        left: 50%;

        width: 14px;
        height: 2px;

        background: #111827;

        transform:
            translate(-50%, -50%);
    }

    .gama__mobile-icon::after {
        transform:
            translate(-50%, -50%)
            rotate(90deg);

        transition: transform 0.25s ease;
    }

    .gama__mobile-item.is-open
    .gama__mobile-icon::after {
        transform:
            translate(-50%, -50%)
            rotate(0deg);
    }

    /* CONTENIDO */

    .gama__mobile-content {
        display: grid;
        grid-template-rows: 0fr;

        opacity: 0;

        transition:
            grid-template-rows 0.3s ease,
            opacity 0.3s ease;
    }

    .gama__mobile-inner {
        overflow: hidden;

        padding: 0 20px;
    }

    .gama__mobile-item.is-open
    .gama__mobile-content {
        grid-template-rows: 1fr;

        opacity: 1;
    }

    .gama__mobile-item.is-open
    .gama__mobile-inner {
        padding-bottom: 20px;
    }

    .gama__mobile-image {
        overflow: hidden;

        aspect-ratio: 4 / 3;

        margin-bottom: 20px;

        border-radius: 6px;

        background: rgba(17, 24, 39, 0.05);
    }

    .gama__mobile-image img {
        display: block;

        width: 100%;
        height: 100%;

        object-fit: cover;
    }
}

/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 768px) {

    .gama {
        padding: 80px 0;
    }

    .gama__container {
        padding-right: 20px;
        padding-left: 20px;
    }

    .gama__title {
        margin-top: 20px;

        font-size: 38px;
    }

    .gama__mobile {
        margin-top: 48px;
    }

    .gama-popup {
        padding: 16px;
    }

    .gama-popup__dialog {
        max-height: calc(100dvh - 32px);

        padding:
            48px
            24px
            28px;
    }
}

/* =========================================================
   MÓVIL PEQUEÑO
========================================================= */

@media (max-width: 520px) {

    .gama {
        padding: 64px 0;
    }

    .gama__title {
        font-size: 34px;
    }

    .gama__mobile {
        margin-top: 40px;
    }

    .gama__mobile-trigger {
        gap: 12px;

        padding: 18px;
    }

    .gama__mobile-number {
        font-size: 18px;
    }

    .gama__mobile-title {
        font-size: 17px;
    }

    .gama__mobile-inner {
        padding-right: 18px;
        padding-left: 18px;
    }

    .gama__mobile-item.is-open
    .gama__mobile-inner {
        padding-bottom: 18px;
    }

    .gama-popup__dialog {
        padding:
            46px
            18px
            24px;
    }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .gama__desktop-content,
    .gama__desktop-image,
    .gama__number,
    .gama__item-title,
    .gama__cta,
    .gama__cta svg,
    .gama__mobile-content,
    .gama__mobile-icon::after,
    .gama-popup,
    .gama-popup__dialog {
        transition: none;
    }
}