:root {
    --primary-color: #1a2b49;
    /* Navy Blue */
    --primary-dark: #0f1a2e;
    --secondary-color: #4a6741;
    --accent-color: #c5a47e;
    /* Gold/Beige */
    --text-color: #333333;
    --light-gray: #f9f9f9;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Styles --- */
.main-header {
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-header.scrolled {
    padding: 5px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.top-bar {
    background-color: var(--primary-dark);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: height 0.3s ease, opacity 0.3s ease;
}

.main-header.scrolled .top-bar {
    height: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

.top-bar .social-icons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.top-bar .social-icons a {
    color: var(--white);
    font-size: 14px;
}

.top-bar .social-icons a:hover {
    color: var(--accent-color);
}

.nav-bar {
    padding: 15px 0;
    transition: padding 0.3s ease;
}

.main-header.scrolled .nav-bar {
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 80px;
    transition: max-height 0.3s ease;
    filter: brightness(0) invert(1);
}

.main-header.scrolled .logo img {
    max-height: 60px;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 15px;
    color: var(--white);
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.main-nav .has-dropdown>a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-nav .has-dropdown i {
    font-size: 10px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    font-size: 24px;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 180px 0 80px;
    background: linear-gradient(135deg, #f4f6f8 0%, #e6e9ec 100%);
    min-height: 700px;
    display: flex;
    align-items: center;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 50%;
    padding-right: 50px;
    z-index: 2;
}

.hero-content h1 {
    font-family: var(--font-serif);
    font-size: 50px;
    /* Slight adjustment for longer title */
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
    line-height: 1.2;
}

.hero-content p {
    margin-bottom: 25px;
    font-size: 18px;
    color: #555;
    line-height: 1.7;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    font-family: var(--font-sans);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 700;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.hero-image-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

/* Slider Controls */
.slider-controls button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 24px;
    color: #ccc;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s;
}

.slider-controls button:hover {
    color: var(--primary-color);
}

.slider-controls .prev-slide {
    left: 40px;
}

.slider-controls .next-slide {
    right: 40px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
}

.slider-dots .dot.active {
    background-color: var(--primary-color);
    width: 10px;
}

/* --- Specialists Section --- */
.specialists-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 80px 0;
    overflow: hidden;
}

.specialists-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.specialists-content {
    flex: 1;
}

.section-title-wrapper {
    margin-bottom: 30px;
}

.section-subtitle {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 36px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 2px;
    background-color: var(--white);
}

.specialists-content p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.specialists-content ul {
    margin-bottom: 20px;
    margin-left: 20px;
    list-style: disc;
    opacity: 0.9;
}

.specialists-image {
    flex: 1;
    position: relative;
}

.specialists-image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* --- Practice Areas Section --- */
.practice-areas-section {
    padding: 100px 0;
    background-color: var(--white);
    text-align: center;
}

.practice-areas-header {
    margin-bottom: 60px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.practice-areas-header .section-title {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.practice-areas-header .section-title::after {
    display: none;
}

.view-all-btn {
    background-color: var(--primary-dark);
    color: #fff;
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.practice-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.practice-icon {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.practice-card h3 {
    font-family: var(--font-sans);
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

/* --- Structure Section --- */
.structure-section {
    padding: 100px 0;
    background: url('assets/brazil-map.png') no-repeat right center;
    background-size: contain;
    background-color: #f8f9fa;
}

.structure-content {
    max-width: 500px;
}

.structure-map-mobile {
    display: none;
}

.structure-stats {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 120px;
    text-align: left;
    /* Aligned left as per design request/context */
}

.stat-icon {
    font-size: 24px;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
}

.stat-value {
    display: block;
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

@media (max-width: 576px) {
    .structure-stats {
        flex-direction: column;
        gap: 30px;
    }
}

/* --- Footer Instagram --- */
.footer-instagram {
    padding: 50px 0;
    border-top: 1px solid #eee;
    background-color: #fff;
}

.footer-instagram .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-instagram h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    color: #555;
}

.footer-btn {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    font-size: 12px;
    border-radius: 4px;
}

.footer-btn:hover {
    background-color: var(--primary-dark);
}

/* --- Floating WhatsApp --- */
.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: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* --- Pre-Footer Contact --- */
.pre-footer {
    padding: 80px 0;
    background-color: #f4f6f8;
}

.pre-footer-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.pre-footer h2 {
    font-family: var(--font-serif);
    font-size: 36px;
    color: var(--primary-color);
    margin: 10px 0 20px;
}

.contact-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #555;
}

.contact-list li i {
    color: var(--accent-color);
}

/* --- NEW FOOTER STYLES --- */
.main-footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 70px 0 0;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    /* 4 Columns layout */
    gap: 40px;
    padding-bottom: 50px;
}

.footer-col h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--accent-color);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--white);
    opacity: 0.3;
}

.footer-intro p {
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-socials {
    display: flex;
    gap: 15px;
}

.footer-socials a {
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.footer-socials a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    opacity: 0.7;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-links a::before {
    content: '\f105';
    /* FontAwesome chevron right */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    opacity: 0.5;
}

/* Location styling in footer */
.footer-locations {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.location-item {
    display: flex;
    gap: 15px;
}

.location-icon {
    color: var(--accent-color);
    font-size: 16px;
    margin-top: 4px;
}

.location-details h4 {
    font-size: 15px;
    margin-bottom: 5px;
    color: #fff;
}

.location-details p {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 2px;
}

/* Copyright Bar */
.copyright-bar {
    background-color: var(--primary-dark);
    padding: 20px 0;
    margin-top: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.developer-credit {
    display: flex;
    align-items: center;
    gap: 5px;
}

.developer-credit i {
    color: var(--accent-color);
    font-size: 10px;
}

.developer-credit strong {
    color: var(--white);
    font-weight: 400;
}

/* --- Responsive Styles --- */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 42px;
    }

    .specialists-container {
        flex-direction: column;
    }

    .practice-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .structure-section {
        background-position: bottom center;
        background-size: 80%;
        padding-bottom: 300px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 cols on tablet */
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--primary-color);
        /* Changed to Navy Blue for visibility */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding: 80px 30px;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 20px;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 40px;
    }

    .hero-image-wrapper {
        justify-content: center;
    }

    .practice-grid {
        grid-template-columns: 1fr;
    }

    .contact-list {
        flex-direction: column;
        align-items: center;
    }

    .top-bar {
        display: none;
    }

    .structure-section {
        background-image: none;
        padding-bottom: 80px;
    }

    .structure-map-mobile {
        display: block;
        margin-top: 30px;
    }

    .structure-map-mobile img {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        /* 1 col on mobile */
        gap: 40px;
    }

    .copyright-container {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Estilos do Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    width: 100%;
    max-width: 600px;
    border-radius: 4px;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: var(--white);
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.modal-header {
    background-color: var(--primary-color);
    padding: 40px 30px;
    text-align: center;
    color: var(--white);
}

.modal-header i {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 15px;
    display: block;
}

.modal-header h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-body {
    padding: 40px 30px;
    text-align: center;
}

.modal-body p {
    font-size: 18px;
    color: #444;
    line-height: 1.6;
}

.modal-footer {
    padding: 0 30px 40px;
    text-align: center;
}