.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    transition:
        transform 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button img {
    width: 18px;
    height: 18px;
}

.button--primary {
    color: var(--color-white);
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-secondary-dark)
    );
    box-shadow: 0 14px 30px rgba(18, 104, 232, 0.24);
}

.button--ghost {
    color: var(--color-dark);
    border-color: var(--color-border);
    background: rgba(255, 255, 255, 0.82);
}

.button--light {
    color: var(--color-dark);
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
}

.button--large {
    min-height: 54px;
    padding-inline: 26px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    color: var(--color-primary-dark);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(18, 104, 232, 0.14);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-header {
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    left: 0;
    height: var(--header-height);
    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 40px rgba(7, 23, 46, 0.08);
    backdrop-filter: blur(16px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 28px;
}

.site-header__brand {
    flex: 0 0 auto;
}

.site-header__brand img {
    width: 190px;
    height: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
}

.site-nav a {
    color: var(--color-dark-soft);
    font-size: 14px;
    font-weight: 700;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: var(--color-white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.menu-toggle img {
    width: 24px;
    height: 24px;
}

/* =========================================================
   MODAL DE CONTACTO
========================================================= */

.contact-modal {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.contact-modal.is-open {
    display: flex;
}

.contact-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 23, 46, 0.62);
    backdrop-filter: blur(10px);
}

.contact-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    max-height: min(90vh, 860px);
    overflow: auto;
    padding: 34px;
    background: var(--color-white);
    border: 1px solid rgba(18, 104, 232, 0.12);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(7, 23, 46, 0.22);
}

.contact-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--color-dark);
    background: rgba(7, 23, 46, 0.06);
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.contact-modal__header {
    max-width: 620px;
    margin-bottom: 24px;
}

.contact-modal__header h2 {
    margin-top: 16px;
    color: var(--color-dark);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.05;
}

.contact-modal__header p {
    margin-top: 14px;
    color: var(--color-muted);
    font-size: 16px;
    line-height: 1.7;
}

.contact-form {
    display: grid;
    gap: 18px;
}

.contact-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.contact-form label {
    display: grid;
    gap: 8px;
    color: var(--color-dark);
    font-size: 14px;
    font-weight: 800;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--color-dark);
    background: rgba(7, 23, 46, 0.04);
    border: 1px solid rgba(7, 23, 46, 0.12);
    border-radius: 16px;
    font: inherit;
    font-weight: 600;
    outline: none;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    background: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(18, 104, 232, 0.12);
}

.contact-form small {
    min-height: 16px;
    color: #b42318;
    font-size: 12px;
    font-weight: 700;
}

.contact-form__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form__check {
    display: flex !important;
    grid-template-columns: none;
    align-items: flex-start;
    gap: 10px !important;
    color: var(--color-muted) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.contact-form__check input {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    margin-top: 2px;
}

.contact-form__error {
    margin-top: -12px;
}

.contact-form__status {
    min-height: 22px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 800;
}

.contact-form__status.is-error {
    color: #b42318;
}

.contact-form__status.is-success {
    color: var(--color-secondary-dark);
}

.contact-form__submit {
    justify-self: flex-start;
}

body.contact-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .contact-modal {
        padding: 14px;
    }

    .contact-modal__dialog {
        max-height: 92vh;
        padding: 26px 20px;
        border-radius: 22px;
    }

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

    .contact-form__submit {
        width: 100%;
    }
}

/* Ajuste fino modal contacto */
.contact-modal__dialog {
    box-sizing: border-box;
}

.contact-form *,
.contact-form *::before,
.contact-form *::after {
    box-sizing: border-box;
}

