:root {
    --primary-color: #2DBFA3;
    --secondary-color: #0047A8;
    --light-gray: #f4f4f4;
    --dark-text: #333;
}

/* --- IMPORTANT: For Coolvetica to work, you need to place the font files (e.g., Coolvetica.woff2, Coolvetica.woff) in the 'assets/fonts/' directory. If not provided, a generic sans-serif will be used. --- */
@font-face {
    font-family: 'Coolvetica';
    src: url('../fonts/Coolvetica.woff2') format('woff2'),
         url('../fonts/Coolvetica.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-text); /* Ensure body text color is readable */
}

/* Apply Coolvetica to Titles */
h1, h2, h3, h4, h5, h6, .section-title, .navbar-brand, .card-title, #hero-carousel .carousel-caption h5, #cta-resultados h2 {
    font-family: 'Coolvetica', sans-serif;
}
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700; /* Bolder font-weight for brand */
    color: var(--secondary-color) !important;
}

.nav-link {
    font-family: 'Coolvetica', sans-serif;
    font-size: 1.1em; /* Slightly larger font size */
    font-weight: 700; /* Bolder font-weight */
    color: var(--secondary-color) !important;
    padding: 0.5rem 1rem !important; /* Increased horizontal padding */
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.btn-result {
    font-family: 'Coolvetica', sans-serif;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    font-weight: bold;
    animation: pulse 2s infinite; /* Apply pulse effect */
}

.btn-result:hover {
    background-color: #00337a;
    border-color: #00337a;
    color: #fff;
}

#hero-carousel .carousel-item {
    height: 85vh;
    background-size: cover;
    background-position: center;
}

#hero-carousel .carousel-item .container {
    height: 100%;
    display: flex;
    align-items: center;
}

#hero-carousel .carousel-caption {
    position: static;
    transform: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Align text items to start */
    text-align: left; /* Align text left */
    height: 100%; /* Make caption take full height of container */
    max-width: 40%;
}

#hero-carousel .carousel-caption h5 {
    font-size: clamp(2rem, 5vw, 4rem); /* Responsive font size */
    font-weight: 700; /* Bolder */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Stronger shadow */
    margin-bottom: 15px;
}

#hero-carousel .carousel-caption p {
    font-size: clamp(1rem, 2.5vw, 1.5rem); /* Responsive font size */
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.5;
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    #hero-carousel .carousel-item .container {
        justify-content: center;
    }
    #hero-carousel .carousel-caption {
        max-width: 90%;
        align-items: center; /* Center items for mobile */
        text-align: center;
    }
}

.section-title {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: none; /* Removed shadow */
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none; /* Ensure no underline */
}

#map {
    height: 400px;
    width: 100%;
}

footer {
    background-color: var(--secondary-color);
    color: white;
}

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

footer a:hover {
    color: white;
}

#cta-resultados {
    background: linear-gradient(to right, rgba(45, 191, 163, 0.8), rgba(0, 71, 168, 0.8)), url('../img/hero-2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 400px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
}

#cta-resultados h2, #cta-resultados p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#cta-resultados .btn {
    background-color: white;
    color: var(--secondary-color);
    border-color: white;
}

#cta-resultados .btn:hover {
    background-color: var(--light-gray);
    color: var(--secondary-color);
    border-color: var(--light-gray);
}

/* Rounded borders for all buttons */
.btn {
    border-radius: 0.5rem; /* Adjust as desired for more or less rounding */
}

/* Pulse effect for CTA button */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

#cta-resultados .btn {
    animation: pulse 2s infinite; /* Slow, infinite pulse */
}

/* Coleta Domiciliar Section Styles */
#coleta-domiciliar {
    background-color: var(--light-gray); /* Use a light background for this section */
}

#coleta-domiciliar .timeline-item {
    background-color: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#coleta-domiciliar .timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

#coleta-domiciliar .icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--secondary-color); /* Use secondary color for background */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto; /* Center the circle and add margin-bottom */
    color: white; /* Icon color */
}

#coleta-domiciliar .icon-circle i {
    font-size: 2.5em; /* Adjusted icon size to be smaller */
}

#coleta-domiciliar .timeline-item h5 {
    color: var(--secondary-color);
    margin-top: 15px;
    margin-bottom: 10px;
}

#coleta-domiciliar .timeline-item p {
    color: var(--dark-text);
}

/* Convênios Section Styles */
#convenios {
    background-color: #fff; /* White background for contrast */
}

#convenios .convenio-logo {
    max-height: 80px; /* Max height for logos */
    width: auto;
    opacity: 0.7; /* Subtle default opacity */
    transition: all 0.3s ease;
    filter: grayscale(100%); /* Grayscale effect */
    margin: 10px auto; /* Center logos and add some spacing */
    display: block; /* Ensure margin:auto works */
}

#convenios .convenio-logo:hover {
    opacity: 1;
    filter: grayscale(0%); /* Remove grayscale on hover */
    transform: scale(1.05);
}

/* Carousel controls for Convênios */
#convenios-carousel .carousel-control-prev,
#convenios-carousel .carousel-control-next {
    width: 6%; /* Make controls slightly wider */
    opacity: 0.8; /* Make controls slightly less transparent */
}

#convenios-carousel .carousel-control-prev-icon,
#convenios-carousel .carousel-control-next-icon {
    background-color: var(--secondary-color);
    border-radius: 50%;
    width: 45px; /* Increased size of the circle background */
    height: 45px; /* Increased size of the circle background */
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: 50%; /* Make the SVG icon smaller relative to the circle */
}

#convenios-carousel .carousel-inner {
    padding: 20px 7%; /* Increased horizontal padding to prevent overlap with arrows */
}

/* Styles for the new convenio-logo-wrapper */
.convenio-logo-wrapper {
    position: relative;
    width: 150px; /* Desired square size increased */
    height: 150px; /* Desired square size increased */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px; /* Rounded corners for the container */
    overflow: hidden; /* Ensures image stays within bounds */
    margin: 10px auto; /* Center wrapper and add spacing */
    background-color: #fff; /* White background for the logo itself */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Gradient Border Effect using pseudo-element */
.convenio-logo-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit; /* Inherit border-radius from parent */
    padding: 4px; /* Border thickness */
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color)); /* Gradient color */
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none; /* Allows clicks on the content below */
}

.convenio-logo-wrapper .convenio-logo {
    max-height: 130px; /* Max height for logos inside the wrapper - adjusted */
    max-width: 130px; /* Max width for logos inside the wrapper - adjusted */
    width: auto;
    height: auto;
    opacity: 0.7; /* Subtle default opacity */
    transition: all 0.3s ease;
    filter: grayscale(100%); /* Grayscale effect */
    display: block; /* Ensure margin:auto works within flex if needed */
}

.convenio-logo-wrapper:hover .convenio-logo {
    opacity: 1;
    filter: grayscale(0%); /* Remove grayscale on hover */
    transform: scale(1.05);
}

/* Adjust carousel-item to use flexbox for better centering of wrappers */
#convenios-carousel .carousel-item > .row {
    display: flex;
    align-items: center;
    justify-content: center;
}
