/* =========================
   RESET
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
}

/* =========================
   BASE
========================= */
body.portal-body {
    min-height: 100vh;
    background: var(--bg-page);
    color: var(--text);
    font-family: "Inter", Arial, Helvetica, sans-serif;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

/* =========================
   HEADER
========================= */
.site-header {
    width: 100%;
    min-height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--shadow-soft);
}

.site-header__inner {
    width: min(100%, var(--max-shell));
    min-height: var(--header-height);
    margin: 0 auto;
    padding: 0 var(--header-padding-x);
    display: grid;
    grid-template-columns: var(--logo-width) 1fr var(--logo-width);
    align-items: center;
}

.site-logo {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.site-logo a {
    display: inline-flex;
    align-items: center;
}

.site-logo img {
    width: var(--logo-width);
    height: auto;
}

.site-nav {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--menu-gap);
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    color: #5e5e5e;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--primary);
}

/* =========================
   MAIN GLOBAL
========================= */
.portal-main {
    flex: 1;
    padding: 0 20px;
    display: flex;
}

.portal-shell {
    width: min(100%, var(--max-shell));
    margin: 0 auto;
    background: var(--bg-surface);
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
}

/* =========================
   FOOTER
========================= */
.site-footer {
    width: 100%;
    min-height: var(--footer-height);
    background: #ffffff;
    border-top: 1px solid #e3e3e3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
}

.site-footer__inner {
    width: 100%;
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--primary);
}

/* =========================
   HOME
========================= */
.home-page {
    width: 100%;
}

.home-hero {
    width: 100%;
}

.home-hero img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.home-content {
    width: min(100%, var(--max-content));
    margin: 0 auto;
    padding: 48px 28px 64px;
}

.home-heading {
    text-align: center;
}

.home-heading h1 {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
    font-weight: 700;
    color: #111111;
    margin-top: 24px;
}

.home-subtitle {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    color: #111111;
}

.home-text {
    margin-top: 36px;
}

.home-text p {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.55;
    color: #222222;
}

.home-text strong {
    font-weight: 700;
}

.home-actions {
    margin-top: 56px;
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.action-card {
    width: 100%;
    max-width: 292px;
    min-height: 90px;
    padding: 20px 24px;
    border-radius: 11px;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.action-card:hover {
    opacity: 0.96;
    transform: translateY(-1px);
}

.action-card--secondary {
    background: var(--primary-light);
}

.action-card__icon {
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-card__icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.action-card__label {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

/* =========================
   MODAL BUZON SEGURO
========================= */

body.is-modal-open {
    overflow: hidden;
}

.buzon-modal[hidden] {
    display: none !important;
}

.buzon-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.buzon-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
}

.buzon-modal__dialog {
    position: relative;
    width: min(100%, 360px);
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
    padding: 26px 30px 0;
    z-index: 2;
}

.buzon-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: none;
    background: transparent;
    color: #7a7a7a;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.buzon-modal__title {
    margin: 0 0 22px;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 20px;
    line-height: 1.12;
    font-weight: 700;
    color: #111111;
}

.buzon-modal__text {
    margin: 0 0 18px;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.55;
    color: #222222;
}

.buzon-modal__row {
    margin-bottom: 22px;
}

.buzon-modal__label {
    display: block;
    margin-bottom: 8px;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #111111;
}

.buzon-modal__input {
    width: 100%;
    height: 38px;
    border: 1px solid #86add1;
    background: #ffffff;
    padding: 0 12px;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #111111;
    outline: none;
}

.buzon-modal__password-wrap {
    position: relative;
}

.buzon-modal__password-wrap .buzon-modal__input {
    padding-right: 42px;
}

.buzon-modal__toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.buzon-modal__toggle img {
    width: 18px;
    height: 18px;
}

.buzon-modal__submit {
    width: calc(100% + 60px);
    margin: 16px -30px 0;
    min-height: 44px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* =========================
   RESPONSIVE
========================= */
/*Modal buzón*/
@media (max-width: 640px) {
    .buzon-modal__dialog {
        width: min(100% - 20px, 360px);
        padding: 22px 20px 0;
    }

    .buzon-modal__submit {
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
    }
}

@media (max-width: 1200px) {
    :root {
        --header-padding-x: 40px;
        --logo-width: 156px;
        --menu-gap: 34px;
    }
}

@media (max-width: 900px) {
    .site-header__inner {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 18px;
        min-height: auto;
        padding: 18px 20px;
    }

    .site-logo {
        width: 100%;
        justify-content: center;
    }

    .site-nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 22px;
    }

    .portal-main {
        padding: 0 14px;
    }

    .site-footer {
        padding: 14px 14px 18px;
    }

    .home-content {
        padding: 36px 24px 48px;
    }
}

@media (max-width: 640px) {
    :root {
        --logo-width: 132px;
        --menu-gap: 18px;
    }

    .site-nav a {
        font-size: 10px;
    }

    .home-hero img {
        height: 120px;
    }

    .home-heading h1 {
        font-size: 22px;
    }

    .home-subtitle {
        font-size: 14px;
    }

    .home-text p {
        font-size: 13px;
    }

    .home-actions {
        gap: 16px;
    }

    .action-card {
        max-width: 100%;
        min-height: 84px;
    }

    .action-card__label {
        font-size: 14px;
    }
}