:root {
    --primary-color: #1e3563;
    --secondary-color: #8aa6c2;
    --accent-color: #4db8e0;
    --accent-hover: #3da6cd;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --white-color: #fff;
    --success-color: #25d366;

    /* 2025 Modern Effects */
    --shadow-sm: 0 2px 8px -2px rgba(30, 53, 99, 0.1);
    --shadow-md: 0 8px 24px -8px rgba(30, 53, 99, 0.15);
    --shadow-lg: 0 16px 48px -12px rgba(30, 53, 99, 0.2);
    --shadow-glow: 0 0 40px rgba(77, 184, 224, 0.3);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-hero: linear-gradient(135deg, rgba(30, 53, 99, 0.85) 0%, rgba(77, 184, 224, 0.7) 100%);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Height of sticky navbar */
}

body {
    font-family: 'Source Sans 3', 'Roboto', Arial, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

section {
    padding: 80px 0;
    position: relative;
}

#home {
    padding: 0 !important;
    margin: 0 !important;
}

#features {
    padding-top: 30px !important;
    /* Reduced from 80px/48px to minimize gap */
    padding-bottom: 80px;
}

section:nth-child(even) {
    background-color: var(--white-color);
}

section:nth-child(odd) {
    background-color: var(--light-color);
}

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

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

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

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

.text-accent-custom {
    color: var(--accent-color);
}

/* Accessibility - Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
.btn:focus {
    outline: 3px solid rgba(30, 53, 99, 0.5);
    outline-offset: 2px;
}

/* Custom Button Styles */
.btn-accent {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 184, 224, 0.3);
}

/* Header & Navigation */
.top-header {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 10px 0;
}

.top-header a {
    color: var(--white-color);
    text-decoration: none;
}

.top-header a:hover {
    text-decoration: underline;
}

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand img {
    max-height: 80px;
    transition: all 0.3s ease;
}

.navbar-brand img:hover {
    opacity: 0.8;
}

/* Ajuste para menu hamburger ficar à direita */
.navbar .container {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
}

@media (min-width: 992px) {
    .navbar .container {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }
}

.nav-link {
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.8rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background-color: var(--accent-color);
}

/* Login Button */
.login-button {
    background-color: var(--accent-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.login-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: var(--white-color);
}

/* Header Mobile Adjustment */
@media (max-width: 767px) {
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .navbar-brand img {
        max-height: 50px;
    }

    .login-button {
        padding: 5px 10px;
        font-size: 0.9rem;
    }
}

/* Login Modal */
.modal-content {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: none;
}

.modal-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    border-bottom: none;
    padding: 15px 20px;
}

.modal-title {
    font-weight: 600;
}

.modal-header .btn-close {
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    opacity: 1;
    margin-right: 0;
}

.modal-body {
    padding: 20px;
}

/* Carousel / Hero Modernization */
.carousel-item {
    height: 80vh;
    /* Taller hero */
    min-height: 500px;
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    animation: kenBurns 20s ease-out infinite alternate;
}

/* Gradient Overlay */
.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(30, 53, 99, 0.9) 0%, rgba(30, 53, 99, 0.4) 100%);
    z-index: 1;
}

.carousel-caption {
    background-color: transparent;
    /* Removed box background */
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Left align text */
    text-align: left;
    padding: 0 10%;
    /* Add horizontal padding */
    z-index: 2;
    /* Above overlay */
    max-width: 100%;
    margin: 0;
}

.carousel-caption h1,
.carousel-caption h2 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.carousel-caption p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
    max-width: 600px;
}

.carousel-caption .btn {
    animation: fadeInUp 1s ease-out 0.6s forwards;
    opacity: 0;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    /* Pill buttons */
}

/* Animations */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
    .carousel-item {
        height: 60vh;
        min-height: 400px;
    }

    .carousel-caption h1,
    .carousel-caption h2 {
        font-size: 2rem;
    }

    .carousel-caption p {
        font-size: 1.1rem;
    }
}

/* Features */
.feature-icon {
    background-color: var(--primary-color);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Service Cards */
.service-card {
    transition: all 0.4s var(--transition-bounce);
    height: 100%;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

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

.service-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}

.service-card:hover .card-img-top {
    transform: scale(1.1);
}

.service-card .card-body {
    position: relative;
    z-index: 1;
}

.service-card .card-body::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
    z-index: -1;
}

.service-card .icon-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 4rem;
    color: rgba(30, 53, 99, 0.1);
}

/* WhatsApp Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--success-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: none;
    font-size: 1.5rem;
}

.whatsapp-button:hover,
.whatsapp-button:focus {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
}

.whatsapp-tooltip {
    position: absolute;
    top: -40px;
    right: 0;
    background-color: white;
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.whatsapp-button:hover+.whatsapp-tooltip {
    opacity: 1;
    top: -50px;
}

/* About Section */
.about-section {
    background-color: var(--white-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.about-section .img-container {
    height: 100%;
    min-height: 300px;
    background-position: center;
    background-size: cover;
}

.about-content {
    padding: 30px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 90px;
    /* Adjusted to be above WhatsApp widget */
    right: 20px;
    background-color: var(--primary-color);
    color: var(--white-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: var(--secondary-color);
    color: var(--white-color);
}

/* Testimonials */
.testimonial-card {
    background-color: var(--white-color);
    border-radius: 10px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.testimonial-card::before {
    content: '\201C';
    font-size: 80px;
    position: absolute;
    top: -10px;
    left: 10px;
    color: rgba(30, 53, 99, 0.1);
    font-family: serif;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 50px 0 20px;
}

footer .footer-heading {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

footer .footer-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

footer .text-muted {
    color: #a1b9e5 !important;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    padding-left: 5px;
    text-decoration: underline !important;
}

/* Skip to main content - Accessibility */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}

/* Screen reader only */
.visually-hidden:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Responsive Adjustments */
/* Button Hover Fix */
.btn.bg-primary-custom:hover,
.btn.bg-primary-custom:focus {
    background-color: #152649 !important;
    /* Darker shade of primary */
    color: #ffffff !important;
    transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 53, 99, 0.2);
}

/* Feature Cards Redesign - 2025 Modern */
.feature-card {
    background: #fff;
    padding: 40px 24px;
    border-radius: 16px;
    transition: all 0.4s var(--transition-bounce);
    height: 100%;
    border: 1px solid rgba(30, 53, 99, 0.08);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s var(--transition-smooth);
}

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

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card .feature-icon {
    margin-bottom: 24px;
    color: var(--accent-color);
    transition: transform 0.3s var(--transition-bounce);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Trust Counters / Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d4a7c 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: rgba(77, 184, 224, 0.1);
    transform: rotate(15deg);
    pointer-events: none;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    display: inline-block;
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-left: 4px;
}

.stat-label {
    margin-top: 12px;
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 500;
}

/* LGPD Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    /* Hidden by default */
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    transition: bottom 0.5s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    gap: 20px;
}

.cookie-text {
    flex: 1;
    font-size: 0.9rem;
}

.cookie-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.3s;
}

.cookie-btn:hover {
    background-color: var(--accent-hover);
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .carousel-item {
        height: 300px;
    }

    .about-section .img-container {
        min-height: 200px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Contact Section */
.contact-form {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    background-color: var(--accent-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Map Container */
.map-container {
    height: 400px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Section Titles */
.section-title {
    position: relative;
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 2rem;
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}