/* Barra superior */
.topbar {
    background: var(--navy-ink);
    color: #c9d6ea;
    font-size: 0.82rem;
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 38px;
}

.topbar__item,
.topbar__links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.topbar__links {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.topbar a {
    color: #fff;
    text-decoration: none;
}

.topbar a:hover {
    color: var(--yellow);
}

.topbar .icon {
    width: 14px;
    height: 14px;
    opacity: 0.85;
}

/* Cabecera */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgb(255 255 255 / 97%);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
    box-shadow: 0 6px 20px rgb(6 28 56 / 8%);
}

.site-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.brand img {
    width: 168px;
    height: auto;
}

.header-search {
    display: flex;
    align-items: center;
    max-width: 520px;
    width: 100%;
    justify-self: center;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.2rem 0.25rem 0.2rem 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.header-search:focus-within {
    border-color: var(--navy-2);
    box-shadow: 0 0 0 4px rgb(0 65 127 / 10%);
    background: #fff;
}

.header-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0.55rem 0.25rem;
    outline: none;
}

.header-search > button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
}

.header-search--mobile {
    display: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.quote-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-weight: 700;
    color: var(--navy);
    transition: border-color 0.15s, transform 0.15s;
}

.quote-pill:hover {
    border-color: var(--navy-2);
}

.quote-pill__count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted);
    font-size: 0.78rem;
}

.quote-pill.has-items .quote-pill__count {
    background: var(--red);
    color: #fff;
}

.quote-pill.bump {
    animation: bump 0.4s ease;
}

@keyframes bump {
    40% { transform: scale(1.12); }
}

.nav-toggle {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
}

.nav-toggle .icon {
    width: 22px;
    height: 22px;
}

/* Navegación */
.site-nav {
    border-top: 1px solid var(--line);
    background: #fff;
}

.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 52px;
}

.menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu > li > a,
.menu summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
}

.menu summary::-webkit-details-marker {
    display: none;
}

.menu summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s;
}

.menu details[open] summary::after {
    transform: translateY(1px) rotate(-135deg);
}

.menu > li > a:hover,
.menu summary:hover,
.menu > li > a[aria-current="page"] {
    background: var(--bg-soft);
    color: var(--navy-2);
}

.menu__mega {
    position: relative;
}

.mega {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    width: min(680px, 90vw);
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.mega__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.mega__item {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.mega__item small {
    color: var(--muted);
    font-weight: 600;
}

.mega__item:hover {
    background: var(--bg-soft);
    color: var(--navy-2);
}

.mega__children {
    display: flex;
    gap: 0.75rem;
    padding: 0 0.7rem 0.35rem;
    font-size: 0.85rem;
}

.mega__children a {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.mega__children a:hover {
    color: var(--red);
}

/* Secciones */
.section {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.section--muted {
    background: var(--bg-soft);
}

.section--navy {
    background:
        radial-gradient(1200px 400px at 90% -10%, rgb(255 194 14 / 10%), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-ink) 100%);
    color: #d6e0ef;
}

.section--navy .section-title,
.section--navy h2 {
    color: #fff;
}

.section--navy .link-arrow {
    color: var(--yellow);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.section-title {
    margin: 0;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    color: var(--navy-2);
    text-decoration: none;
    white-space: nowrap;
}

.link-arrow:hover {
    gap: 0.5rem;
}

.page-hero {
    padding: 2rem 0 2.25rem;
    background:
        linear-gradient(90deg, rgb(6 28 56 / 96%), rgb(10 44 87 / 88%)),
        url("../images/hero-obra-800.webp") center / cover;
    color: #d6e0ef;
}

.page-hero h1 {
    color: #fff;
    margin-bottom: 0.35rem;
}

.page-hero p {
    max-width: 62ch;
    margin: 0;
}

.page-hero .breadcrumbs a {
    color: #c9d6ea;
}

.page-hero .breadcrumbs li[aria-current] {
    color: #fff;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.breadcrumbs li + li::before {
    content: "/";
    margin-right: 0.35rem;
    opacity: 0.6;
}

.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Pie */
.site-footer {
    background: var(--navy-ink);
    color: #b9c6da;
    font-size: 0.93rem;
}

.stripes {
    height: 10px;
    background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, #111 18px 36px);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.3fr 1.1fr;
    gap: 2.5rem;
    padding: 3.5rem 0 2.5rem;
}

.footer-logo {
    width: 190px;
    padding: 0.6rem 0.8rem;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.footer-title {
    color: #fff;
    font-weight: 800;
    margin-bottom: 0.9rem;
}

.site-footer a {
    color: #e5ecf6;
    text-decoration: none;
}

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

.footer-links,
.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.footer-links {
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
}

.footer-contact li {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.footer-contact .icon {
    margin-top: 0.2em;
    color: var(--yellow);
}

.footer-contact--dark a,
.footer-contact--dark span {
    color: var(--ink);
}

.footer-contact--dark .icon {
    color: var(--red);
}

.footer-social {
    display: flex;
    gap: 0.5rem;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgb(255 255 255 / 8%);
}

.footer-social a:hover {
    background: var(--red);
    color: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0 1.75rem;
    border-top: 1px solid rgb(255 255 255 / 10%);
    font-size: 0.82rem;
    color: #8193ad;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-search {
        max-width: 360px;
    }
}

@media (max-width: 860px) {
    :root {
        --header-h: 64px;
    }

    .topbar__item,
    .topbar__mail,
    .topbar__extra {
        display: none !important;
    }

    .topbar__inner {
        justify-content: center;
    }

    .site-header__inner {
        grid-template-columns: auto 1fr;
        gap: 0.75rem;
    }

    .site-header__inner > .header-search {
        display: none;
    }

    .header-actions {
        justify-self: end;
    }

    .brand img {
        width: 132px;
    }

    .quote-pill__label {
        display: none;
    }

    .nav-toggle {
        display: grid;
    }

    .site-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 0 1.25rem;
    }

    .header-search--mobile {
        display: flex;
        max-width: none;
    }

    .menu {
        flex-direction: column;
        align-items: stretch;
    }

    .menu > li > a,
    .menu summary {
        width: 100%;
        justify-content: space-between;
        padding: 0.85rem 0.5rem;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
    }

    .mega {
        position: static;
        width: auto;
        padding: 0.5rem 0 1rem;
        border: 0;
        box-shadow: none;
    }

    .mega__grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
        gap: 0.5rem;
    }
}
