:root {
    --primary-blue: #1b3f92;
    --primary-blue-dark: #112d70;
    --primary-blue-soft: #edf3ff;
    --second-yellow: #fbbb21;
    --second-yellow-hover: #eaaa0d;
    --ternary-green: #13a538;
    --ink: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --surface: #f6f8fb;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    padding-top: 76px;
    -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
    font-family: 'Montserrat', sans-serif;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 700;
    justify-content: center;
    min-height: 48px;
    padding: 0.75rem 1.35rem;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button--small {
    min-height: 44px;
    padding-inline: 1.25rem;
}

.button--primary {
    background: var(--second-yellow);
    color: var(--ink);
}

.button--primary:hover,
.button--primary:focus-visible {
    background: var(--second-yellow-hover);
    color: var(--ink);
}

.button--light {
    background: var(--white);
    color: var(--primary-blue);
}

.button--light:hover,
.button--light:focus-visible {
    background: var(--primary-blue-soft);
    color: var(--primary-blue-dark);
}

.btn-casadecambios {
    background: var(--primary-blue);
    border: 0;
    border-radius: 10px;
    color: var(--white) !important;
    font-weight: 700;
    padding: 0.75rem 1.35rem;
}

.btn-casadecambios:hover {
    background: var(--primary-blue-dark);
}

.site-header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.04);
    min-height: 76px;
    padding-block: 0.75rem;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    transition: background-color 220ms ease, box-shadow 220ms ease;
    z-index: 100;
}

.site-header::before {
    animation: header-stream 7s ease-in-out infinite;
    background: linear-gradient(90deg, transparent 0%, rgba(251, 187, 33, 0.08) 36%, rgba(27, 63, 146, 0.16) 50%, rgba(251, 187, 33, 0.08) 64%, transparent 100%);
    content: '';
    height: 2px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
}

.site-header::after {
    animation: header-accent 3.5s ease-in-out infinite;
    background: var(--second-yellow);
    bottom: -1px;
    content: '';
    height: 2px;
    left: max(1.5rem, calc((100% - 1140px) / 2));
    position: absolute;
    width: 56px;
}

.site-header__inner {
    gap: 1.5rem;
}

.site-header__brand img,
.navbar-brand img {
    display: block;
    height: 46px;
    object-fit: contain;
    transition: transform 220ms ease;
    width: auto;
}

.site-header__brand:hover img,
.navbar-brand:hover img {
    transform: translateY(-2px);
}

.site-header__nav {
    align-items: center;
    gap: 0.5rem;
}

