/* ── Widget: Hero Search ─────────────────────────────────────────────
   BEM block: .wgt-hero
   Encapsula: topbar, hero search bar, mode tabs, quick-filter chips.
   Mobile-first. CSS variables del proyecto.
   ──────────────────────────────────────────────────────────────────── */

.wgt-hero {
    --hero-bg: linear-gradient(140deg, #f7f3eb 0%, #f4f6f2 52%, #eaf2f4 100%);
    --hero-ink: #1f252b;
    --hero-ink-soft: #5d6772;
    --hero-brand: #114b5f;

    background: var(--hero-bg);
    color: var(--hero-ink);
    border-bottom: 1px solid rgba(27, 37, 44, 0.1);
}

/* ── Screen-reader only ──────────────────────────────────────────── */
.wgt-hero__sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ── Mobile omnibar ───────────────────────────────────────────────── */
.wgt-hero__mobile {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: var(--space-3, 12px) var(--space-4, 16px);
}

.wgt-hero__mobile-input {
    min-height: 44px;
    padding: 0 var(--space-3, 12px);
    border: 1px solid rgba(36, 42, 48, 0.2);
    border-radius: var(--radius-md, 10px);
    background: #fff;
    font-size: 0.9375rem;
    color: var(--hero-ink);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.wgt-hero__mobile-input:focus {
    border-color: var(--hero-brand);
    box-shadow: 0 0 0 3px rgba(17, 75, 95, 0.1);
}

.wgt-hero__mobile-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(36, 42, 48, 0.24);
    border-radius: var(--radius-md, 10px);
    background: #fff;
    color: #24303a;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.wgt-hero__mobile-filter:hover {
    background: var(--c-surface-2, #eceeea);
}

.wgt-hero__mobile-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    border: 1px solid #11181e;
    border-radius: var(--radius-md, 10px);
    background: #11181e;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}
.wgt-hero__mobile-submit:hover {
    background: #2a323a;
}

/* ── Sticky search ────────────────────────────────────────────────── */
.wgt-hero__sticky {
    display: none;
}

.wgt-hero__sticky-form {
    display: flex;
    align-items: center;
    gap: 0;
    padding: var(--space-3, 12px) var(--space-4, 16px);
    background: #fff;
    border-bottom: 1px solid var(--c-border, #d4d9d4);
    box-shadow: var(--shadow-md, 0 8px 20px rgba(17,24,39,0.06));
}

.wgt-hero__sticky-input {
    flex: 1;
    min-height: 44px;
    padding: 0 var(--space-4, 16px);
    border: 1px solid var(--c-border, #d4d9d4);
    border-right: none;
    border-radius: var(--radius-md, 10px) 0 0 var(--radius-md, 10px);
    font-size: 0.9375rem;
    color: var(--hero-ink);
    outline: none;
}
.wgt-hero__sticky-input:focus {
    border-color: var(--hero-brand);
}

.wgt-hero__sticky-submit {
    min-height: 44px;
    padding: 0 var(--space-5, 24px);
    border: 1px solid #11181e;
    border-radius: 0 var(--radius-md, 10px) var(--radius-md, 10px) 0;
    background: #11181e;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.wgt-hero__sticky-submit:hover {
    background: #2a323a;
}

/* ── Topbar ───────────────────────────────────────────────────────── */
.wgt-hero__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3, 12px) var(--space-4, 16px);
    max-width: 1120px;
    margin: 0 auto;
}

.wgt-hero__brand {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--hero-ink);
    font-weight: 700;
    font-size: 1.0625rem;
}

.wgt-hero__brand-mark {
    font-size: 1.2rem;
    color: var(--hero-brand);
}

.wgt-hero__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2, 8px);
}

