:root {
    --spanish-red: #c62828;
    --gold-yellow: #ffc107;
    --white: #ffffff;
    --olive-green: #81c784; /* As requested, a lighter olive */
    --dark-olive-green: #556B2F; /* For contrast if needed */
    --cta-blue: #00204A; /* Dark blue for CTA */
    --text-dark: #333333;
    --text-light: #f8f9fa;
    --background-light: #f8f9fa;
    --font-family: 'Montserrat', sans-serif;
    --header-height: 160px; /* Increased header height for larger logo */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
    scroll-padding-top: var(--header-height); /* Adjust for fixed header */
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
#header {
    background-color: var(--white);
    padding: 0.5rem 0; /* Add some vertical padding within the header */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: var(--header-height); /* Uses the increased --header-height */
}

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

#logo {
    height: 140px; /* Increased logo height */
    width: auto;
}

#header nav ul {
    list-style: none;
    display: flex;
}

#header nav ul li {
    margin-left: 1.5rem; /* Increased spacing */
}

#header nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

#header nav ul li a:hover,
#header nav ul li a.active {
    color: var(--spanish-red);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--spanish-red);
    color: var(--white);
    border: 2px solid var(--spanish-red);
}

.btn-primary:hover {
    background-color: #a92222; /* Darker red */
    border-color: #a92222;
    transform: translateY(-2px);
}

.header-cta {
    margin-left: 1.5rem;
}


/* Hero Section */
.hero {
    background: url('hero-background.png') no-repeat center center/cover;
    min-height: 500px; /* Minimum height for smaller viewports */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: var(--header-height); /* Offset for fixed header */
    /* Adjust height calculation if necessary, or set a specific height like 600px / 700px */
    height: calc(100vh - var(--header-height)); 
    /* If 100vh - header-height is too small on some screens with large header, consider fixed min-height or static height */
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    padding: 2rem;
    border-radius: 8px;
    max-width: 700px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.btn-hero {
    font-size: 1.1rem;
    padding: 0.8rem 2rem;
}


/* Content Sections */
.content-section {
    padding: 4rem 0;
    text-align: center;
}

.content-section h2 {
    font-size: 2.2rem;
    color: var(--spanish-red);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--gold-yellow);
    margin: 0.5rem auto 0;
}

.content-section p {
    font-size: 1.1rem;
    color: var(--text-dark);
    max-width: 800px;
    margin: 0 auto 1.5rem auto; /* Center paragraph text */
}

#quem-somos {
    background-color: var(--background-light);
}

/* Services Section */
#servicos {
    background-color: var(--white);
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
    text-align: left;
}

.service-item {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--spanish-red);
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

.service-item h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}
.service-item p {
    font-size: 0.95rem;
    color: #555;
    text-align: center;
    margin-bottom: 0;
}


/* CTA Section */
.cta-section {
    background-color: var(--cta-blue);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--white); /* Override default section h2 color */
}
.cta-section h2::after {
    background-color: var(--gold-yellow); /* Yellow line under white text */
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    background-color: var(--gold-yellow);
    color: var(--text-dark);
    font-size: 1.1rem;
    padding: 0.8rem 2.5rem;
    border: 2px solid var(--gold-yellow);
}

.btn-cta:hover {
    background-color: #e6ac00; /* Darker yellow */
    border-color: #e6ac00;
    color: var(--text-dark);
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: var(--text-light);
    text-align: center;
    padding: 2.5rem 0;
}

.social-icons {
    margin-bottom: 1rem;
}

.social-icons a {
    color: var(--white);
    font-size: 1.8rem;
    margin: 0 0.75rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--gold-yellow);
    transform: scale(1.1);
}

footer p {
    font-size: 0.9rem;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1.1rem;
    }
    .content-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px; /* Slightly smaller base font for small devices */
        scroll-padding-top: 0; /* Reset as header is not fixed */
    }

    #header .container {
        flex-direction: column;
        height: auto;
        padding-bottom: 0.5rem;
    }
    #header {
        height: auto; /* Adjust header height for wrapped content */
        position: relative; /* Change to relative */
        padding: 0.5rem 0; /* Ensure some padding exists */
    }

    .hero {
        padding-top: 0; /* Reset as header is not fixed */
        height: auto;
        min-height: 400px;
        padding: 3rem 1rem;
    }

    #header nav {
        margin-top: 0.5rem;
        width: 100%;
    }
    #header nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    #header nav ul li {
        margin: 0.5rem 0;
    }
    .header-cta {
        margin-top: 1rem;
        display: block; /* Make it full width potentially */
        width: auto;
        margin-left: 0;
    }

    .services-grid {
        grid-template-columns: 1fr; /* Stack services on smaller screens */
    }
    .service-item {
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }

    .content-section {
        padding: 3rem 0;
    }
    .content-section h2 {
        font-size: 1.8rem;
    }
    .content-section p {
        font-size: 1rem;
    }
    .cta-section h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .btn {
        padding: 0.6rem 1.2rem;
    }
    .btn-hero, .btn-cta {
        font-size: 1rem;
    }
    #logo {
        height: 110px; /* Adjusted logo height for mobile, slightly larger than before */
    }
}