:root {
    --gold: #60252B;
    --gold-light: #a5404a;
    --gold-dark: #291013;
    --black: #0A0A0A;
    --white: #FFFFFF;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-800: #1F1F1F;
    --green: #25D366;
    --dark-green: #10572a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden; /* Trava o vazamento horizontal no elemento raiz */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--black);
    overflow-x: hidden; /* Trava o vazamento horizontal no corpo */
    width: 100%; /* Garante que o body não passe de 100% da tela */
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 4px;
}

/* Gold Gradient Text */
.text-gold-gradient {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Green Button */
.btn-green {
    background: linear-gradient(135deg, var(--green) 0%, var(--green) 100%);
    color: var(--white);
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    min-height: 48px;
}

.btn-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 96, 37, 0.3);
    background: var(--dark-green);
    border-color: var(--green);
    color: var(--white);
}

/* Gold Button */
.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--white);
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    min-height: 48px;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(96, 37, 43, 0.3);
    background: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

.btn-outline {
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
    min-height: 48px;
    font-size: 0.95rem;
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
}

/* Navigation */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    padding: 8px 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-200) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="none" stroke="%2360252B" stroke-width="0.5" opacity="0.1" x="0" y="0" width="100" height="100"/></svg>');
    background-size: 50px 50px;
    opacity: 0.3;
}

.hero-pattern {
    position: absolute;
    right: -10%;
    top: -10%;
    width: 600px;
    height: 600px;
    border: 1px solid rgba(96, 37, 43, 0.2);
    border-radius: 50%;
    animation: rotate 30s linear infinite;
}

.hero-pattern-2 {
    position: absolute;
    right: -5%;
    top: -5%;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(96, 37, 43, 0.15);
    border-radius: 50%;
    animation: rotate 25s linear infinite reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Cards */
.card-law {
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card-law::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card-law:hover::before {
    transform: scaleX(1);
}

.card-law:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--gold);
}

.card-law-featured {
    background: linear-gradient(135deg, #ffffff 0%, #faf7f7 100%);
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 60px 50px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.card-law-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    transform: scaleX(1);
    z-index: 1;
}

.card-law-featured::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(96, 37, 43, 0.03) 0%, transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.card-law-featured:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(96, 37, 43, 0.15);
}

.card-content {
    position: relative;
    z-index: 5;
}

.card-law-featured .icon-gold-featured {
    color: var(--gold);
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.icon-gold {
    color: var(--gold);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Section Divider */
.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    margin: 20px auto;
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

/* Testimonial */
.testimonial-card {
    background: var(--gray-100);
    padding: 40px;
    border-radius: 8px;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    font-family: 'Playfair Display', serif;
    font-size: 80px;
    color: var(--gold);
    opacity: 0.3;
    position: absolute;
    top: 20px;
    left: 30px;
    line-height: 1;
}

/* Form Styling */
.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: var(--white);
    font-size: 16px; /* Evita auto-zoom em celulares iOS */
}

.form-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(96, 37, 43, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-800);
}

/* Card Saúde */
.card-saude {
    background-color: #3D1F1F;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.card-saude:hover {
    transform: scale(1.05);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.6);
}

.btn-saiba-mais {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 0.25rem;
    text-decoration: none;
    transition: border-color 0.3s ease;
}

.group:hover .btn-saiba-mais {
    border-color: rgba(255, 255, 255, 0.9);
}

/* Footer */
footer {
    background: var(--black);
    color: var(--white);
}

.footer-link {
    color: var(--gray-200);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--gold);
}

.social-icon {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
    transform: translateY(-3px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    padding: 100px 40px;
}

.mobile-menu.active {
    display: block;
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--gold);
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge */
.badge-specialty {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 5;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 32px;
    margin-top: 48px;
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.7);
    line-height: 1.4;
}

/* ==================== MEDIA QUERIES - OTIMIZADAS PARA MOBILE ==================== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .hero-pattern, .hero-pattern-2 {
        width: 400px;
        height: 400px;
    }
    
    .card-law-featured {
        padding: 40px 30px;
    }
    
    .card-law-featured h3 {
        font-size: 2rem;
    }
    
    .stats-grid {
        gap: 24px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* Mobile (até 767px) - RESPONSIVIDADE MELHORADA */
@media (max-width: 767px) {
    /* Hero ajustado mas mantendo estrutura */
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-pattern, .hero-pattern-2 {
        display: none;
    }
    
    /* Texto do hero mantido elegante */
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    /* ESTATÍSTICAS - NOVA ESTRUTURA PARA CELULARES */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px 16px; /* Mais espaço entre as linhas */
        border-top: 1px solid rgba(255,255,255,0.2);
        padding-top: 24px;
        margin-top: 32px;
        text-align: center;
    }
    
    .stat-item {
        text-align: center; /* Centralizado no mobile para melhorar leitura */
    }

    /* O 3º item de estatísticas ocupa 2 colunas para não ficar exprimido */
    .stat-item:last-child {
        grid-column: span 2;
    }
    
    .stat-number {
        font-size: 1.75rem;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 0.75rem;
        color: rgba(255,255,255,0.7);
    }
    
    /* IMAGEM DA ADVOGADA - MOSTRA EM MOBILE */
    .hero .hidden.md\:block {
        display: block !important;
    }
    
    .hero img {
        height: 400px;
        width: 100%;
        object-fit: cover;
        border-radius: 16px;
    }
    
    /* Floating card ajustado */
    .hero .absolute.-bottom-6 {
        bottom: -15px;
        left: -10px;
        padding: 12px 16px;
    }
    
    /* Botões em coluna no mobile */
    .hero .flex.flex-col.sm\:flex-row {
        flex-direction: column;
    }
    
    .btn-gold, .btn-outline {
        width: 100%;
        justify-content: center;
    }
    
    /* VISIBILIDADE DO BOTÃO "SAIBA MAIS" NO CELULAR (SEM HOVER) */
    .btn-saiba-mais {
        border-color: rgba(255, 255, 255, 0.8);
    }

    /* Seções com padding reduzido mas mantendo proporção */
    section {
        padding: 60px 0 !important;
    }
    
    h2 {
        font-size: 1.875rem !important;
    }
    
    /* Cards de áreas em 1 coluna no mobile */
    #areas .grid {
        grid-template-columns: 1fr;
    }
    
    /* Depoimentos em 1 coluna */
    .testimonial-card {
        padding: 30px 25px;
    }
    
    /* Footer em coluna */
    footer .grid.md\:grid-cols-4 {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
    
    footer .flex {
        justify-content: center;
    }
    
    /* WhatsApp menor no mobile */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}

/* Mobile pequeno (até 375px) */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.75rem !important;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .hero img {
        height: 350px;
    }
}

/* Landscape mobile - esconde imagem para não ocupar muito espaço */
@media (max-height: 500px) and (orientation: landscape) {
    .hero .hidden.md\:block {
        display: none !important;
    }
}

/* Touch devices - remove hover effects */
@media (hover: none) {
    .card-law:hover,
    .card-saude:hover,
    .card-law-featured:hover {
        transform: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}