/* ==========================================================================
   CSS VARIABLES - Design System & Paleta de Cores
   ========================================================================== */
:root {
    /* Paleta de Cores Oficial Afonso de André */
    --bg-dark: #0F2C3A;           /* Azul Marinho (Fundo principal) */
    --bg-darker: #1F4E5F;         /* Azul Petróleo (Fundo secundário/seções) */
    --bg-card: #396B78;           /* Azul Acinzentado (Cards e boxes) */
    --accent-gold: #D4AF37;       /* Dourado Médio (Destaques e botões) */
    --accent-gold-hover: #F2D18A; /* Dourado Claro (Hover e realces) */
    --accent-dark: #B08A2E;       /* Dourado Escuro */
    
    /* Textos */
    --text-main: #F5F6F7;         /* Cinza Claríssimo (Texto principal) */
    --text-muted: #8FB7C0;        /* Azul Claro (Texto secundário) */
    --text-white: #ffffff;
    
    /* Tipografia */
    --font-heading: 'Playfair Display', serif; /* Fonte serifada para títulos (autoridade) */
    --font-body: 'Inter', sans-serif;          /* Fonte sans para leitura (modernidade) */
    
    /* Layout */
    --container-width: 1500px;    /* Layout Widescreen */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   RESET & BASICS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #0A1E27 0%, #0F2C3A 100%);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-white);
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--accent-gold);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-gold-hover);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.bg-darker { background: linear-gradient(135deg, #13394b 0%, #1F4E5F 100%); }
.bg-accent-dark { background-color: var(--accent-dark); }
.bg-light { 
    background-color: #E5E7EB; /* Cinza claríssimo */
    color: var(--bg-dark); 
}
.bg-light h1, .bg-light h2, .bg-light h3, .bg-light h4, .bg-light h5, .bg-light h6 {
    color: var(--bg-dark);
}
.bg-light p, .bg-light .contact-info, .bg-light .contact-info li, .bg-light .contact-info a {
    color: #4B5563; /* Texto escuro médio para manter contraste */
}
.bg-light .contact-info i {
    color: var(--accent-dark); /* Ícones dourado escuro para contraste */
}
.bg-light .lead {
    color: var(--accent-dark);
}

/* ==========================================================================
   TYPOGRAPHY & UTILS
   ========================================================================== */
.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--accent-gold);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary, .btn-secondary, .btn-outline, .btn-nav {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--bg-darker);
}

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
    color: var(--bg-darker);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

.btn-outline:hover {
    background-color: var(--accent-gold);
    color: var(--bg-darker);
    transform: translateY(-2px);
}

.btn-nav {
    background-color: var(--accent-gold);
    color: var(--bg-darker);
    padding: 8px 20px;
    text-shadow: none !important;
}

.btn-nav:hover {
    color: var(--bg-darker);
    background-color: var(--accent-gold-hover);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(15, 44, 58, 0); /* Transparent initial */
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
    padding: 20px 0;
}

#main-header.scrolled {
    background-color: rgba(15, 44, 58, 0.8); /* Azul Marinho transparent on scroll */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Fix for Logo 300x99 constraint */
.logo-wrapper {
    display: block;
    width: 200px; /* Mobile first width */
    height: 66px; /* Mobile first height */
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .logo-wrapper {
        width: 300px;
        height: 99px;
    }
}

#main-header.scrolled .logo-wrapper {
    width: 180px;
    height: 59px;
}

@media (min-width: 768px) {
    #main-header.scrolled .logo-wrapper {
        width: 240px;
        height: 79px;
    }
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.desktop-nav {
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(15, 44, 58, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease, padding 0.4s ease, visibility 0.4s;
}

.desktop-nav.active {
    max-height: 500px;
    padding: 1.5rem 0;
    opacity: 1;
    visibility: visible;
}

.desktop-nav ul {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    align-items: center;
    gap: 1.5rem;
}

.desktop-nav a {
    color: var(--text-white);
    font-weight: 500;
    font-size: 1.1rem; /* Larger for mobile tap */
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); /* Sombreamento suave para contraste */
}

.desktop-nav a:not(.btn-nav):hover {
    color: var(--accent-gold);
}

