/* ==========================================================================
   FB WELLNESS — COMPONENTS
   Botões, cards, forms, nav. Reutilizáveis em qualquer página.
   ========================================================================== */

/* -------- BUTTON -------- */

.fb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--fb-space-2);
    padding: var(--fb-space-4) var(--fb-space-8);
    font-family: var(--fb-font-body);
    font-size: var(--fb-text-base);
    font-weight: var(--fb-weight-medium);
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--fb-radius-full);
    cursor: pointer;
    transition: all var(--fb-duration-fast) var(--fb-ease-out);
    white-space: nowrap;
}

.fb-btn--primary {
    background: var(--fb-color-primary);
    color: var(--fb-color-white);
}

.fb-btn--primary:hover,
.fb-btn--primary:focus {
    background: var(--fb-color-accent);
    color: var(--fb-color-white);
    transform: translateY(-1px);
}

.fb-btn--secondary {
    background: transparent;
    color: var(--fb-color-primary);
    border-color: var(--fb-color-primary);
}

.fb-btn--secondary:hover {
    background: var(--fb-color-primary);
    color: var(--fb-color-white);
}

.fb-btn--ghost {
    background: transparent;
    color: var(--fb-color-charcoal);
    border-color: var(--fb-color-border);
}

.fb-btn--ghost:hover {
    border-color: var(--fb-color-primary);
    color: var(--fb-color-primary);
}

.fb-btn--lg {
    padding: var(--fb-space-6) var(--fb-space-12);
    font-size: var(--fb-text-lg);
}

/* arrow micro-animation */
.fb-btn .fb-arrow {
    transition: transform var(--fb-duration-fast) var(--fb-ease-out);
}

.fb-btn:hover .fb-arrow {
    transform: translateX(4px);
}

/* -------- HEADER / NAV -------- */

.fb-header {
    position: sticky;
    top: 0;
    z-index: var(--fb-z-sticky);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid transparent;
    transition: border-color var(--fb-duration-base) var(--fb-ease-out);
}

.fb-header.is-scrolled {
    border-bottom-color: var(--fb-color-border);
}

.fb-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
    gap: var(--fb-space-6);
}

.fb-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.fb-logo img {
    height: 42px;
    width: auto;
    max-width: none;
    display: block;
}

@media (min-width: 1024px) {
    .fb-header__inner {
        min-height: 110px;
        gap: var(--fb-space-12);
    }
    .fb-logo img { height: 56px; }
}

/* CTA do header — visível só em desktop (no mobile o CTA fica no drawer) */
.fb-header__cta {
    display: none;
}
@media (min-width: 1024px) {
    .fb-header__cta {
        display: inline-flex;
        align-items: center;
        order: 3;
        flex-shrink: 0;
        white-space: nowrap;
    }
}

/* ==========================================================================
   NAV — drawer mobile lateral + horizontal desktop
   Mobile: drawer 75% / max 320px slide-in from right, fundo claro, Montserrat Light
   Desktop (>=1024px): nav horizontal normal dentro do header
   ========================================================================== */

.fb-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fb-nav__link {
    font-family: var(--fb-font-display, 'Montserrat', sans-serif);
    font-weight: 300;
    color: var(--fb-color-primary, #77252A);
    text-decoration: none;
    letter-spacing: 0.02em;
    display: block;
    transition: color var(--fb-duration-fast, 150ms) ease;
}

/* Mobile nav toggle (hamburger) — destaque visual claro */
.fb-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    padding: 12px 10px;
    background: rgba(119, 37, 42, 0.06);
    border: 1px solid rgba(119, 37, 42, 0.18);
    border-radius: 10px;
    cursor: pointer;
    z-index: 2;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.fb-nav-toggle:hover,
.fb-nav-toggle:focus-visible {
    background: rgba(119, 37, 42, 0.1);
    border-color: rgba(119, 37, 42, 0.32);
    outline: none;
}
.fb-nav-toggle span {
    display: block;
    height: 2.5px;
    background: var(--fb-color-primary, #77252A);
    border-radius: 2px;
    transition: transform var(--fb-duration-fast, 150ms) ease;
}

/* Backdrop sibling do drawer — cobre o resto da página quando menu aberto */
.fb-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(31, 21, 22, 0.38);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer;
}
.fb-nav.is-open ~ .fb-nav-backdrop,
.fb-nav-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Fecha scroll do body quando drawer aberto */
body.fb-nav-locked {
    overflow: hidden;
    touch-action: none;
}

/* Drawer aberto: neutralizar stacking context do header (sticky) pra
   o drawer (z-index 10000) ficar acima do backdrop (z-index 9998) */
body.fb-nav-locked .fb-header {
    position: relative;
    z-index: auto;
}

/* ---------- MOBILE (default) — drawer lateral ---------- */
.fb-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 82%;
    max-width: 320px;
    height: 100dvh;
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: -16px 0 48px rgba(31, 21, 22, 0.18);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 3.5rem 1.5rem 1.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    gap: 0;
    justify-content: space-between;
}
.fb-nav.is-open {
    transform: translateX(0);
}

