#hero {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
    background-color: var(--brand-olive);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(179, 197, 137, 0.16) 0%, transparent 45%),
        radial-gradient(circle at 90% 85%, rgba(179, 197, 137, 0.12) 0%, transparent 50%),
        linear-gradient(160deg, var(--brand-charcoal) 0%, var(--brand-olive) 55%, #4a4a30 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--brand-cream);
    box-sizing: border-box;
    position: relative;
}

/* Quando uma foto de fundo é definida via dashboard: véu esverdeado (tons
   da própria marca, não neutro) + leve desfoque da foto para leitura do
   texto e para a foto não competir com o conteúdo. */
#hero[style*="background-image: url"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(55, 56, 38, 0.45) 0%, rgba(20, 26, 16, 0.82) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}

#hero > * {
    position: relative;
    z-index: 1;
}

/* ── Bloco de título assimétrico ── */
.hero-headline {
    align-self: center;
    max-width: 900px;
    padding: 140px 6vw 40px;
    box-sizing: border-box;
}

.hero-headline .hero-badge {
    background-color: rgba(179, 197, 137, 0.15);
    border: 1px solid rgba(179, 197, 137, 0.4);
    color: var(--brand-sage);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1.75rem;
}

.hero-headline h1 {
    font-family: 'Houstiq 2', serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 4.75rem);
    line-height: 1.08;
    margin: 0;
    color: var(--brand-cream);
    text-wrap: balance;
}

/* ── Faixa de busca fixada na base do hero ── */
.hero-searchbar {
    border-top: 1px solid rgba(239, 238, 230, 0.16);
    background: rgba(23, 23, 18, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 6vw;
}

.hero-search-form {
    display: flex;
    align-items: stretch;
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
}

.hero-search-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 28px 18px 0;
    margin-right: 28px;
    border-right: 1px solid rgba(239, 238, 230, 0.14);
    min-width: 0;
}

.hero-search-field:first-child {
    padding-left: 0;
}

.hero-search-code {
    flex: 1;
    min-width: 140px;
}

.hero-search-field label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand-sage);
    margin-bottom: 6px;
}

.hero-search-field select,
.hero-search-field input {
    /* background-color explícito (em vez do shorthand "background: none") —
       evita um bug de repaint do Chromium em <select appearance:none> com
       texto claro + background-image customizado, que "fantasmava" o texto */
    background-color: transparent;
    border: none;
    color: var(--brand-cream);
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    padding: 0;
    width: 100%;
    min-width: 120px;
    min-height: 24px;
}

.hero-search-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23b3c589' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M3.5 6.25 8 10.75l4.5-4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    padding-right: 20px !important;
}

.hero-search-field select option {
    color: var(--brand-charcoal);
    background: var(--brand-cream);
}

.hero-search-field input::placeholder {
    color: rgba(239, 238, 230, 0.45);
}

.hero-search-field select:focus-visible,
.hero-search-field input:focus-visible {
    outline: 2px solid var(--brand-sage);
    outline-offset: 4px;
    border-radius: 2px;
}

.hero-search-submit {
    width: 64px;
    min-height: var(--touch-target);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-sage);
    color: var(--brand-olive);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color var(--transition-fast);
}

.hero-search-submit:hover {
    background: var(--brand-cream);
}

/* ── Gatilho "Falar com Marlon" ── */
#contact-hero-form {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.contact-hero-header {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    padding: 18px 0 18px 28px;
}

.hero-badge-purple {
    background: none;
    border: 1px solid var(--brand-sage);
    color: var(--brand-sage);
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-hero-header:hover .hero-badge-purple {
    background: var(--brand-sage);
    color: var(--brand-olive);
}

.contact-hero-body {
    display: none;
}

/* ── Estado expandido: modal central ── */
#contact-hero-form.expanded {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(23, 23, 18, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

#contact-hero-form.expanded .contact-hero-header {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 0;
}

#contact-hero-form.expanded .hero-badge-purple {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--brand-cream);
    color: var(--brand-olive);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

#contact-hero-form.expanded .hero-badge-purple::before {
    content: '\2715';
    font-size: 1rem;
}

#contact-hero-form.expanded .contact-hero-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: var(--brand-cream);
    color: var(--brand-charcoal);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(23, 23, 18, 0.4);
}

#contact-hero-form h2 {
    font-family: 'Houstiq 2', serif;
    font-weight: 400;
    font-size: 1.4rem;
    margin: 0 0 4px;
    line-height: 1.3;
}

#contact-hero-form .form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

#contact-hero-form label {
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 0.85rem;
}

#contact-hero-form input,
#contact-hero-form select {
    padding: 10px;
    min-height: var(--touch-target);
    background-color: white;
    color: var(--brand-charcoal);
    border: 1px solid #d8d6c9;
    border-radius: var(--radius-md);
    box-sizing: border-box;
    width: 100%;
}

#contact-hero-form input:hover,
#contact-hero-form select:hover {
    border-color: var(--brand-sage);
}

#contact-hero-form input:focus,
#contact-hero-form select:focus {
    border-color: var(--brand-olive);
}

.btn-whatsapp-hero {
    padding: 12px 16px;
    min-height: var(--touch-target);
    box-sizing: border-box;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity var(--transition-fast);
}

.btn-whatsapp-hero:hover {
    opacity: 0.88;
}

.contact-hero-msg {
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
    min-height: 1.2em;
}

.contact-hero-msg.error {
    color: var(--danger);
}

.contact-hero-msg.success {
    color: var(--brand-olive);
    font-weight: 600;
}

/* ── Responsivo ── */
@media (max-width: 900px) {
    .hero-headline {
        padding: 120px 6vw 32px;
    }

    .hero-searchbar {
        flex-direction: column;
        padding: 0 6vw;
    }

    .hero-search-form {
        flex-wrap: wrap;
    }

    .hero-search-field {
        border-right: none;
        border-bottom: 1px solid rgba(239, 238, 230, 0.14);
        padding: 14px 0;
        margin-right: 0;
        width: 100%;
    }

    .hero-search-submit {
        width: 100%;
        padding: 14px 0;
    }

    .contact-hero-header {
        padding: 14px 0;
        justify-content: center;
        width: 100%;
    }

    /* Empurra o card para baixo do botão de fechar, evitando sobreposição
       em telas estreitas onde o card ocupa quase toda a largura */
    #contact-hero-form.expanded {
        align-items: flex-start;
        padding-top: 76px;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        padding-top: 100px;
    }
}
