/* Top Bar */
.top-bar {
    background: var(--color-navy);
    color: var(--color-white);
    font-size: 14px;
}

.top-bar__content {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.top-bar a {
    color: var(--color-white);
    font-weight: 600;
}

/* Main Navbar */
.site-header {
    position: sticky;
    top: 0;
    z-index: 99;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.92);
}

.navbar {
    background: var(--color-white);
    box-shadow: var(--shadow-soft);
}

.navbar__content {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo img {
    display: block;
    width: 170px;
    max-height: 68px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu a {
    color: var(--color-navy);
    font-size: 15px;
    font-weight: 700;
    transition: color 0.25s ease;
    position: relative;
}

.nav-menu a.active {
    color: var(--color-green);
}

.nav-menu a:hover {
    color: var(--color-green);
}

.site-header.scrolled .navbar__content {
    min-height: 68px;
}

.site-header.scrolled .logo img {
    width: 135px;
    max-height: 54px;
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.has-dropdown>a::after {
    content: "▾";
    font-size: 11px;
    margin-left: 6px;
}

.has-mega {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: calc(100% + 32px);
    left: 50%;
    transform: translate(-50%, 0px);
    width: min(760px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    padding: 26px;
    background: var(--color-white);
    border-top: 1px solid rgba(15, 45, 82, 0.04);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 40px rgba(15, 45, 82, 0.10);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        visibility 0.22s ease;
}

.has-mega::after {
    content: "";
    position: absolute;
    left: -10px;
    top: 100%;
    width: calc(100% + 20px);
    height: 34px;
    background: transparent;
}

.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-header.scrolled .mega-menu {
    top: calc(100% + 22px);
}

.site-header.scrolled .has-mega::after {
    height: 24px;
}

.mega-menu__overview {
    display: none;
}

.mega-menu__overview a {
    font-weight: 800;
    color: var(--color-navy);
}

.mega-menu__col h3 {
    margin: 0 0 14px;
    color: rgba(15, 45, 82, .70);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mega-menu__col ul {
    display: grid;
    gap: 6px;
}

.mega-menu__col a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--color-text);
    font-size: 0.92rem;
    font-weight: 700;
}

.mega-menu__col a:hover {
    background: var(--color-light);
    color: var(--color-green);
}

/* CTA */
.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    background-color: var(--color-green);
    color: var(--color-white);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(98, 184, 50, 0.28);
    transition:
        background-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
    backface-visibility: hidden;
    will-change: transform;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nav-cta:hover {
    background-color: #4fa225;
    transform: translate3d(0, -2px, 0);
}

.site-header.scrolled .nav-cta {
    min-height: 40px;
    padding: 0 18px;
    font-size: 13px;
}

.navbar__content,
.logo img,
.nav-cta {
    transition: all 0.25s ease;
}

/* Mobile */
.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--color-light);
    border-radius: 12px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-navy);
    margin: 5px auto;
    transition: all 0.3s ease;
}

/* ================================
   FOOTER
================================ */

.site-footer {
    background: #071f3a;
    color: var(--color-white);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
    padding: 72px 0;
}

.footer__logo img {
    width: 170px;
    height: auto;
    display: block;
    margin-bottom: 16px;
}

.footer__brand p {
    max-width: 360px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
    line-height: 1.75;
}

.footer-insured {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.footer-insured__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(131, 215, 100, .12);
    color: #83d764;
}

.footer-insured__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-insured__content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-insured__content strong {
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
}

.footer-insured__content span {
    color: rgba(255, 255, 255, .72);
    font-size: .82rem;
    line-height: 1.45;
}

.footer__col h3 {
    margin: 0 0 20px;
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer__col ul {
    display: grid;
    gap: 13px;
}

.footer__col a,
.footer__col li {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.55;
}

.footer__col a:hover {
    color: var(--color-green);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__bottom-content {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer__bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.88rem;
}

.footer__bottom-content div {
    display: flex;
    align-items: center;
    gap: 18px;
}

.footer__bottom-content a {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.88rem;
}

.footer__bottom-content a:hover {
    color: var(--color-green);
}

.footer-social {
    margin-top: 24px;
}

.footer-social h3 {
    margin-bottom: 12px;

    color: #fff;

    font-size: 1rem;
    font-weight: 700;
}

.footer-social__links {
    display: flex;
    gap: 12px;
}

.footer-social__links a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #fff;
    transition:
        background .25s ease,
        transform .25s ease,
        color .25s ease;
}

.footer-social__links a:hover {
    background: rgba(131, 215, 100, .15);
    color: #83d764;
    transform: translateY(-2px);
}

.footer-social__links svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (min-width: 981px) and (max-width: 1300px) {
    .nav-cta {
        margin-right: 4px;
    }
}

@media (min-width: 981px) and (max-width: 1020px) {
    .logo img {
        width: 115px;
    }
}

@media (max-width: 980px) {
    .top-bar {
        display: none;
    }

    .site-header {
        position: relative;
        top: auto;
    }

    .navbar__content {
        position: relative;
        min-height: 76px;
        padding: 10px 0;
        flex-wrap: wrap;
        align-items: center;
    }

    .logo {
        display: flex;
        align-items: center;
    }

    .logo img {
        display: block;
        width: 140px;
        height: auto;
    }

    .menu-toggle {
        display: block;
        position: relative;
        margin-right: 6px;
    }

    /* Línea superior */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    /* Línea central */
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    /* Línea inferior */
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 18px;
        background: var(--color-white);
        box-shadow: 0 12px 24px rgba(15, 45, 82, 0.08);
        border-radius: 0 0 16px 16px;
        border-top: 1px solid rgba(15, 45, 82, 0.04);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .mega-menu {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        display: none;
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 6px 0 6px 16px;
        margin: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .has-mega.active .mega-menu {
        display: grid;
    }

    .has-mega:hover .mega-menu {
        transform: none;
    }

    .mega-menu__overview {
        display: block;
    }

    .mega-menu__col h3 {
        margin: 8px 0;
    }

    .mega-menu__col ul {
        display: grid;
        gap: 0;
    }

    .has-mega::after {
        display: none;
    }

    .nav-cta {
        order: 4;
        display: none;
        width: 100%;
        margin: 0 0 20px;
        justify-content: center;
        min-height: 52px;
        border-radius: 14px;
    }

    .nav-menu.active+.nav-cta {
        display: flex;
    }

    .site-header.scrolled .navbar__content {
        min-height: 66px;
    }

    .site-header.scrolled .logo img {
        width: 140px;
        max-height: 68px;
    }

    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 60px 0;
    }
}

@media (max-width: 640px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 34px;
        padding: 52px 0;
    }

    .footer__bottom-content {
        min-height: auto;
        padding: 24px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer__bottom-content div {
        margin-inline: auto;
    }

    .footer__bottom-content p {
        text-align: center;
        margin-inline: auto;
    }
}