/* =========================================
   SFG CONSULTORIA IMOBILIÁRIA
   HEADER + NAVBAR RESPONSIVA
========================================= */

.sfg-header {
    --sfg-navy: #101d30;
    --sfg-navy-dark: #0b1524;
    --sfg-gold: #c5a568;
    --sfg-white: #ffffff;
    --sfg-text: #d8dce3;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid rgba(197, 165, 104, 0.2);
    display: grid;
    grid-template-columns: minmax(20px, 1fr) minmax(0, 1410px) minmax(20px, 1fr);
    position: fixed;
    top: 0;                                     
    right: 0;
    left: 0;
    background-color: rgb(1, 26, 43);
}

.sfg-header *,
.sfg-header *::before,
.sfg-header *::after {
    box-sizing: border-box;
}


/* =========================================
   CONTAINER PRINCIPAL
========================================= */

.sfg-header__container {
    width: 100%;
    min-height: 94px;
    margin: 0 auto;
    padding: 0 5%;
    height: 90px;
    grid-column: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

/* =========================================
   LOGO
========================================= */

.sfg-header__logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    width: 90px;
    text-decoration: none;
}

.sfg-header__logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* =========================================
   NAVEGAÇÃO
========================================= */

.sfg-header__navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(1, 26, 43);
    backdrop-filter: blur(10px);
}

.sfg-header__links {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 30px;

    padding: 0;
    margin: 0;

    list-style: none;
}

.sfg-header__links li {
    margin: 0;
    padding: 0;
}

.sfg-header__link {
    position: relative;

    display: inline-flex;
    align-items: center;

    padding: 10px 0;

    color: var(--sfg-text);

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;
    white-space: nowrap;

    transition: color 0.25s ease;
}

/* Linha dourada abaixo do link */

.sfg-header__link::after {
    position: absolute;
    content: "";

    left: 0;
    bottom: 3px;

    width: 0;
    height: 2px;

    background: var(--sfg-gold);

    transition: width 0.25s ease;
}

.sfg-header__link:hover {
    color: var(--sfg-gold);
}

.sfg-header__link:hover::after {
    width: 100%;
}


/* =========================================
   AÇÕES DESKTOP
========================================= */

.sfg-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-shrink: 0;
}

.sfg-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    min-height: 47px;
    padding: 0 19px;

    background: var(--sfg-gold);
    border: 1px solid var(--sfg-gold);
    border-radius: 3px;

    color: var(--sfg-navy-dark);

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;
    white-space: nowrap;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.sfg-header__cta:hover {
    background: transparent;
    border-color: var(--sfg-gold);
    color: var(--sfg-gold);
}

.sfg-header__cta svg {
    flex-shrink: 0;

    transition: transform 0.25s ease;
}

.sfg-header__cta:hover svg {
    transform: translate(2px, -2px);
}


/* =========================================
   BOTÃO HAMBÚRGUER
========================================= */

.sfg-header__toggle {
    display: none;

    width: 44px;
    height: 44px;

    padding: 10px;

    align-items: center;
    justify-content: center;
    flex-direction: column;

    gap: 6px;

    background: transparent;
    border: 1px solid rgba(197, 165, 104, 0.35);
    border-radius: 3px;

    cursor: pointer;
}

.sfg-header__toggle span {
    display: block;

    width: 21px;
    height: 2px;

    background: var(--sfg-gold);
    border-radius: 2px;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


/* Contato mobile oculto no desktop */

.sfg-header__mobile-contact {
    display: none;
}


/* =========================================
   NOTEBOOKS E TABLETS
========================================= */

@media (max-width: 1240px) {

    .sfg-header__container {
        gap: 22px;
        padding: 0 3%;
    }

    .sfg-header__links {
        gap: 19px;
    }

    .sfg-header__link {
        font-size: 13px;
    }

    .sfg-header__cta {
        padding: 0 13px;
        font-size: 12px;
    }

    .sfg-header__logo img {
        max-width: 155px;
    }
}


/* =========================================
   MENU MOBILE
========================================= */

@media (max-width: 1066px) {

    .sfg-header__container {
        min-height: 76px;
        padding: 0 22px;
        gap: 15px;
    }

    .sfg-header__logo img {
        max-width: 165px;
        max-height: 55px;
    }


    /* Botão hambúrguer */

    .sfg-header__toggle {
        display: flex;

        flex-shrink: 0;
        margin-left: auto;

        position: relative;
        z-index: 1002;
    }


    /* Esconde o CTA desktop */

    .sfg-header__actions {
        display: none;
    }


    /* Painel de navegação */

    .sfg-header__navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 12px 22px 25px;
        border-top: 1px solid rgba(197, 165, 104, 0.2);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition:
            opacity 0.25s ease,
            visibility 0.25s ease,
            transform 0.25s ease;
    }


    /* Estado aberto controlado pelo JavaScript */

    .sfg-header__navigation.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);
    }


    /* Links em coluna */

    .sfg-header__links {
        width: 100%;

        flex-direction: column;
        align-items: stretch;

        gap: 0;
    }

    .sfg-header__links li {
        width: 100%;

        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .sfg-header__link {
        display: flex;

        width: 100%;
        padding: 16px 0;

        font-size: 14px;
    }

    .sfg-header__link::after {
        bottom: 9px;
    }


    /* Contato dentro do menu */

    .sfg-header__mobile-contact {
        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 12px;
        padding-top: 22px;
    }

    .sfg-header__mobile-label {
        color: #aab3c0;

        font-size: 12px;
        letter-spacing: 0.04em;
    }

    .sfg-header__mobile-whatsapp {
        display: flex;
        align-items: center;
        justify-content: center;

        min-height: 48px;
        padding: 12px 18px;

        background: var(--sfg-gold);
        border: 1px solid var(--sfg-gold);
        border-radius: 3px;

        color: var(--sfg-navy-dark);

        font-size: 14px;
        font-weight: 700;

        text-decoration: none;

        transition:
            background 0.25s ease,
            color 0.25s ease;
    }

    .sfg-header__mobile-whatsapp:hover {
        background: transparent;
        color: var(--sfg-gold);
    }

    .sfg-header__mobile-phone {
        color: var(--sfg-text);

        font-size: 13px;
        text-align: center;

        text-decoration: none;
    }


    /* Animação do hambúrguer aberto */

    .sfg-header__toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .sfg-header__toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .sfg-header__toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

}


/* =========================================
   CELULARES PEQUENOS
========================================= */

@media (max-width: 380px) {

    .sfg-header__container {
        padding: 0 15px;
    }

    .sfg-header__logo img {
        max-width: 140px;
    }

    .sfg-header__navigation {
        padding-right: 15px;
        padding-left: 15px;
    }

}


/* =========================================
   ACESSIBILIDADE
========================================= */

.sfg-header__link:focus-visible,
.sfg-header__cta:focus-visible,
.sfg-header__toggle:focus-visible,
.sfg-header__mobile-whatsapp:focus-visible,
.sfg-header__mobile-phone:focus-visible {
    outline: 2px solid var(--sfg-gold);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {

    .sfg-header *,
    .sfg-header *::before,
    .sfg-header *::after {
        transition-duration: 0.01ms !important;
    }

}