@media (max-width: 860px) {
    .contact-modal {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .contact-modal__dialog {
        width: 100%;
        max-width: 640px;
        max-height: none;
        margin: 12px auto;
        padding: 24px 18px;
        overflow: visible;
        border-radius: 20px;
    }

    .contact-modal__header h2 {
        font-size: 30px;
    }
}

@media (max-width: 560px) {
    .contact-modal {
        padding: 0;
    }

    .contact-modal__dialog {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 22px 16px 28px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .contact-modal__close {
        top: 12px;
        right: 12px;
    }

    .contact-modal__header {
        padding-right: 44px;
    }

    .contact-modal__header h2 {
        font-size: 28px;
    }

    .contact-modal__header p {
        font-size: 15px;
    }

    .contact-form {
        gap: 14px;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        min-height: 46px;
        border-radius: 14px;
    }
}

/* Corrección checkbox modal contacto */
.contact-form__check input[type="checkbox"] {
    appearance: auto;
    box-sizing: border-box;
    width: 20px;
    min-width: 20px;
    max-width: 20px;
    height: 20px;
    min-height: 20px;
    max-height: 20px;
    margin: 1px 0 0;
    padding: 0;
    background: initial;
    border-radius: 3px;
    box-shadow: none;
    flex: 0 0 20px;
}

.contact-form__check input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(18, 104, 232, 0.16);
}

@media (max-width: 560px) {
    .contact-form__check {
        align-items: flex-start;
        gap: 12px !important;
    }

    .contact-form__check input[type="checkbox"] {
        margin-top: 2px;
    }
}

/* =========================================================
   BOTÓN FLOTANTE WHATSAPP
========================================================= */

.whatsapp-floating {
    position: fixed;
    z-index: 2200;
    right: 22px;
    bottom: 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 18px;
    color: var(--color-white);
    background: #25d366;
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(37, 211, 102, 0.34);
    font-size: 15px;
    font-weight: 900;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.whatsapp-floating:hover {
    color: var(--color-white);
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 22px 46px rgba(37, 211, 102, 0.42);
}

.whatsapp-floating img {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(1);
}

@media (max-width: 560px) {
    .whatsapp-floating {
        right: 14px;
        bottom: 14px;
        width: 54px;
        min-height: 54px;
        padding: 0;
        justify-content: center;
    }

    .whatsapp-floating span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

/* =========================================================
   PÁGINAS LEGALES
========================================================= */

.legal-page {
    padding-top: var(--header-height);
    background:
        linear-gradient(180deg, rgba(18, 104, 232, 0.06), rgba(255, 255, 255, 0) 360px),
        var(--color-white);
}

.legal-page__hero {
    padding: 82px 0 42px;
}

.legal-page__hero h1 {
    max-width: 880px;
    margin-top: 18px;
    color: var(--color-dark);
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
}

.legal-page__hero p {
    max-width: 720px;
    margin-top: 18px;
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1.7;
}

.legal-page__content {
    padding: 24px 0 96px;
}

.legal-page__container {
    max-width: 880px;
}

.legal-document {
    color: var(--color-dark-soft);
    font-size: 17px;
    line-height: 1.8;
}

.legal-document__updated {
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 800;
}

.legal-document h2 {
    margin-top: 34px;
    color: var(--color-dark);
    font-size: 24px;
    line-height: 1.25;
}

.legal-document p {
    margin-top: 10px;
}

@media (max-width: 560px) {
    .legal-page__hero {
        padding: 56px 0 28px;
    }

    .legal-page__hero h1 {
        font-size: 36px;
    }

    .legal-page__hero p,
    .legal-document {
        font-size: 15px;
    }

    .legal-document h2 {
        font-size: 21px;
    }
}

/* =========================================================
   CONSENTIMIENTO DE COOKIES
========================================================= */

.cookie-consent {
    position: fixed;
    z-index: 2600;
    right: 22px;
    bottom: 92px;
    left: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 980px;
    margin: 0 auto;
    padding: 18px;
    color: var(--color-dark);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(7, 23, 46, 0.1);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(7, 23, 46, 0.18);
    backdrop-filter: blur(14px);
}

.cookie-consent[hidden] {
    display: none;
}

.cookie-consent__content {
    max-width: 620px;
}

.cookie-consent__content strong {
    display: block;
    font-size: 16px;
    font-weight: 900;
}

.cookie-consent__content p {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.55;
}

.cookie-consent__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.cookie-consent__link {
    color: var(--color-primary-dark);
    font-size: 14px;
    font-weight: 900;
}

@media (max-width: 760px) {
    .cookie-consent {
        right: 12px;
        bottom: 78px;
        left: 12px;
        display: grid;
        gap: 14px;
        padding: 16px;
        border-radius: 18px;
    }

    .cookie-consent__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .cookie-consent__link {
        grid-column: 1 / -1;
        text-align: center;
    }
}

/* Ajuste móvil botones banner cookies */
@media (max-width: 760px) {
    .cookie-consent__actions {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .cookie-consent__actions .button {
        width: 100%;
        min-height: 48px;
        padding-inline: 14px;
    }

    .cookie-consent__actions .button--ghost {
        grid-column: 1;
        grid-row: 1;
    }

    .cookie-consent__actions .button--primary {
        grid-column: 2;
        grid-row: 1;
    }

    .cookie-consent__link {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-top: 2px;
    }
}