/* Close button (X) — canto superior direito do drawer */
.fb-nav__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fb-color-primary, #77252A);
    border-radius: 50%;
    transition: background 0.2s ease;
    padding: 0;
    z-index: 2;
}
.fb-nav__close:hover,
.fb-nav__close:focus-visible {
    background: rgba(119, 37, 42, 0.08);
    outline: none;
}

/* Drawer header — logo bordeaux+gold + slogan */
.fb-nav__drawer-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.25rem 0 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(119, 37, 42, 0.1);
    flex-shrink: 0;
}
.fb-nav__drawer-logo {
    height: 56px;
    width: auto;
    max-width: 240px;
    display: block;
    margin: 0 auto 0.75rem;
}
.fb-nav__drawer-slogan {
    font-family: var(--fb-font-display, 'Montserrat', sans-serif);
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--fb-color-primary, #77252A);
    letter-spacing: 0.02em;
    font-style: italic;
    margin: 0;
    line-height: 1.3;
    opacity: 0.85;
}

/* Lista itens drawer */
.fb-nav .fb-nav__list {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 0;
    padding: 0;
    margin: 0.5rem 0 0;
    list-style: none;
}
.fb-nav .fb-nav__list li {
    opacity: 1;
    transform: translateX(0);
}
.fb-nav.is-open .fb-nav__list li:nth-child(1) { transition-delay: 0.08s; }
.fb-nav.is-open .fb-nav__list li:nth-child(2) { transition-delay: 0.11s; }
.fb-nav.is-open .fb-nav__list li:nth-child(3) { transition-delay: 0.14s; }
.fb-nav.is-open .fb-nav__list li:nth-child(4) { transition-delay: 0.17s; }
.fb-nav.is-open .fb-nav__list li:nth-child(5) { transition-delay: 0.20s; }
.fb-nav.is-open .fb-nav__list li:nth-child(6) { transition-delay: 0.23s; }
.fb-nav.is-open .fb-nav__list li:nth-child(7) { transition-delay: 0.26s; }