.mobile-menu-btn {
    display: block; /* Visible on mobile */
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: block;
        position: static;
        width: auto;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
        max-height: none;
        opacity: 1;
        visibility: visible;
        overflow: visible;
    }
    
    .desktop-nav ul {
        flex-direction: row;
        gap: 2rem;
    }
    
    .desktop-nav a {
        font-size: 0.95rem;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    height: auto;
    min-height: 100vh; /* Espaço suficiente no mobile */
    padding-top: 120px; /* Compensa o header fixo */
    padding-bottom: 60px;
    display: flex;
    align-items: center; /* Centraliza o conteúdo se sobrar espaço */
    background-image: url('imagens/escritorio-advocacia-empresarial-sao-paulo-fundo.png'); /* Widescreen Premium Background */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

@media (min-width: 768px) {
    .hero {
        height: 85vh;
        min-height: 550px;
        padding-top: 80px;
        padding-bottom: 0;
    }
}

.hero-home {
    min-height: 100vh;
}

@media (min-width: 768px) {
    .hero-home {
        height: 68vh; /* 20% less padding/height as requested for home */
        min-height: 450px;
    }
}

.hero-internal {
    min-height: 60vh;
    padding-top: 120px;
    padding-bottom: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 44, 58, 0.95) 0%, rgba(15, 44, 58, 0.75) 50%, rgba(15, 44, 58, 0.4) 100%);
    z-index: 1;
}

.hero-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.90) 0%, rgba(0, 0, 0, 0.65) 50%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 40px; /* Reduced from 80px */
}

.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: rgba(197, 160, 89, 0.1);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 2.2rem; /* Mobile first font size */
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (min-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 2.5rem;
    max-width: 1200px;
}

.hero-actions {
    display: flex;
    flex-direction: column; /* Mobile first stack */
    gap: 1rem;
}

@media (min-width: 768px) {
    .hero-actions {
        flex-direction: row;
    }
}

/* ==========================================================================
   SECTIONS & GRIDS
   ========================================================================== */
.section {
    padding: 60px 0; /* Mobile first padding */
}

@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }
}

.split-layout {
    display: flex;
    flex-direction: column; /* Mobile first stacked */
    align-items: center;
    gap: 3rem;
}

@media (min-width: 992px) {
    .split-layout {
        flex-direction: row;
        gap: 4rem;
    }
}

.split-content, .split-image, .split-form {
    flex: 1;
    width: 100%;
}

.split-form {
    order: -1;
}

@media (min-width: 992px) {
    .split-form {
        order: 0;
    }
}

.image-placeholder {
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--accent-gold);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.grid-cards {
    display: grid;
    /* Grid passa a aceitar até 4 colunas dependendo do tamanho definido no HTML inline ou aqui */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: rgba(57, 107, 120, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(197, 160, 89, 0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.service-box {
    padding: 2rem;
    background: rgba(31, 78, 95, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    border-left: 3px solid transparent;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-box:hover {
    background: rgba(57, 107, 120, 0.5);
    border-left-color: var(--accent-gold);
}

.service-box h3 {
    font-size: 1.2rem;
}

.service-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

.service-link {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   FORMS & CONTACT
   ========================================================================== */
.contact-info {
    font-size: 1.1rem;
}

.contact-info li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-info i {
    color: var(--accent-gold);
    width: 20px;
}

.lead-form {
    background: rgba(15, 44, 58, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 2rem; /* Mobile first padding */
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border-top: 4px solid var(--accent-gold);
    border-left: 1px solid rgba(197, 160, 89, 0.2);
    border-right: 1px solid rgba(197, 160, 89, 0.2);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    color: var(--text-white);
}

@media (min-width: 768px) {
    .lead-form {
        padding: 3rem;
    }
}

.lead-form h3 {
    margin-bottom: 2rem;
    color: var(--text-white);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: var(--text-white);
    font-family: var(--font-body);
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.2);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: #0b1f28; /* Mais escuro que o Azul Marinho */
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first */
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 2fr;
        gap: 3rem;
    }
}

.logo-img-footer {
    width: 200px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-contact-brief p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-contact-brief i {
    color: var(--accent-gold);
    margin-right: 8px;
    width: 15px;
    text-align: center;
}

.footer-links h3 {
    color: var(--text-white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-gold);
}

.footer-links ul {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first */
    gap: 1rem;
}

@media (min-width: 576px) {
    .footer-links ul {
        grid-template-columns: 1fr 1fr;
    }
}

.footer-links li a {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.footer-links li a i {
    font-size: 0.7rem;
    margin-right: 8px;
    color: var(--accent-gold);
    transition: var(--transition);
}

.footer-links li a:hover {
    color: var(--accent-gold-hover);
    transform: translateX(5px);
}

.footer-links li a:hover i {
    color: var(--accent-gold-hover);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   EXTRA BLOCKS (FAQ, STATS, MAP)
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 500;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(57, 107, 120, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    border-left: 4px solid var(--accent-gold);
    transition: var(--transition);
}

.faq-item:hover {
    transform: translateX(10px);
    border-left-color: var(--accent-gold-hover);
}

.faq-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--accent-gold);
}

.map-container {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   WHATSAPP FLOATING BUTTON
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #20b858;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal.right {
    transform: translateX(30px);
}

.reveal.right.active {
    transform: translateX(0);
}

.animate-up {
    animation: fadeInUp 1s cubic-bezier(0.5, 0, 0, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.delay-1 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; transition-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
