/* ==========================================================================
   main.css — Estilos customizados SANTANA & MARTINS
   Complementa style.css (variáveis e base)
   ========================================================================== */

/* ==========================================================================
   Header (COMP-02 GlobalHeader)
   ========================================================================== */

.sm-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.sm-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 72px;
}

/* Logo */
.sm-header__logo a,
.sm-header__logo-text {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sm-header__logo img {
    max-height: 56px;
    width: auto;
}

.sm-header__logo-text {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-bg);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

/* Navegação */
.sm-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.sm-nav__list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.25rem;
}

.sm-nav__list li a {
    display: block;
    padding: 0.5rem 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background-color var(--transition);
}

.sm-nav__list li a:hover,
.sm-nav__list li a:focus,
.sm-nav__list li.current-menu-item > a,
.sm-nav__list li.current-page-ancestor > a {
    color: var(--color-accent);
    background-color: rgba(255, 255, 255, 0.08);
}

/* Ações do header */
.sm-header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sm-header__instagram {
    color: rgba(255, 255, 255, 0.75);
    transition: color var(--transition);
    display: flex;
    align-items: center;
}

.sm-header__instagram:hover,
.sm-header__instagram:focus {
    color: var(--color-accent);
}

.sm-header__cta {
    font-size: var(--fs-sm);
    padding: 0.5rem 1.25rem;
    white-space: nowrap;
}

/* Botão hamburger */
.sm-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition);
}

.sm-menu-toggle:hover,
.sm-menu-toggle:focus-visible {
    background-color: rgba(255, 255, 255, 0.1);
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.sm-menu-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--color-bg);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.sm-menu-toggle[aria-expanded="true"] .sm-menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.sm-menu-toggle[aria-expanded="true"] .sm-menu-toggle__bar:nth-child(2) {
    opacity: 0;
}
.sm-menu-toggle[aria-expanded="true"] .sm-menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Skip link */
.skip-link:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    background: var(--color-accent);
    color: var(--color-primary);
    font-weight: var(--fw-bold);
    border-radius: var(--radius-md);
    text-decoration: none;
    clip: auto !important;
    width: auto;
    height: auto;
}

/* ==========================================================================
   Footer (COMP-03 GlobalFooter)
   ========================================================================== */

.sm-footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.sm-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.sm-footer__heading {
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

/* Coluna marca */
.sm-footer__logo img {
    max-height: 52px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.sm-footer__logo-text {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--color-bg);
    margin-bottom: 1rem;
}

.sm-footer__tagline {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.65);
    max-width: 32ch;
    margin-bottom: 1.5rem;
}

.sm-footer__social {
    display: flex;
    gap: 0.75rem;
}

.sm-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    text-decoration: none;
    transition: background-color var(--transition), color var(--transition);
}

.sm-footer__social-link:hover,
.sm-footer__social-link:focus {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* Navegação rodapé */
.sm-footer__nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sm-footer__nav-list li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--fs-sm);
    transition: color var(--transition);
}

.sm-footer__nav-list li a:hover,
.sm-footer__nav-list li a:focus {
    color: var(--color-accent);
}

/* Contato rodapé */
.sm-footer__contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sm-footer__contact-list li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--fs-sm);
    transition: color var(--transition);
}

.sm-footer__contact-list li a:hover,
.sm-footer__contact-list li a:focus {
    color: var(--color-accent);
}

/* Rodapé inferior */
.sm-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sm-footer__copyright,
.sm-footer__legal {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    max-width: 100%;
}

/* ==========================================================================
   WhatsApp Float (COMP-04 WhatsAppWidget)
   ========================================================================== */

.sm-whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    text-decoration: none;
    animation: sm-whatsapp-pulse 2.5s ease-in-out infinite;
    transition: transform var(--transition), box-shadow var(--transition);
}

.sm-whatsapp-float:hover,
.sm-whatsapp-float:focus {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
    color: #ffffff;
}

.sm-whatsapp-float:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
}

@keyframes sm-whatsapp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   Página principal — layout
   ========================================================================== */

.sm-main {
    min-height: 60vh;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */

@media (max-width: 1024px) {
    .sm-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .sm-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    /* Header mobile */
    .sm-header__nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background-color: var(--color-primary);
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: var(--shadow-md);
    }

    .sm-header__nav.is-open {
        display: block;
    }

    .sm-nav__list {
        flex-direction: column;
        gap: 0;
    }

    .sm-nav__list li a {
        padding: 0.875rem 1rem;
        font-size: var(--fs-base);
    }

    .sm-header__cta {
        display: none;
    }

    .sm-header__instagram {
        display: none;
    }

    .sm-menu-toggle {
        display: flex;
    }

    .sm-header {
        position: relative;
    }

    /* Footer mobile */
    .sm-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sm-footer__brand {
        grid-column: auto;
    }

    .sm-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }

    /* WhatsApp menor em mobile */
    .sm-whatsapp-float {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 20px;
    }

    /* Tipografia responsiva */
    h1 { font-size: var(--fs-3xl); }
    h2 { font-size: var(--fs-2xl); }
    h3 { font-size: var(--fs-xl); }

    .section {
        padding: 3.5rem 0;
    }
}