.fb-nav .fb-nav__list a {
    font-family: var(--fb-font-display, 'Montserrat', sans-serif);
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #5a1d21;
    padding: 0.95rem 0;
    display: block;
    border-bottom: 1px solid rgba(119, 37, 42, 0.12);
    text-align: left;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
    letter-spacing: 0.01em;
    opacity: 1 !important;
}
.fb-nav .fb-nav__list a:hover,
.fb-nav .fb-nav__list a:focus-visible {
    color: var(--fb-color-primary, #77252A);
    padding-left: 0.4rem;
    outline: none;
}

/* Drawer footer — CTA vinho sólido + social icons */
.fb-nav__drawer-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid rgba(119, 37, 42, 0.1);
    flex-shrink: 0;
}
.fb-nav__drawer-cta.fb-btn--primary {
    background: var(--fb-color-primary, #77252A);
    color: #ffffff;
    border-color: var(--fb-color-primary, #77252A);
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    display: block;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
}
.fb-nav__drawer-cta.fb-btn--primary:hover {
    background: #5a1d21;
}
.fb-nav__drawer-social {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.fb-nav__drawer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(119, 37, 42, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--fb-color-primary, #77252A);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.fb-nav__drawer-social a:hover,
.fb-nav__drawer-social a:focus-visible {
    background: var(--fb-color-primary, #77252A);
    color: #ffffff;
    outline: none;
}

/* ---------- DESKTOP (>=1024px) — nav horizontal inline no header ---------- */
@media (min-width: 1024px) {
    .fb-nav-toggle {
        display: none;
    }
    .fb-nav-backdrop {
        display: none !important;
    }
    /* Nav é child do header inner — vira inline em desktop */
    .fb-nav {
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
        height: auto;
        width: auto;
        max-width: none;
        background: transparent;
        box-shadow: none;
        padding: 0;
        overflow: visible;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        transform: none;
        transition: none;
        flex: 1;
        order: 2;
    }
    .fb-nav__close,
    .fb-nav__drawer-header,
    .fb-nav__drawer-footer {
        display: none !important;
    }
    .fb-nav .fb-nav__list {
        flex-direction: row;
        gap: var(--fb-space-6);
        margin: 0;
        list-style: none;
        padding: 0;
    }
    .fb-nav .fb-nav__list li {
        opacity: 1;
        transform: none;
    }
    .fb-nav .fb-nav__list a {
        font-family: var(--fb-font-display, 'Montserrat', sans-serif);
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--fb-color-charcoal, #1f1516);
        padding: 0.5rem 0;
        border-bottom: none;
        letter-spacing: 0.01em;
        position: relative;
        text-decoration: none;
    }
    .fb-nav .fb-nav__list a:hover,
    .fb-nav .fb-nav__list a:focus-visible {
        color: var(--fb-color-primary, #77252A);
        padding-left: 0;
    }
    .fb-nav .fb-nav__list a::after {
        content: '';
        position: absolute;
        left: 0; right: 0;
        bottom: 0;
        height: 1px;
        background: var(--fb-color-accent, #EAC579);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.2s ease;
    }
    .fb-nav .fb-nav__list a:hover::after,
    .fb-nav .fb-nav__list a[aria-current="page"]::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* -------- CARD -------- */

.fb-card {
    background: var(--fb-color-white);
    border: 1px solid var(--fb-color-border);
    border-radius: var(--fb-radius-md);
    padding: var(--fb-space-8);
    transition: transform var(--fb-duration-base) var(--fb-ease-out),
                box-shadow var(--fb-duration-base) var(--fb-ease-out);
}

.fb-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fb-depth-lg);
}

.fb-card__title {
    font-size: var(--fb-text-xl);
    margin: 0 0 var(--fb-space-3);
    font-family: var(--fb-font-display);
}

.fb-card__text {
    font-size: var(--fb-text-base);
    color: var(--fb-color-muted);
    margin: 0 0 var(--fb-space-6);
}

.fb-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fb-color-cream);
    border-radius: var(--fb-radius-full);
    margin-bottom: var(--fb-space-6);
    color: var(--fb-color-primary);
}

.fb-card__icon svg {
    width: 24px;
    height: 24px;
}

/* -------- FORM -------- */

.fb-form {
    display: grid;
    gap: var(--fb-space-4);
}

.fb-form__field {
    display: flex;
    flex-direction: column;
    gap: var(--fb-space-2);
}

.fb-form__label {
    font-size: var(--fb-text-sm);
    font-weight: var(--fb-weight-medium);
    color: var(--fb-color-charcoal);
}

.fb-form__input,
.fb-form__textarea,
.fb-form__select {
    width: 100%;
    padding: var(--fb-space-4);
    font-family: var(--fb-font-body);
    font-size: var(--fb-text-base);
    color: var(--fb-color-charcoal);
    background: var(--fb-color-white);
    border: 1px solid var(--fb-color-border);
    border-radius: var(--fb-radius-sm);
    transition: border-color var(--fb-duration-fast) var(--fb-ease-out);
}

.fb-form__input:focus,
.fb-form__textarea:focus,
.fb-form__select:focus {
    outline: none;
    border-color: var(--fb-color-primary);
}

.fb-form__textarea {
    min-height: 120px;
    resize: vertical;
}

.fb-form__consent {
    display: flex;
    align-items: flex-start;
    margin: var(--fb-space-2) 0;
}
.fb-form__consent-label {
    display: flex;
    gap: var(--fb-space-3);
    align-items: flex-start;
    font-size: var(--fb-text-sm);
    color: var(--fb-color-muted);
    line-height: 1.5;
    cursor: pointer;
}
.fb-form__consent-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--fb-color-primary);
    cursor: pointer;
}
.fb-form__consent-label a {
    color: var(--fb-color-primary);
    font-weight: 500;
    text-decoration: underline;
}

.fb-form__message {
    padding: var(--fb-space-4);
    border-radius: var(--fb-radius-sm);
    font-size: var(--fb-text-sm);
    display: none;
}

.fb-form__message.is-success {
    display: block;
    background: var(--fb-color-cream);
    color: var(--fb-color-primary);
}

.fb-form__message.is-error {
    display: block;
    background: rgba(201, 111, 74, 0.1);
    color: var(--fb-color-accent);
}

/* -------- BADGE -------- */

.fb-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--fb-space-1) var(--fb-space-3);
    font-size: var(--fb-text-xs);
    font-weight: var(--fb-weight-medium);
    letter-spacing: 0.02em;
    color: var(--fb-color-primary);
    background: var(--fb-color-cream);
    border-radius: var(--fb-radius-full);
}