.site-header .nav-link {
    border-radius: 9px;
    color: #344054 !important;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.7rem 0.9rem !important;
    position: relative;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-header .nav-link::after {
    background: var(--second-yellow);
    bottom: 0.3rem;
    content: '';
    height: 2px;
    left: 0.9rem;
    position: absolute;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
    width: calc(100% - 1.8rem);
}

.site-header .nav-link:hover,
.site-header .nav-link:focus-visible {
    background: rgba(27, 63, 146, 0.06);
    color: var(--primary-blue) !important;
    transform: translateY(-1px);
}

.site-header .nav-link:hover::after,
.site-header .nav-link:focus-visible::after {
    transform: scaleX(1);
}

.site-header__actions {
    align-items: center;
    display: flex;
    gap: 0.65rem;
}

.site-header__quick-actions { display: none; }

.site-header__login {
    align-items: center;
    background: rgba(27, 63, 146, 0.06);
    border: 1px solid rgba(27, 63, 146, 0.18);
    border-radius: 10px;
    color: var(--primary-blue);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-header__login:hover,
.site-header__login:focus-visible {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
    outline: none;
    transform: translateY(-2px);
}

.site-header__register {
    align-items: center;
    background: linear-gradient(135deg, #ffd253 0%, var(--second-yellow) 58%, #e9a508 100%);
    border-color: rgba(195, 126, 0, 0.22);
    gap: 0.45rem;
    letter-spacing: -0.01em;
}

.site-header .button--primary {
    box-shadow: 0 7px 15px rgba(184, 126, 0, 0.14);
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.site-header .button--primary:hover,
.site-header .button--primary:focus-visible {
    box-shadow: 0 11px 20px rgba(184, 126, 0, 0.22);
    transform: translateY(-2px);
}

/* Cierre del formulario de registro: jerarquía visible entre acceso y alta. */
.register-form__actions {
    align-items: center;
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    margin-inline: auto;
    max-width: 640px;
}

.register-form__login-link,
.register-form__submit {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 0.6rem;
    justify-content: center;
    min-height: 56px;
    text-decoration: none;
    transition: box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.register-form__login-link {
    background: linear-gradient(135deg, #ffd253 0%, var(--second-yellow) 58%, #e9a508 100%);
    border: 1px solid #d89a00;
    box-shadow: 0 10px 20px rgba(184, 126, 0, 0.18);
    color: #10264d;
    flex: 1 1 0;
    padding: 0.5rem 0.85rem;
}

.register-form__login-link span { display: flex; flex-direction: column; line-height: 1.15; }
.register-form__login-link small { color: rgba(16, 38, 77, 0.76); font-size: 0.69rem; font-weight: 600; }

.register-form__submit {
    background: linear-gradient(135deg, #2858b2, #173b8a);
    border: 1px solid #15377f;
    box-shadow: 0 10px 20px rgba(18, 58, 138, 0.23);
    color: #ffffff;
    cursor: pointer;
    flex: 1 1 0;
    padding: 0.75rem 1.15rem;
}

.register-form__login-link:hover,
.register-form__login-link:focus-visible,
.register-form__submit:hover,
.register-form__submit:focus-visible {
    box-shadow: 0 13px 24px rgba(18, 58, 138, 0.2);
    outline: none;
    transform: translateY(-2px);
}

.register-form__login-link:hover,
.register-form__login-link:focus-visible {
    background: linear-gradient(135deg, #244a99, #102e70);
    border-color: #102e70;
    color: #ffffff;
}
.register-form__login-link:hover small,
.register-form__login-link:focus-visible small { color: rgba(255, 255, 255, 0.82); }
.register-form__submit:hover,
.register-form__submit:focus-visible {
    background: linear-gradient(135deg, #ffd253, #f0ad08);
    border-color: #d89a00;
    color: #10264d;
}

@keyframes header-stream {
    0%, 100% { opacity: 0.35; transform: translateX(-18%); }
    50% { opacity: 1; transform: translateX(18%); }
}

@keyframes header-accent {
    0%, 100% { opacity: 0.78; transform: scaleX(0.86); transform-origin: left; }
    50% { opacity: 1; transform: scaleX(1.15); transform-origin: left; }
}

.site-header__toggle {
    border-color: var(--line);
}

.site-footer {
    background:
        radial-gradient(ellipse at 11% 92%, rgba(19, 165, 86, 0.24), transparent 31%),
        radial-gradient(circle at 88% 14%, rgba(251, 187, 33, 0.18), transparent 23%),
        linear-gradient(118deg, #102e70 0%, #1b3f92 56%, #2e62ba 100%);
    border-top: 0;
    color: rgba(255, 255, 255, 0.78);
    overflow: hidden;
    padding: 4rem 0 1.5rem;
    position: relative;
}

.site-footer::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 500' preserveAspectRatio='none'%3E%3Cpath d='M-30 390c150-130 276 20 421-95s224-48 361-118 208-78 344 5 203 38 349-61 176-42 278 21' fill='none' stroke='%2396dcff' stroke-opacity='.22' stroke-width='3'/%3E%3Cpath d='M-25 438c134-88 281 38 427-75s205-63 358-113 202-65 339 13 218 19 353-58 189-45 282 9' fill='none' stroke='%23ffd66a' stroke-opacity='.18' stroke-width='2'/%3E%3C/svg%3E") center / cover no-repeat;
    animation: footer-wave-drift 16s ease-in-out infinite alternate;
    content: '';
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.site-footer::after {
    background:
        radial-gradient(circle at 12% 78%, rgba(19, 165, 86, 0.24), transparent 20%),
        radial-gradient(circle at 83% 20%, rgba(251, 187, 33, 0.18), transparent 18%);
    content: '';
    inset: -18%;
    pointer-events: none;
    position: absolute;
    z-index: 0;
    animation: footer-glow-drift 13s ease-in-out infinite alternate;
}

@keyframes footer-wave-drift {
    0% { background-position: 48% 50%; transform: scale(1); }
    100% { background-position: 54% 45%; transform: scale(1.035); }
}

@keyframes footer-glow-drift {
    0% { transform: translate3d(-2%, 2%, 0) scale(1); }
    100% { transform: translate3d(3%, -3%, 0) scale(1.07); }
}

.site-footer .container {
    position: relative;
    z-index: 1;
}

.site-footer__grid {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1.5fr repeat(3, 1fr);
}

.site-footer__grid > div:not(.site-footer__brand) {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.site-footer__brand img {
    filter: brightness(0) invert(1);
    height: 44px;
    object-fit: contain;
    width: auto;
}

.site-footer__brand p {
    color: rgba(255, 255, 255, 0.78);
    font-size: calc(0.88rem + 2px);
    font-weight: 600;
    margin: 1rem 0 1.25rem;
    max-width: 280px;
}

.site-footer__company {
    border-left: 2px solid var(--second-yellow);
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: calc(0.72rem + 2px) !important;
    font-weight: 800;
    letter-spacing: 0.025em;
    line-height: 1.45;
    margin: 0 0 1.15rem !important;
    padding-left: 0.65rem;
}

.site-footer__company span {
    display: block;
    font-size: calc(0.7rem + 2px);
    font-weight: 700;
    margin-top: 0.1rem;
}

.site-footer__title {
    color: var(--white);
    font-size: calc(0.9rem + 2px);
    font-weight: 800;
    margin: 0 0 0.45rem;
}

.site-footer a,
.site-footer span {
    color: rgba(255, 255, 255, 0.8);
    font-size: calc(0.82rem + 2px);
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--second-yellow);
}

.site-footer__socials {
    display: flex;
    gap: 0.6rem;
}

.site-footer__socials a {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: var(--white);
    display: inline-flex;
    font-size: 22px;
    height: 45px;
    justify-content: center;
    width: 45px;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.25rem;
}

.whatsapp-float {
    align-items: center;
    background: #20c768;
    border: 2px solid #ffffff;
    border-radius: 999px;
    bottom: 1.5rem;
    box-shadow: 0 10px 28px rgba(5, 92, 43, 0.35);
    color: #ffffff;
    display: inline-flex;
    height: 88px;
    justify-content: center;
    padding: 0;
    position: fixed;
    right: 1.5rem;
    text-decoration: none;
    transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
    width: 88px;
    z-index: 1050;
}

.whatsapp-float span { display: none; }
.whatsapp-float i { font-size: 3rem; }
.whatsapp-float:hover { background: #159d4f; color: #ffffff; box-shadow: 0 14px 32px rgba(5, 92, 43, 0.45); transform: translateY(-3px); }

/* Compatibility styles retained for the other public Blade views. */
.hero-section {
    background: var(--surface);
    padding: 5rem 0;
}

.section-title,
.gradient-text-blue {
    color: var(--primary-blue);
}

.gradient-text {
    color: var(--second-yellow);
}

.value-card,
.service-card,
.converter-container {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 2rem;
}

@media (max-width: 991.98px) {
    .site-header__inner { gap: 0.45rem; }

    .site-header__quick-actions {
        align-items: center;
        display: flex;
        gap: 0.4rem;
        margin-left: auto;
    }

    .site-header__quick-actions a {
        align-items: center;
        background: #ffffff;
        border: 1px solid rgba(27, 63, 146, 0.18);
        border-radius: 9px;
        color: var(--primary-blue);
        display: inline-flex;
        height: 38px;
        justify-content: center;
        padding: 0.35rem 0.6rem;
        text-decoration: none;
        font-size: 0.72rem;
        font-weight: 700;
        white-space: nowrap;
    }

    .site-header__quick-actions a:last-child {
        background: var(--second-yellow);
        border-color: var(--second-yellow);
        color: #10264d;
    }

    #navbarNav .site-header__actions { display: none; }

    .site-header__nav {
        align-items: stretch;
        margin-top: 1rem;
    }

    .site-header__actions {
        align-items: stretch;
        border-top: 1px solid var(--line);
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.75rem;
        padding-top: 1rem;
    }

    .site-header__login {
        padding: 0.6rem 0.9rem;
    }

    .site-footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    /* Mantiene logo, accesos y disparador en una sola fila en móvil. */
    .site-header {
        min-height: 64px;
        padding-block: 0.55rem;
    }

    .site-header__inner {
        align-items: center;
        gap: 0.3rem;
        padding-inline: 0.75rem;
    }

    .register-form__actions { flex-direction: column-reverse; }
    .register-form__login-link,
    .register-form__submit { flex-basis: auto; width: 100%; }

    .site-header__brand img,
    .navbar-brand img {
        height: 32px;
    }

    .site-header__brand {
        /* Bootstrap agrega un margen que en esta fila compacta provoca el salto del botón. */
        margin-right: 0;
    }

    .site-header__quick-actions {
        flex: 0 0 auto;
        gap: 0.25rem;
    }

    .site-header__quick-actions a {
        font-size: 0.64rem;
        height: 36px;
        line-height: 1;
        padding-inline: 0.38rem;
    }

    .site-header__toggle {
        align-self: center;
        flex: 0 0 40px;
        height: 36px;
        margin: 0;
        padding: 0.25rem 0.4rem;
        width: 40px;
    }

    #navbarNav {
        flex-basis: 100%;
        padding-top: 0.35rem;
    }

    #navbarNav .site-header__nav {
        margin-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .site-footer .container { text-align: center; }
    .site-footer__grid > div {
        align-items: center;
        justify-self: center;
        text-align: center;
        width: 100%;
    }
    .site-footer__brand {
        align-items: center;
        display: flex;
        flex-direction: column;
        text-align: center;
    }
    .site-footer__brand > a { display: inline-flex; justify-content: center; }
    .site-footer__brand p { margin-inline: auto; text-align: center; }
    .site-footer__company {
        align-self: center;
        border-left: 0;
        border-top: 2px solid var(--second-yellow);
        margin-inline: auto !important;
        padding: 0.55rem 0 0;
        text-align: center;
        width: min(100%, 280px);
    }
    .site-footer__socials { justify-content: center; }
    .site-footer__grid > div:not(.site-footer__brand) { align-items: center; text-align: center; }
    .site-footer__office { display: block; text-align: center; }
    .site-footer__bottom { align-items: center; text-align: center; }

    .site-footer__bottom {
        flex-direction: column;
        gap: 0.5rem;
    }

    .whatsapp-float {
        bottom: 1rem;
        height: 80px;
        right: 1rem;
        width: 80px;
    }

    .whatsapp-float i { font-size: 2.7rem; }
}

@media (prefers-reduced-motion: reduce) {
    .site-footer::before,
    .site-footer::after {
        animation: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header::before,
    .site-header::after,
    .site-header__brand img,
    .navbar-brand img,
    .site-header .nav-link,
    .site-header__login,
    .site-header .button--primary {
        animation: none;
        transition: none;
        transform: none;
    }
}
