/* =========================================
   VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
    /* Colors - Custom Green/Navy Palette */
    --primary-color: #21673A; /* Strong Forest Green */
    --secondary-color: #251F47; /* Dark Navy/Purple */
    --accent-color: #7BB181; /* Soft Sage Green */
    --accent-hover: #5D9363; /* Slightly darker sage for hovers */
    --text-main: #251F47;
    --text-muted: #5e5a75;
    --bg-light: #f3f7f4; /* Very subtle light green/grey */
    --white: #ffffff;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    
    /* Effects - Soft UI */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 8px 20px rgba(33, 103, 58, 0.06);
    --shadow-md: 0 15px 40px rgba(33, 103, 58, 0.08);
    --shadow-lg: 0 25px 50px rgba(33, 103, 58, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
.section-subtitle {
    color: var(--accent-color);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    border-radius: 8px; /* Softer radius */
    cursor: pointer;
    text-align: center;
    border: none; /* No borders */
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: rgba(33, 103, 58, 0.1);
    color: var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background-color: rgba(33, 103, 58, 0.2);
    transform: translateY(-2px);
}

/* Specific Buttons */
.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.3);
    transform: translateY(-3px);
}

.btn-danger {
    background-color: #E63946;
    color: #fff;
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.2);
}

.btn-danger:hover {
    background-color: #D62828;
    box-shadow: 0 15px 30px rgba(230, 57, 70, 0.3);
    transform: translateY(-3px);
}

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

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    padding: 15px 0;
}

#main-header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px; /* Evita que o logo e o botão colem */
}

#nav-menu {
    flex-shrink: 0; /* Garante que a área do menu não seja esmagada pela logo */
    display: flex;
    align-items: center;
}

.logo-text a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--primary-color);
}

.logo-main {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 2px;
}

.logo-image-wrapper {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1; /* Permite que ele ocupe espaço mas encolha */
}

.logo-img {
    height: 90px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
}

#main-header.scrolled .logo-img {
    height: 70px;
}

.logo-leaf-img {
    height: 120px; /* Redimensiona a imagem para que a folha fique no tamanho ideal */
    max-width: none;
    mix-blend-mode: multiply; /* Remove o fundo branco */
    filter: contrast(1.1);
    margin-top: -15px; /* Ajuste fino vertical para centralizar a folha */
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-top: 0px;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--primary-color);
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background-color: var(--secondary-color);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    background-image: url('../assets/hero_bg.png?v=2');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(13, 27, 42, 0.9) 0%, rgba(13, 27, 42, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--white);
    max-width: 800px;
    padding-top: 80px;
}

.hero h1 {
    color: var(--white);
    font-size: 4rem;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--accent-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 600px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.about-image {
    position: relative;
}

.gradient-bg {
    height: 500px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    position: relative;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 8px 32px rgba(10, 54, 92, 0.2);
    padding: 25px;
    border-radius: 12px;
    color: var(--white);
}

.glass-card h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: none;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(33, 103, 58, 0.2), 0 0 0 2px var(--primary-color);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

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

/* =========================================
   HISTORY EXPANDABLE
   ========================================= */
.history-expandable {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s ease-in-out, opacity 0.8s ease-in-out;
    opacity: 0;
}

.history-expandable.expanded {
    max-height: 3000px; /* Um valor alto o suficiente para caber a timeline */
    opacity: 1;
}

/* =========================================
   TEAM CARDS
   ========================================= */
.team-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 20px;
}

.team-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    width: 320px;
    text-align: center;
    border: none;
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.team-photo-wrapper {
    width: 100%;
    height: 300px;
    background-color: var(--light-bg);
    overflow: hidden;
}

.team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.team-info {
    padding: 30px 20px;
}

.team-info h4 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-family: var(--font-heading);
}

.team-role {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.team-oab {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* =========================================
   TIMELINE SECTION
   ========================================= */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    opacity: 0.1; /* Apenas uma sombra/rastro da linha */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--accent-color);
    border: none;
    box-shadow: 0 0 15px rgba(123, 177, 129, 0.6);
    top: 30px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    position: relative;
    border-radius: 6px;
}

.timeline-date {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.timeline-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: left;
    border: none;
    transition: var(--transition);
}

.timeline-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.timeline-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.timeline-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.timeline-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

/* =========================================
   TESTIMONIALS SECTION
   ========================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-top: 3px solid var(--accent-color);
}

.stars {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.client-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* =========================================
   GALLERY SECTION
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.gallery-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.gallery-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

/* =========================================
   CONTACT SECTION
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-item .icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    background: var(--bg-light);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.contact-item h5 {
    font-family: var(--font-body);
    font-size: 1rem;
    margin-bottom: 5px;
}

.contact-item p {
    margin: 0;
    font-size: 0.95rem;
}

.glass-panel {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: var(--bg-light);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.03);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(123, 177, 129, 0.3), inset 0 2px 5px rgba(0,0,0,0.03);
}

/* =========================================
   MAP & CONTACT BANNER
   ========================================= */
.map-banner-split {
    display: flex;
    width: 100%;
    height: 400px;
    margin-top: 40px;
}

.map-side, .facade-side {
    flex: 1;
    height: 100%;
}

.facade-side {
    background-image: url('../assets/office_exterior_edited.png?v=2');
    background-size: cover;
    background-position: center;
}

/* =========================================
   FOOTER
   ========================================= */
.main-footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    text-align: center;
}

.footer-bottom {
    font-size: 0.9rem;
}

/* =========================================
   ANIMATIONS & EFFECTS
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

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

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

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

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .section-padding { padding: 60px 0; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-img { height: 300px; }

    /* Ativar menu mobile mais cedo para garantir visibilidade */
    .mobile-menu-btn { 
        display: flex !important; 
        flex-shrink: 0;
    }
    
    .logo-img { 
        height: auto; 
        max-height: 60px;
        max-width: 65vw; /* Garante que a logo não passe de 65% da tela */
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 30px 0;
        box-shadow: var(--shadow-md);
        transition: var(--transition);
    }
    
    .nav-links.active { left: 0; }
    .nav-links li { margin: 15px 0; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; }
}

/* =========================================
   WHATSAPP FLOATING BUTTON
   ========================================= */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
    
    /* Timeline Responsive (Vertical) */
    .timeline-container::after {
        left: 31px;
    }
    
    .contact-split {
        grid-template-columns: 1fr !important;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline-dot {
        left: 21px !important;
    }
    
    /* Map Split Responsive */
    .map-banner-split {
        flex-direction: column;
        height: 600px; /* 300px for each */
    }
}

/* =========================================
   BACK TO TOP
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background-color: var(--primary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 769px) {
    .back-to-top {
        display: none !important;
    }
}