.wgt-hero__action {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 var(--space-3, 12px);
    border: none;
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.wgt-hero__action--panel,
.wgt-hero__action--signin {
    color: var(--hero-ink);
    font-weight: 600;
}
.wgt-hero__action--panel:hover,
.wgt-hero__action--signin:hover {
    background: rgba(0,0,0,0.05);
}

.wgt-hero__action--muted {
    color: var(--c-text-muted, #616a73);
}
.wgt-hero__action--muted:hover {
    background: rgba(0,0,0,0.04);
    color: var(--hero-ink);
}

.wgt-hero__action--reg {
    background: var(--hero-brand);
    color: #fff;
    font-weight: 600;
}
.wgt-hero__action--reg:hover {
    background: #0e3f4f;
}

/* ── Hero section ─────────────────────────────────────────────────── */
.wgt-hero__hero {
    text-align: center;
    padding: clamp(42px, 7vw, 86px) var(--space-4, 16px) clamp(52px, 8vw, 96px);
    max-width: 900px;
    margin: 0 auto;
}

.wgt-hero__logo {
    display: block;
    font-size: 2rem;
    color: var(--hero-brand);
    margin-bottom: var(--space-2, 8px);
}

.wgt-hero__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hero-ink-soft);
    margin: 0 0 var(--space-2, 8px);
}

.wgt-hero__title {
    font-family: var(--font-display, var(--font-sans));
    font-size: 2rem;
    font-weight: 700;
    color: var(--hero-ink);
    margin: 0 auto var(--space-3, 12px);
    line-height: 1.06;
    max-width: 760px;
}

.wgt-hero__lead {
    max-width: 620px;
    margin: 0 auto var(--space-6, 32px);
    color: var(--hero-ink-soft);
    font-size: 1rem;
    line-height: 1.55;
}

/* ── Search bar ───────────────────────────────────────────────────── */
.wgt-hero__search {
    max-width: 760px;
    margin: 0 auto;
}

.wgt-hero__form {
    display: flex;
    align-items: stretch;
    margin-bottom: var(--space-3, 12px);
    box-shadow: var(--shadow-lg, 0 14px 28px rgba(17,24,39,0.08));
    border-radius: 8px;
    overflow: hidden;
}

.wgt-hero__field {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid transparent;
    border-right: none;
    border-radius: 8px 0 0 8px;
    transition: border-color 0.2s;
}
.wgt-hero__form:focus-within .wgt-hero__field {
    border-color: var(--hero-brand);
}

.wgt-hero__field-icon {
    display: flex;
    align-items: center;
    padding-left: var(--space-4, 16px);
    color: #94a3b8;
    flex-shrink: 0;
}

.wgt-hero__input {
    flex: 1;
    min-height: 58px;
    padding: 0 var(--space-3, 12px) 0 var(--space-3, 12px);
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--hero-ink);
    outline: none;
    width: 100%;
}
.wgt-hero__input::placeholder {
    color: #94a3b8;
}

.wgt-hero__submit {
    display: inline-flex;
    align-items: center;
    padding: 0 var(--space-5, 24px);
    border: none;
    border-radius: 0 8px 8px 0;
    background: #11181e;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.wgt-hero__submit:hover {
    background: #2a323a;
}

