/*
==================================
    Modern Style for Via Sinalização
    Inspired by Echofy Template
==================================
*/

/* --- Google Fonts --- */
/* Imported in HTML: Montserrat (400,500,700,900), Lato (400,700) */

/* --- CSS Variables --- */
:root {
    --primary-color: #399787; /* Main Green */
    --secondary-color: #F58634; /* Orange */
    --accent-color: #f9b949; /* Lighter Orange/Yellow for accents if needed */

    --text-dark: #212529; /* Dark text for light backgrounds */
    --text-light: #f8f9fa; /* Light text for dark backgrounds */
    --text-muted: #6c757d; /* Muted text */

    --bg-light: #ffffff;
    --bg-medium: #f4f7f6; /* Light gray for section backgrounds */
    --bg-dark: #1a2a2f; /* Dark background for footer or specific sections */

    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Lato', sans-serif;

    --container-width: 1200px;
    --header-height: 80px;
    --border-radius: 8px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.3s;
}

/* --- Base & Reset Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75em;
    color: var(--primary-color);
}

h1 { font-size: 3.2rem; font-weight: 900; }
h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5em;}
h3 { font-size: 1.6rem; font-weight: 700;}
h4 { font-size: 1.2rem; font-weight: 500;}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Utility Classes --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 120px 0;
}

.section-subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    margin-bottom: 15px;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    transition: all var(--transition-speed) ease;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--text-light);
    border-color: var(--secondary-color);
}

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

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

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

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent; /* Initial transparent background */
    box-shadow: none; /* No shadow initially */
    height: var(--header-height);
    transition: background-color var(--transition-speed) ease, height var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.site-header.scrolled {
    background-color: var(--primary-color); /* Green background on scroll */
    height: 70px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.logo img {
    max-height: 45px; /* Adjust as needed */
    transition: max-height var(--transition-speed) ease;
}

.site-header.scrolled .logo img {
    max-height: 40px;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 35px;
}

.main-nav a {
    color: var(--text-light); /* White text initially */
    font-weight: 700;
    font-family: var(--font-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 5px 0;
    position: relative;
}

.site-header.scrolled .main-nav a {
    color: var(--text-light); /* Ensure white text on green background */
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color); /* Orange accent for underline */
    transition: width var(--transition-speed) ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a.active,
.main-nav a:hover {
    color: var(--secondary-color); /* Orange on hover/active */
}

.site-header.scrolled .main-nav a.active,
.site-header.scrolled .main-nav a:hover {
    color: var(--secondary-color); /* Orange on hover/active when scrolled */
}

.header-cta {
    margin-left: 30px;
    padding: 10px 25px;
    font-size: 0.8rem;
    background-color: var(--secondary-color);
    color: var(--text-light);
    border-color: var(--secondary-color);
}

.header-cta:hover {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.site-header.scrolled .header-cta {
    /* Keep styles or adjust if needed when scrolled */
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light); /* White initially */
    font-size: 1.8rem;
    cursor: pointer;
}

.site-header.scrolled .mobile-menu-toggle {
    color: var(--text-light); /* White on green background */
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    min-height: 100vh; /* Ensure section takes full height if slider is absolute */
}

.hero-slider {
    position: relative; /* Container for absolute slides */
    width: 100%;
    height: 100vh;
}

.hero-slider .hero-slide {
    min-height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center center;
    padding-top: var(--header-height);
    position: absolute; /* Make slides stack on top of each other */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Hidden by default */
    transition: opacity 1s ease-in-out; /* Fade transition */
    z-index: 0; /* Base z-index */
}

.hero-slider .hero-slide.active-slide {
    opacity: 1; /* Show active slide */
    z-index: 1; /* Bring active slide to front */
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(10, 20, 25, 0.6); /* Dark overlay */
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.hero-slide h1 {
    font-size: 3.8rem;
    color: var(--text-light);
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-slide p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

/* Slick slider styles for hero (if used) - basic setup */
/* Add slick.css or customize here */
.slick-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex !important; /* Override slick */
}
.slick-dots li {
    margin: 0 5px;
}
.slick-dots li button {
    font-size: 0;
    line-height: 0;
    display: block;
    width: 12px;
    height: 12px;
    padding: 0;
    cursor: pointer;
    border: 2px solid var(--text-light);
    border-radius: 50%;
    background: transparent;
    outline: none;
    transition: background-color var(--transition-speed) ease;
}
.slick-dots li.slick-active button {
    background-color: var(--text-light);
}

.hero-shape {
    position: absolute;
    z-index: 0;
    opacity: 0.1;
}
.hero-shape-1 { /* Example shape */
    width: 200px; height: 200px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    bottom: -50px; left: -50px;
    animation: pulseShape 5s infinite alternate;
}
.hero-shape-2 { /* Example shape */
    width: 150px; height: 150px;
    border: 5px solid var(--primary-color);
    top: 100px; right: -30px;
    animation: rotateShape 10s infinite linear;
}

@keyframes pulseShape {
    from { transform: scale(0.8); opacity: 0.05; }
    to { transform: scale(1.2); opacity: 0.15; }
}
@keyframes rotateShape {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- About Section --- */
.about-section {
    background-color: var(--bg-light);
    padding: var(--section-padding);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    margin-bottom: 20px;
}

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

.about-text strong {
    color: var(--primary-color);
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.about-image img {
    border-radius: var(--border-radius);
}

.about-image-shape {
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: var(--primary-color);
    opacity: 0.7;
    bottom: -30px;
    right: -30px;
    border-radius: 20px 0 20px 0;
    z-index: -1;
    transform: rotate(45deg);
}

/* --- Services Section --- */
.services-section {
    background-color: var(--bg-medium);
    padding: var(--section-padding);
}

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

.service-card {
    background-color: var(--bg-light);
    padding: 40px 30px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    display: inline-block;
    line-height: 1;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

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

/* --- Portfolio Section --- */
.portfolio-section {
    padding: var(--section-padding);
    background-color: var(--bg-light);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    display: block; /* For <a> tag */
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}

.portfolio-item img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(57, 151, 135, 0.8); /* Primary color overlay */
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
    text-align: center;
    padding: 20px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h5 {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

/* GLightbox styles (basic, if used) */
/* Add glightbox.min.css or customize */

/* --- Counters Section --- */
.counters-section {
    padding: 80px 0;
    background-color: var(--primary-color); /* Green background */
    color: var(--text-light);
    position: relative;
}

.counters-section::before { /* Optional decorative overlay */
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* background-image: url('../img/shapes/overlay-pattern.png'); */
    opacity: 0.05;
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.counter-item i {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.counter-item h3.counter-number {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 5px;
    color: var(--text-light);
}

.counter-item p {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* --- Location Section --- */
.location-section {
    padding: var(--section-padding) 0 0 0; /* No bottom padding, map is full width */
    background-color: var(--bg-light);
}

.location-section .section-header {
    padding: 0 15px; /* Add padding for header if map is full width */
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: none;
    display: block;
}

.address-info {
    background-color: var(--bg-medium);
    text-align: center;
    padding: 30px 15px;
}

.address-info p {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 500;
}

.address-info p i {
    color: var(--secondary-color);
    margin-right: 10px;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--text-muted);
    padding: 80px 0 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 60px;
}

.footer-logo {
    max-height: 50px;
    margin-bottom: 20px;
}

.footer-about p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.site-footer h4 {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.site-footer h4::after { /* Underline effect */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-contact ul li,
.footer-links ul li {
    margin-bottom: 12px;
}

.footer-contact ul li a,
.footer-links ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color var(--transition-speed) ease, padding-left var(--transition-speed) ease;
}

.footer-contact ul li a:hover,
.footer-links ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact ul li i {
    margin-right: 10px;
    color: var(--secondary-color);
    width: 20px; /* Align icons */
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: var(--text-light);
    margin-right: 10px;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: var(--secondary-color);
    font-weight: 500;
}

.footer-bottom a:hover {
    color: var(--text-light);
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--secondary-color);
    color: var(--text-light);
    text-align: center;
    line-height: 45px;
    font-size: 1.2rem;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease, transform var(--transition-speed) ease;
    z-index: 999;
}

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

.back-to-top:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-5px);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    :root { --header-height: 70px; }
    h1 { font-size: 2.8rem; }
    .hero-slide h1 { font-size: 3rem; }
    .hero-slide p { font-size: 1.1rem; }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%; /* Below header */
        left: 0;
        width: 100%;
        background-color: var(--bg-light);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 10px 0;
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
    }
    .main-nav li {
        margin: 0;
        text-align: center;
    }
    .main-nav a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid var(--bg-medium);
    }
    .main-nav li:last-child a {
        border-bottom: none;
    }
    .main-nav a::after { display: none; }
    .mobile-menu-toggle {
        display: block;
    }
    .header-cta { display: none; } /* Hide CTA button on mobile nav */

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-image {
        margin-top: 30px;
        max-width: 400px; /* Control image size */
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .section-padding { padding: 80px 0; }
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
    .hero-slide h1 { font-size: 2.5rem; }

    .services-grid,
    .portfolio-grid,
    .counters-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .footer-content {
        grid-template-columns: 1fr; /* Stack footer columns */
        text-align: center;
    }
    .site-footer h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-contact ul,
    .footer-links ul {
        padding-left: 0;
    }
}

@media (max-width: 576px) {
    :root { --header-height: 60px; }
    .logo img { max-height: 35px; }
    .site-header.scrolled .logo img { max-height: 30px; }

    h1 { font-size: 2rem; }
    .hero-slide h1 { font-size: 2.2rem; }
    .hero-slide p { font-size: 1rem; }
    .btn { padding: 12px 25px; font-size: 0.8rem; }

    .portfolio-item img {
        height: 200px;
    }
    .counter-item h3.counter-number { font-size: 2.5rem; }
    .counter-item p { font-size: 0.9rem; }
}

/* AOS Overrides / Customizations if needed */
[data-aos] {
    /* Default AOS styles can be customized here if needed */
}

