/* Guilherme Neto Advocacia e Assessoria - v1.0.0 */
/* Desenvolvido por Anderson Barbosa - https://abdesignerpro.com.br */

/* Reset e base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #d8af64;
    color: #ffffff;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #013d3e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #025a5c;
}

/* Animações de revelação (Intersection Observer) */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    transform: translateY(40px);
}
.reveal-left {
    transform: translateX(-50px);
}
.reveal-right {
    transform: translateX(50px);
}
.reveal-scale {
    transform: scale(0.9);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Delay escalonado para elementos filhos */
.reveal-up:nth-child(2),
.reveal-left:nth-child(2),
.reveal-right:nth-child(2) {
    transition-delay: 0.1s;
}
.reveal-up:nth-child(3),
.reveal-left:nth-child(3),
.reveal-right:nth-child(3) {
    transition-delay: 0.2s;
}
.reveal-up:nth-child(4),
.reveal-left:nth-child(4),
.reveal-right:nth-child(4) {
    transition-delay: 0.3s;
}

/* Transição suave do topBar */
#topBar {
    transition: max-height 0.4s ease, opacity 0.4s ease;
    max-height: 40px;
    overflow: hidden;
}

/* Header scrolled */
.header-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08) !important;
}

.header-scrolled .nav-link {
    color: #0a1a1a;
}

/* Hamburger animação */
#mobileMenuBtn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#mobileMenuBtn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
#mobileMenuBtn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
}

/* Mobile menu ativo */
#mobileMenu.active {
    pointer-events: auto;
}
#mobileMenu.active #mobileOverlay {
    opacity: 1;
}
#mobileMenu.active #mobilePanel {
    transform: translateX(0);
}

/* Contador animação */
.counter-value {
    display: inline-block;
    min-width: 1ch;
}

/* Depoimentos slider */
#testimonialSlider {
    position: relative;
}

/* Cards de serviço */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d8af64, #013d3e);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: left;
}
.service-card:hover::before {
    transform: scaleX(1);
}

/* Efeito de brilho nos botões CTA */
.cta-shine {
    position: relative;
    overflow: hidden;
}
.cta-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transform: skewX(-20deg);
    animation: shine 4s ease-in-out infinite;
}

@keyframes shine {
    0%, 100% { left: -60%; }
    50% { left: 120%; }
}

/* Focus styles para acessibilidade */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d8af64;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Backto top visível */
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Imagens com aspect ratio */
.aspect-portrait {
    aspect-ratio: 3/4;
}

/* WhatsApp float pulse */
@keyframes whatsappPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
#whatsappFloat {
    animation: whatsappPulse 2s infinite;
}
#whatsappFloat:hover {
    animation: none;
}

/* Preloader fade */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #013d3e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.preloader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(216, 175, 100, 0.2);
    border-top-color: #d8af64;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dots do testimonial */
.testimonial-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}
.testimonial-dot.active {
    background-color: #d8af64;
    width: 2rem;
}

/* Formulário loading */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}
.form-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsividade extra */
@media (max-width: 640px) {
    .hero-indicators {
        flex-wrap: wrap;
        gap: 1rem;
    }
    #hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* Utilitário: oculta scrollbar mas mantém scroll funcional */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Print styles */
@media print {
    header, footer, #whatsappFloat, #backToTop, #mobileMenu {
        display: none !important;
    }
    section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    body {
        font-size: 12pt;
        color: #000;
    }
}