/* ── Mode tabs ────────────────────────────────────────────────────── */
.wgt-hero__modes {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 4px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(27, 37, 44, 0.08);
    border-radius: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.wgt-hero__modes::-webkit-scrollbar {
    display: none;
}

.wgt-hero__mode {
    flex: 0 0 auto;
    padding: 7px 16px;
    border: none;
    border-radius: 6px;
    min-height: 38px;
    background: transparent;
    color: var(--hero-ink-soft);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.wgt-hero__mode:hover {
    color: var(--hero-ink);
    background: rgba(255,255,255,0.5);
}
.wgt-hero__mode.is-active {
    background: #fff;
    color: var(--hero-ink);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(17,24,39,0.06);
}
.wgt-hero__mode--ghost {
    color: var(--c-text-muted, #616a73);
    font-weight: 400;
    font-style: italic;
}

/* ── Quick filter chips ───────────────────────────────────────────── */
.wgt-hero__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--space-4, 16px);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.wgt-hero__chips-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-right: 2px;
}

.wgt-hero__chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(36, 42, 48, 0.15);
    border-radius: var(--radius-full, 9999px);
    background: rgba(255,255,255,0.7);
    color: var(--hero-ink-soft);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wgt-hero__chip:hover {
    background: #fff;
    border-color: var(--hero-brand);
    color: var(--hero-ink);
}

/* ── Tablet (≥768px) ──────────────────────────────────────────────── */
@media (min-width: 768px) {
    .wgt-hero__mobile {
        display: none;
    }

    .wgt-hero__sticky {
        display: block;
    }

    .wgt-hero__topbar {
        padding: var(--space-3, 12px) var(--space-5, 24px);
    }

    .wgt-hero__title {
        font-size: 2.75rem;
    }

    .wgt-hero__hero {
        padding-top: clamp(54px, 7vw, 90px);
        padding-bottom: clamp(64px, 8vw, 104px);
    }

    .wgt-hero__input {
        font-size: 1.0625rem;
    }

    .wgt-hero__mode {
        padding: 8px 18px;
        font-size: 0.875rem;
    }
}

/* ── Desktop (≥1024px) ────────────────────────────────────────────── */
@media (min-width: 1024px) {
    .wgt-hero__title {
        font-size: 3.25rem;
    }

    .wgt-hero__submit {
        padding: 0 var(--space-6, 32px);
    }
}

@media (max-width: 640px) {
    .wgt-hero__mobile-filter span {
        display: none;
    }

    .wgt-hero__hero {
        padding-top: 34px;
    }

    .wgt-hero__form {
        display: grid;
        grid-template-columns: 1fr;
        overflow: visible;
        border-radius: 8px;
        box-shadow: none;
        gap: 8px;
    }

    .wgt-hero__field,
    .wgt-hero__submit {
        border-radius: 8px;
    }

    .wgt-hero__field {
        border: 1px solid rgba(27, 37, 44, 0.16);
    }

    .wgt-hero__submit {
        min-height: 48px;
        justify-content: center;
    }
}

/* ── Production refresh: full-bleed editorial hero ───────────────── */
.wgt-hero {
    --hero-bg: #101820;
    --hero-ink: #ffffff;
    --hero-ink-soft: rgba(255, 255, 255, 0.78);
    --hero-brand: #8fd3ff;
    --hero-accent: #38b27d;
    --hero-dark: #0f171d;
    --hero-image: image-set(
        url("../../img/landing/directory-hero-local-commerce.webp") type("image/webp"),
        url("../../img/landing/directory-hero-local-commerce.png") type("image/png")
    );

    background: var(--hero-dark);
    border-bottom: 0;
    color: var(--hero-ink);
}

.wgt-hero__topbar {
    position: relative;
    z-index: 3;
    width: min(1120px, calc(100% - 32px));
    min-height: 68px;
    padding: 0;
}

.wgt-hero__brand,
.wgt-hero__action--panel,
.wgt-hero__action--signin {
    color: #ffffff;
}

.wgt-hero__brand {
    min-height: 44px;
}

.wgt-hero__brand-mark {
    color: #9ddcff;
}

.wgt-hero__action {
    border-radius: 8px;
    letter-spacing: 0;
}

.wgt-hero__action--panel:hover,
.wgt-hero__action--signin:hover,
.wgt-hero__action--muted:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.wgt-hero__action--muted {
    color: rgba(255, 255, 255, 0.7);
}

.wgt-hero__action--reg {
    background: #ffffff;
    color: #123142;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.wgt-hero__action--reg:hover {
    background: #eaf7ff;
    color: #0b2736;
}

.wgt-hero__hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-height: clamp(460px, 62vh, 620px);
    margin: -68px 0 0;
    padding: clamp(116px, 15vw, 150px) max(16px, calc((100% - 1120px) / 2)) clamp(56px, 8vw, 84px);
    overflow: hidden;
    text-align: left;
    background-image:
        linear-gradient(90deg, rgba(9, 15, 20, 0.92) 0%, rgba(9, 15, 20, 0.74) 38%, rgba(9, 15, 20, 0.28) 72%, rgba(9, 15, 20, 0.1) 100%),
        linear-gradient(180deg, rgba(9, 15, 20, 0.7) 0%, rgba(9, 15, 20, 0.05) 30%, rgba(9, 15, 20, 0.78) 100%),
        var(--hero-image);
    background-position: center;
    background-size: cover;
}

.wgt-hero__hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    z-index: -1;
    background: linear-gradient(180deg, rgba(9, 15, 20, 0), #f7f9f6 96%);
}

