/*
 * Portada del home: encabezado flotante (header_hero), portada (home/hero) y buscador
 * (components/search_hero). Solo se carga en el home.
 * Medidas y colores de la propuesta del cliente ("Merino Hermanos — Propuesta Web.html"),
 * con la tipografía de la plantilla (Poppins).
 * Plan: docs-dev/2026-10-07_plan_home_hero.md
 */

:root {
    --mh-gold: #B68B3F;
    --mh-ink: #1A1A1A;
    --mh-ink-2: #3D3D3D;
    --mh-gray: #666666;
    --mh-gray-light: #F2F2F2;
    --mh-line: #E3E1DE;
    --mh-red: var(--color-template, #C8161D);
}

/* ===================== Encabezado flotante ===================== */

.mh-hh {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.mh-hh__bar.navbar {
    max-width: 1360px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
}
.mh-hh__brand {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}
.mh-hh__logo {
    display: block;
    height: 58px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
    transition: height 0.25s ease;
}
.mh-hh__logo--dark {
    display: none;
}

/* Menú en píldora translúcida */
@media (min-width: 992px) {
    .mh-hh__collapse {
        flex-grow: 0;
        justify-content: center;
    }
    .mh-hh__menu.navbar-nav {
        align-items: center;
        gap: 4px;
        padding: 6px 14px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.15);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }
    .mh-hh__menu .nav-item {
        margin: 0;
    }
    .mh-hh__menu .nav-link {
        padding: 6px 12px !important;
        color: #ffffff;
        font-size: 14px;
        font-weight: 500;
        white-space: nowrap;
        transition: color 0.2s ease;
    }
    .mh-hh__menu .nav-link:hover,
    .mh-hh__menu .nav-link:focus,
    .mh-hh__menu .show > .nav-link {
        color: var(--mh-gold);
    }
    .mh-hh__menu .dropdown-toggle::after {
        width: 6px;
        height: 6px;
        margin-left: 7px;
        border: solid currentColor;
        border-width: 0 1.5px 1.5px 0;
        vertical-align: 0.3em;
        transform: rotate(45deg);
        opacity: 0.7;
    }
    .mh-hh__menu .dropdown-menu {
        min-width: 230px;
        margin-top: 12px;
        padding: 8px 0;
        border: 0;
        border-radius: 12px;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    }
    .mh-hh__menu .dropdown-item {
        padding: 9px 18px;
        color: var(--mh-ink);
        font-size: 14px;
        white-space: normal;
    }
    .mh-hh__menu .dropdown-item:hover {
        background-color: var(--mh-gray-light);
        color: var(--mh-red);
    }
    .mh-hh .close-menu {
        display: none;
    }
}

/* Derecha: "Zona de clientes ▾" (desplegable) y el globo de idioma, como en la propuesta */
.mh-hh__utils {
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
    margin-left: 12px;
}
.mh-hh__util {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.mh-hh__util:hover,
.mh-hh__util:focus,
.mh-hh__clients.show .mh-hh__util {
    color: var(--mh-gold);
    text-decoration: none;
}
.mh-hh__util.dropdown-toggle::after {
    width: 6px;
    height: 6px;
    margin-left: 8px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(45deg);
    opacity: 0.7;
}
.mh-hh__clients-menu {
    min-width: 220px;
    margin-top: 14px;
    padding: 8px 0;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}
.mh-hh__clients-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    border: 0;
    color: var(--mh-ink);
    font-size: 14px;
    text-transform: none;
    cursor: pointer;
}
.mh-hh__clients-menu .dropdown-item i {
    width: 16px;
    color: var(--mh-gray);
    font-size: 15px;
    text-align: center;
}
.mh-hh__clients-menu .dropdown-item:hover,
.mh-hh__clients-menu .dropdown-item:focus {
    background-color: var(--mh-gray-light);
    color: var(--mh-red);
}
.mh-hh__clients-menu .dropdown-divider {
    margin: 6px 0;
    border-color: var(--mh-line);
}
.mh-hh__clients-name {
    display: block;
    padding: 4px 18px 6px;
    color: var(--mh-gray);
    font-size: 12px;
}

/* Idioma: el widget de Google sin su caja blanca ni su logo; queda un globo con flecha */
.mh-hh__translate {
    color: #ffffff;
    line-height: 1;
}
.mh-hh__translate .goog-te-gadget {
    color: inherit;
}
.mh-hh__translate .goog-te-gadget-simple {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    font-size: 0;
    white-space: nowrap;
}
.mh-hh__translate .goog-te-gadget-icon,
.mh-hh__translate .goog-te-gadget-simple a > span:not([aria-hidden]),
.mh-hh__translate .goog-te-gadget-simple a > img {
    display: none !important;
}
.mh-hh__translate .goog-te-gadget-simple a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit !important;
    text-decoration: none;
}
.mh-hh__translate .goog-te-gadget-simple a::before {
    content: "";
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M2.8 12h18.4M12 2.8c2.6 2.6 3.9 5.6 3.9 9.2s-1.3 6.6-3.9 9.2c-2.6-2.6-3.9-5.6-3.9-9.2S9.4 5.4 12 2.8z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9.2'/%3E%3Cpath d='M2.8 12h18.4M12 2.8c2.6 2.6 3.9 5.6 3.9 9.2s-1.3 6.6-3.9 9.2c-2.6-2.6-3.9-5.6-3.9-9.2S9.4 5.4 12 2.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.mh-hh__translate .goog-te-gadget-simple a > span[aria-hidden] {
    color: inherit !important;
    font-size: 8px;
    opacity: 0.7;
}
.mh-hh__translate:hover {
    color: var(--mh-gold);
}

/* Sólido al bajar */
.mh-hh.is-solid {
    background-color: #ffffff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}
.mh-hh.is-solid .mh-hh__bar.navbar {
    padding-top: 10px;
    padding-bottom: 10px;
}
.mh-hh.is-solid .mh-hh__logo {
    height: 48px;
    filter: none;
}
.mh-hh.is-solid .mh-hh__logo--light {
    display: none;
}
.mh-hh.is-solid .mh-hh__logo--dark {
    display: block;
}
@media (min-width: 992px) {
    .mh-hh.is-solid .mh-hh__menu.navbar-nav {
        background: var(--mh-gray-light);
    }
    .mh-hh.is-solid .mh-hh__menu .nav-link {
        color: var(--mh-ink);
    }
    .mh-hh.is-solid .mh-hh__menu .nav-link:hover,
    .mh-hh.is-solid .mh-hh__menu .show > .nav-link {
        color: var(--mh-red);
    }
}
.mh-hh.is-solid .mh-hh__util,
.mh-hh.is-solid .mh-hh__translate {
    color: var(--mh-ink);
}
.mh-hh.is-solid .mh-hh__util:hover,
.mh-hh.is-solid .mh-hh__clients.show .mh-hh__util,
.mh-hh.is-solid .mh-hh__translate:hover {
    color: var(--mh-red);
}

/* Móvil / tablet: menú colapsable de la plantilla (panel blanco a la derecha) */
.mh-hh__toggler span {
    background-color: #ffffff;
}
.mh-hh.is-solid .mh-hh__toggler span {
    background-color: var(--mh-ink);
}
.mh-hh__link-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}
@media (max-width: 991px) {
    .mh-hh__bar.navbar {
        padding: 14px 16px;
    }
    .mh-hh__logo {
        height: 46px;
    }
    .mh-hh__toggler {
        margin-top: 0;
    }
    .mh-hh__menu .nav-link,
    .mh-hh__link-button {
        display: block;
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid #ececf0;
        color: var(--mh-ink);
        font-size: 15px;
        text-align: left;
    }
    .mh-hh__menu .dropdown-menu {
        border: 0;
        box-shadow: none;
        padding: 0 0 6px 12px;
    }
    .mh-hh__menu .dropdown-item {
        padding: 8px 0;
        font-size: 14px;
    }
    .mh-hh__menu--mobile {
        margin-top: 10px;
    }
}

/* ===================== Portada ===================== */

.mh-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 820px;
    padding: 130px 16px 80px;
    overflow: hidden;
    background-color: var(--mh-ink);
    clear: both;
}
.mh-hero__bg,
.mh-hero__bg img,
.mh-hero__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.mh-hero__bg img {
    object-fit: cover;
}
.mh-hero__shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.88) 100%);
}
.mh-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    text-align: center;
}
.mh-hero__title {
    margin: 32px 0 18px;
    color: #ffffff;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
}
.mh-hero__highlight {
    color: var(--mh-gold);
}
.mh-hero__subtitle {
    display: inline-block;
    margin: 0 0 36px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.mh-hero__stats {
    display: flex;
    justify-content: center;
    gap: 56px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mh-hero__stats li {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.mh-hero__stats strong {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}
.mh-hero__stats span {
    color: #e8e5e2;
    font-size: 13px;
}
.mh-hero__credit {
    position: absolute;
    left: 32px;
    bottom: 14px;
    z-index: 2;
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

/* ===================== Buscador ===================== */

.mh-hs {
    text-align: left;
}
.mh-hs__tabs {
    display: flex;
    width: max-content;
    margin: 0 auto;
    padding: 4px 4px 0;
    border-radius: 999px 999px 0 0;
    background: rgba(255, 255, 255, 0.15);
}
.mh-hs__tab {
    padding: 10px 28px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.mh-hs__tab:hover {
    color: #ffffff;
}
.mh-hs__tab.is-active {
    background-color: var(--mh-red);
    color: #ffffff;
}
.mh-hs__card {
    padding: 22px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.mh-hs__main {
    display: flex;
    gap: 12px;
}
.mh-hs__query {
    flex-grow: 1;
    margin: 0;
}
.mh-hs__query input {
    width: 100%;
    height: 54px;
    padding: 0 22px;
    border: 1px solid var(--mh-line);
    border-radius: 999px;
    background: var(--mh-gray-light);
    color: var(--mh-ink);
    font-size: 15px;
}
.mh-hs__query input::placeholder {
    color: var(--mh-gray);
}
.mh-hs__query input:focus,
.mh-hs__input:focus {
    outline: 0;
    border-color: var(--mh-red);
    box-shadow: 0 0 0 3px rgba(199, 44, 65, 0.12);
}
.mh-hs__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: var(--mh-red);
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    transition: filter 0.2s ease;
}
.mh-hs__submit:hover {
    filter: brightness(0.9);
}
.mh-hs__filters,
.mh-hs__extra {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.mh-hs__filters {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}
.mh-hs__extra {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 10px;
}
.mh-hs__field {
    min-width: 0;
}
/* Selects (select2 de siempre) y campos con el estilo de la propuesta */
.mh-hs .select2-container--bootstrap4 .select2-selection--single,
.mh-hs .mh-hs__input {
    height: 42px !important;
    border: 1px solid var(--mh-line) !important;
    border-radius: 10px !important;
    background: #ffffff;
    color: var(--mh-ink-2);
    font-size: 13px;
    box-shadow: none !important;
}
.mh-hs .mh-hs__input {
    width: 100%;
    margin: 0;
    padding: 0 12px;
}
.mh-hs .select2-container--bootstrap4 .select2-selection__rendered {
    padding-left: 12px !important;
    line-height: 40px !important;
    color: var(--mh-ink-2) !important;
    font-size: 13px;
}
.mh-hs .select2-container--bootstrap4 .select2-selection__arrow {
    height: 40px !important;
}
.mh-hs__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--mh-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--mh-ink-2);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}
.mh-hs__more i {
    font-size: 16px;
}
.mh-hs__more:hover,
.mh-hs__more[aria-expanded="true"] {
    border-color: var(--mh-red);
    color: var(--mh-red);
}

/* Flecha de los selects centrada verticalmente */
.mh-hs .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    top: 0 !important;
    right: 6px;
}
.mh-hs .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
    top: 50% !important;
    margin-top: -2px !important;
}

/* ===================== Banner promocional (después de la portada) ===================== */

.mh-promo .banner.hp2 {
    margin: 0;
}

/* ===================== Responsive ===================== */

@media (min-width: 992px) and (max-width: 1199px) {
    .mh-hh__bar.navbar {
        padding-left: 20px;
        padding-right: 20px;
        gap: 10px;
    }
    .mh-hh__logo {
        height: 50px;
    }
    .mh-hh__menu.navbar-nav {
        padding: 5px 8px;
        gap: 0;
    }
    .mh-hh__menu .nav-link {
        padding: 6px 8px !important;
        font-size: 13px;
    }
    .mh-hh__utils {
        gap: 14px;
        margin-left: 4px;
    }
    .mh-hh__util {
        font-size: 13px;
    }
}
@media (max-width: 991px) {
    .mh-hero {
        min-height: 0;
        padding: 110px 16px 64px;
    }
    .mh-hs__filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .mh-hs__more {
        grid-column: 1 / -1;
        justify-content: center;
    }
    .mh-hs__extra {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 575px) {
    .mh-hero {
        padding: 96px 12px 48px;
    }
    .mh-hs__tab {
        padding: 9px 22px;
        font-size: 13px;
    }
    .mh-hs__card {
        padding: 14px;
        border-radius: 16px;
    }
    .mh-hs__query input {
        height: 48px;
        padding: 0 16px;
        font-size: 14px;
    }
    .mh-hs__submit {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    .mh-hero__title {
        margin-top: 24px;
        font-size: 22px;
    }
    .mh-hero__subtitle {
        margin-bottom: 24px;
        font-size: 11px;
        letter-spacing: 0.5px;
    }
    .mh-hero__stats {
        gap: 14px;
    }
    .mh-hero__stats li {
        flex: 1 1 auto;
    }
    .mh-hero__stats strong {
        font-size: 18px;
        white-space: nowrap;
    }
    .mh-hero__stats span {
        font-size: 11px;
        line-height: 1.3;
    }
    .mh-hero__credit {
        left: 12px;
        bottom: 8px;
    }
}

/* ===================== Búsqueda inteligente (campo grande) ===================== */
/* Plan: docs-dev/2026-10-09_plan_busqueda_inteligente.md. Chips base en customer.css (.mh-chip) */

.mh-hs__query {
    position: relative;
}
.mh-hs__suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    text-align: left;
}
.mh-hs__suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: var(--mh-ink);
    font-size: 14px;
    cursor: pointer;
}
.mh-hs__suggestion i {
    color: var(--mh-gray);
    font-size: 16px;
}
.mh-hs__suggestion-meta {
    margin-left: auto;
    color: var(--mh-gray);
    font-size: 12px;
    white-space: nowrap;
}
.mh-hs__suggestion:hover,
.mh-hs__suggestion.is-active {
    background-color: var(--mh-gray-light);
}
.mh-hs__suggestion.is-active .mh-hs__suggestion-name {
    color: var(--mh-red);
}
.mh-hs__understood {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 12px 0 0;
    text-align: left;
}
.mh-hs__understood[hidden] {
    display: none;
}
.mh-hs__understood-label {
    color: var(--mh-gray);
    font-size: 13px;
}
@media (max-width: 575px) {
    .mh-hs__suggestion {
        padding: 10px 14px;
    }
    .mh-hs__suggestion-meta {
        font-size: 11px;
    }
}