.wgt-hero__logo,
.wgt-hero__eyebrow,
.wgt-hero__title,
.wgt-hero__lead,
.wgt-hero__search,
.wgt-hero__chips,
.wgt-hero__signals {
    width: min(100%, 720px);
    margin-left: 0;
    margin-right: 0;
}

.wgt-hero__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: var(--space-3, 12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #9ddcff;
    font-size: 1.35rem;
    backdrop-filter: blur(10px);
}

.wgt-hero__eyebrow {
    color: #9ddcff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
}

.wgt-hero__title {
    margin-bottom: var(--space-4, 16px);
    color: #ffffff;
    text-wrap: balance;
    text-shadow: 0 3px 28px rgba(0, 0, 0, 0.42);
}

.wgt-hero__lead {
    max-width: 610px;
    margin-bottom: var(--space-5, 24px);
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.wgt-hero__form {
    margin-bottom: var(--space-3, 12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.wgt-hero__field {
    border: 0;
    border-radius: 8px 0 0 8px;
}

.wgt-hero__form:focus-within {
    box-shadow: 0 0 0 4px rgba(143, 211, 255, 0.22), 0 22px 54px rgba(0, 0, 0, 0.3);
}

.wgt-hero__form:focus-within .wgt-hero__field {
    border-color: transparent;
}

.wgt-hero__input {
    min-height: 62px;
}

.wgt-hero__submit {
    min-width: 132px;
    border-left: 1px solid rgba(17, 24, 30, 0.08);
    background: #10202a;
}

.wgt-hero__submit:hover {
    background: #183545;
}

.wgt-hero__modes {
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    margin-left: 0;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(11, 22, 30, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wgt-hero__mode {
    color: rgba(255, 255, 255, 0.76);
    letter-spacing: 0;
}

.wgt-hero__mode:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.wgt-hero__mode.is-active {
    background: #ffffff;
    color: #0f202a;
}

.wgt-hero__mode--ghost {
    color: #9ddcff;
    font-style: normal;
}

.wgt-hero__chips {
    justify-content: flex-start;
    max-width: 720px;
}

.wgt-hero__chips-label {
    color: rgba(255, 255, 255, 0.66);
    letter-spacing: 0;
}

.wgt-hero__chip {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(8px);
}

.wgt-hero__chip:hover {
    border-color: rgba(157, 220, 255, 0.84);
    background: rgba(157, 220, 255, 0.18);
    color: #ffffff;
}

.wgt-hero__signals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--space-4, 16px);
}

.wgt-hero__signal {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(10, 20, 28, 0.48);
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.8125rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.wgt-hero__signal-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

.wgt-hero__signal-dot--open {
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.22);
}

@media (min-width: 768px) {
    .wgt-hero__title {
        font-size: clamp(0.25rem, 2.8vw, 2.4rem);
        max-width: 860px;
    }
}

@media (max-width: 767px) {
    .wgt-hero {
        background: #f7f9f6;
    }

    .wgt-hero__mobile {
        position: sticky;
        top: 0;
        z-index: 5;
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid rgba(27, 37, 44, 0.1);
        backdrop-filter: blur(12px);
    }

    .wgt-hero__topbar {
        min-height: 60px;
        width: min(100% - 24px, 1120px);
    }

    .wgt-hero__brand-name {
        font-size: 1rem;
    }

    .wgt-hero__actions {
        gap: 4px;
    }

    .wgt-hero__action {
        min-height: 34px;
        padding-inline: 9px;
        font-size: 0.76rem;
    }

    .wgt-hero__hero {
        min-height: 520px;
        margin-top: -60px;
        padding: 104px 16px 48px;
        background-position: 62% center;
    }

    .wgt-hero__title {
        font-size: clamp(0.25rem, 5vw, 1.35rem);
    }

    .wgt-hero__lead {
        font-size: 1rem;
    }

    .wgt-hero__form {
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .wgt-hero__field {
        min-height: 54px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .wgt-hero__submit {
        min-height: 50px;
        min-width: 0;
        border-radius: 8px;
        background: #ffffff;
        color: #10202a;
    }

    .wgt-hero__modes {
        padding-bottom: 5px;
    }

    .wgt-hero__signals {
        gap: 6px;
    }

    .wgt-hero__signal {
        min-height: 32px;
        font-size: 0.76rem;
    }
}
