/* Estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8a5050; /* Escurecido para melhor contraste */
    --primary-light: #e09393; /* Escurecido para melhor contraste */
    --primary-dark: #5a3636; /* Mantido mas usado com cuidado */
    --secondary-color: #4a2c3d; /* Escurecido para melhor contraste */
    --text-dark: #333;
    --text-light: #595959; /* Escurecido para melhor contraste em fundos claros */
    --white: #ffffff;
    --bg-light: #f9f9f9;
    --bg-pink: #f9efef;
    --shadow: rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    
    /* Cores específicas para elementos com problemas de contraste */
    --btn-text: #ffffff; /* Garantir texto branco legível nos botões */
    --footer-text: rgba(255, 255, 255, 0.9); /* Aumentar opacidade do texto do footer */
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw; /* Prevent horizontal overflow */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

img.fade-in {
    opacity: 0;
    transition: opacity 0.3s;
}

img.fade-in.loaded {
    opacity: 1;
}

section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 38px;
    margin-bottom: 15px;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.btn-principal {
    background-color: var(--primary-color);
    color: var(--btn-text);
    padding: 14px 32px;
    border-radius: 50px;
    display: inline-block;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
    cursor: pointer;
}

.btn-principal:hover {
    background-color: transparent;
    color: var(--primary-dark); /* Mudado para cor mais escura */
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    padding: 15px 0;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    font-size: 28px;
    color: var(--secondary-color);
}

.logo span {
    color: var(--primary-dark); /* Mudado para cor mais escura */
    font-weight: 700; /* Tornando o texto mais grosso para melhor contraste */
}

nav ul {
    display: flex;
    align-items: center; /* Ensure vertical alignment of all nav items */
}

nav ul li {
    margin: 0 15px;
    display: flex; /* Ensure consistency in the display mode */
    align-items: center; /* Vertically center the content */
}

nav ul li a {
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    padding: 5px 0;
    position: relative;
    line-height: 1.5; /* Consistent line height for all navigation links */
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

.btn-contato {
    background-color: var(--primary-dark); /* Mudado para cor mais escura */
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600; /* Adicionado para melhorar legibilidade */
    white-space: nowrap; /* Prevent text wrapping */
    display: inline-flex; /* Changed to inline-flex for better alignment */
    align-items: center; /* Center text vertically */
    justify-content: center; /* Center text horizontally */
    line-height: normal; /* Reset line height to prevent inconsistencies */
    height: auto; /* Let height be determined by content and padding */
    position: relative; /* Ensure proper positioning */
    vertical-align: middle; /* Align with surrounding elements */
}

.btn-contato:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
}

.menu-mobile {
    display: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px; /* Espaçamento um pouco maior entre as bandeiras */
    margin-left: 15px; /* Espaço entre o logo e as bandeiras */
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Aumentado de 26px para 32px */
    height: 32px; /* Aumentado de 26px para 32px */
    opacity: 0.7;
    transition: var(--transition);
}

.lang-btn:hover, .lang-btn.active {
    opacity: 1;
    background-color: rgba(138, 80, 80, 0.1);
}

.lang-btn img {
    width: 24px; /* Aumentado de 18px para 24px */
    height: 24px; /* Aumentado de 18px para 24px */
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-btn.active {
    border: 2px solid var(--primary-color);
}

/* Adicionar espaço entre a bandeira de inglês e o menu hambúrguer */
.lang-btn[data-lang="en"] {
    margin-right: 10px; /* Espaço entre a bandeira EN e o menu hambúrguer */
}

/* Em telas menores, aumentar esse espaço para melhor separação */
@media (max-width: 576px) {
    .lang-btn[data-lang="en"] {
        margin-right: 15px; /* Espaço maior em telas muito pequenas */
    }
}

/* Media query for mobile language switcher */
@media (max-width: 768px) {
    .language-switcher {
        position: static; /* Removendo o posicionamento absoluto anterior */
        margin-left: 10px; /* Menor margem em telas pequenas */
        z-index: auto; 
    }
    
    /* Make flags smaller on mobile, but still proportionally larger than before */
    .lang-btn {
        width: 28px; /* Aumentado de 24px para 28px */
        height: 28px; /* Aumentado de 24px para 28px */
    }
    
    .lang-btn img {
        width: 20px; /* Aumentado de 16px para 20px */
        height: 20px; /* Aumentado de 16px para 20px */
    }
    
    /* Adjust logo size on mobile to prevent overlap */
    .logo h1 {
        font-size: 24px; /* Slightly smaller on mobile */
    }
}

/* Additional media query for extra small screens */
@media (max-width: 380px) {
    .language-switcher {
        margin-left: 5px; /* Ainda menor margem */
        gap: 4px; /* Reduzir espaçamento entre bandeiras */
    }
    
    .lang-btn {
        width: 24px; /* Aumentado de 20px para 24px */
        height: 24px; /* Aumentado de 20px para 24px */
        padding: 1px; /* Menos padding */
    }
    
    .lang-btn img {
        width: 18px; /* Aumentado de 14px para 18px */
        height: 18px; /* Aumentado de 14px para 18px */
    }
    
    /* Further reduce the logo size on very small screens */
    .logo h1 {
        font-size: 20px;
    }
    
    /* Adjust the menu-mobile position to prevent overlap */
    .menu-mobile {
        font-size: 22px;
    }
}

/* Hero Section */
.hero {
    padding-top: 180px;
    padding-bottom: 100px;
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background-color: var(--bg-pink);
    border-radius: 0 0 0 100px;
    z-index: 0;
    max-width: 100%;
}

.hero .container {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    padding-right: 50px;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: 20px 20px 60px var(--shadow);
    position: relative;
    z-index: 1;
    width: 50%;
    height: auto;
    aspect-ratio: 4/3; /* Maintain aspect ratio to prevent layout shift */
    object-fit: cover;
    object-position: center top; /* Show more of the top part of the image */
    will-change: transform;
    contain: paint;
    max-width: 100%;
}

/* Sobre Section */
.sobre {
    background-color: var(--white);
}

.sobre .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.sobre-image {
    flex: 1;
    position: relative;
}

.sobre-image img {
    border-radius: 20px;
    box-shadow: 0 20px 60px var(--shadow);
    max-width: 100%;
}

.sobre-content {
    flex: 1;
}

.sobre-content h2 {
    font-size: 38px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.sobre-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.sobre-content h3 {
    font-size: 28px;
    color: var(--primary-dark);
    margin-top: 20px;
    margin-bottom: 15px;
}

.sobre-content p {
    margin-bottom: 20px;
}

.sobre-content p.destaque {
    font-size: 18px;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 20px;
}

.about-text {
    margin-bottom: 25px;
}

.about-text p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.credentials-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.credentials-section {
    flex: 1;
    min-width: 250px;
}

.credentials-section h4 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 15px;
    color: var (--secondary-color);
    display: flex;
    align-items: center;
}

.credentials-section h4 i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 22px;
}

.credentials-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.credentials-section h3 i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 22px;
}

.credentials-list {
    list-style: none;
}

.credentials-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.credentials-list li i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 14px;
}

.about-cta {
    margin-top: 20px;
}

/* Serviços Section */
.servicos {
    background-color: var(--bg-pink);
}

.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
}

.servico-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow);
    transition: var(--transition);
    contain: content;
}

.servico-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 107, 152, 0.1);
}

.servico-card .icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.servico-card .icon i {
    color: var(--primary-color);
    font-size: 32px;
}

.servico-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.servico-card p {
    color: var(--text-light);
}

/* Depoimentos Section */
.depoimentos {
    background-color: var(--white);
    position: relative;
    padding: 100px 0;
}

.testimonial-slider-container {
    position: relative;
    max-width: 900px; /* Increased from 800px */
    margin: 0 auto;
    padding: 0 70px; /* Increased from 50px to give more room for arrows */
    min-height: 400px;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    height: 320px;
    margin: 0 auto;
}

.slider-arrow {
    position: absolute;
    top: calc(50% - 20px); /* Center vertically (height of button is 40px) */
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0.8;
}

.slider-arrow:hover {
    opacity: 1;
    background-color: var(--primary-dark);
}

.slider-arrow-left {
    left: 15px; /* Moved from 0 to 15px */
}

.slider-arrow-right {
    right: 15px; /* Moved from 0 to 15px */
}

.testimonial-card {
    background-color: var(--bg-light);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px var(--shadow);
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    top: 0;
    left: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden; /* Changed from auto to hidden to prevent scrollbar */
    box-sizing: border-box;
    contain: content;
    margin: 0 auto;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-card.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.testimonial-card .quote {
    color: var(--primary-light);
    font-size: 40px;
    margin-bottom: 20px;
}

/* Text will auto-scale based on content length */
.testimonial-card p {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto 20px;
    line-height: 1.5;
    /* Add class for different font sizes based on text length */
}

.testimonial-card p.long-text {
    font-size: 15px; /* Increased from 14px */
    line-height: 1.4;
}

.testimonial-card p.very-long-text {
    font-size: 14px; /* Increased from 12px */
    line-height: 1.3;
}

.testimonial-card .client-info {
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-card .client-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid var(--primary-light);
}

.testimonial-card .client-info h4 {
    font-size: 18px;
    color: var (--primary-dark);
}

.testimonial-card .client-info h3.client-name {
    font-size: 18px;
    color: var(--primary-dark);
}

.slider-controls {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background-color: var(--primary-light);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background-color: var(--primary-color);
}

/* Media queries to refine testimonial display on different screens */
@media (min-width: 992px) {
    .testimonial-slider-container {
        max-width: 900px;
        padding: 0 80px; /* Increased padding for arrows */
        min-height: 450px;
    }
    
    .testimonial-card {
        padding: 50px;
        max-height: 360px;
    }
    
    .testimonial-card p {
        font-size: 18px;
        margin-bottom: 30px;
    }
    
    .testimonial-card .client-info img {
        width: 70px;
        height: 70px;
    }
    
    .slider-arrow {
        width: 50px;
        height: 50px;
        top: calc(50% - 25px); /* Center based on 50px height */
    }

    .slider-arrow-left {
        left: 15px;
    }
    
    .slider-arrow-right {
        right: 15px;
    }

    .testimonial-slider {
        height: 360px;
    }
}

@media (max-width: 768px) {
    .testimonial-slider {
        min-height: 300px;
        height: auto !important; /* Force height auto to accommodate content */
    }
    
    .testimonial-card {
        padding: 30px 25px;
        max-height: none !important; /* Remove max-height constraint */
        height: auto !important; /* Allow height to adjust based on content */
        position: relative !important; /* Ensure proper positioning */
    }
    
    .testimonial-slider-container {
        min-height: 380px;
        height: auto !important; /* Allow container to expand with content */
    }
    
    /* Fix for slider arrows on mobile - ensure they're always visible */
    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
        top: 50% !important; /* Force center positioning */
        transform: translateY(-50%) !important;
        z-index: 20; /* Ensure arrows are above content */
    }
    
    .testimonial-slider {
        min-height: 300px;
        height: 300px;
    }
    
    .testimonial-card {
        padding: 30px 25px;
        max-height: none !important; /* Remove max-height constraint */
        height: auto !important; /* Allow height to adjust based on content */
        position: relative !important; /* Ensure proper positioning */
    }

    .testimonial-slider-container {
        min-height: 380px;
    }

    .slider-arrow {
        top: calc(50% - 18px); /* Center based on 36px height */
    }
}

@media (max-width: 576px) {
    .testimonial-slider {
        min-height: 350px; /* Increased min-height for smallest screens */
        height: auto !important; /* Force auto height for content */
    }
    
    .testimonial-card {
        padding: 25px 20px;
        max-height: none !important; /* Remove max height constraint */
    }
    
    .testimonial-slider-container {
        padding: 0 40px;
        min-height: 340px;
        height: auto !important; /* Allow container to expand */
    }
    
    /* Ensure arrows are properly positioned */
    .slider-arrow {
        top: 50% !important; /* Force center positioning */
        transform: translateY(-50%) !important;
    }
    
    .testimonial-slider {
        min-height: 350px; /* Increased min-height for smallest screens */
        height: 280px;
    }
    
    .testimonial-card {
        padding: 25px 20px;
        max-height: 280px;
    }

    .testimonial-slider-container {
        padding: 0 40px;
        min-height: 340px;
    }

    .slider-arrow {
        top: calc(50% - 16px); /* Center based on 32px height */
    }
}

/* Instagram Section */
.instagram {
    background-color: var(--bg-light);
}

.instagram-feed-container {
    margin: 0 auto;
    max-width: 800px;
    text-align: center;
}

.instagram-feed-wrapper {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow);
    display: flex;
    justify-content: center;
    max-width: 100%;
}

.instagram-feed-wrapper iframe {
    border: none;
    width: 100%;
    height: 500px;
    max-width: 100%;
}

/* Contato Section */
.contato {
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

.contato::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: var(--bg-pink);
    z-index: 0;
}

/* Contato Section - Ajustes para centralização */
.contact-wrapper {
    display: flex;
    position: relative;
    z-index: 1;
    gap: 60px;
    align-items: stretch;
    max-width: 100%;
    overflow-x: hidden;
}

.contact-info, .contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-form {
    background-color: var(--white);
    padding: 50px 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px var(--shadow);
    align-self: center;
    contain: content;
}

.contact-form form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.contact-info h2 {
    font-size: 38px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.contact-info h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 30px;
    color: var(--text-light);
}

.contact-methods {
    margin-bottom: 40px;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-method i {
    color: var(--primary-color);
    font-size: 24px;
    margin-right: 15px;
    margin-top: 5px;
}

.contact-method h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.contact-method a {
    color: var(--text-dark);
    transition: var(--transition);
}

.contact-method a:hover {
    color: var (--primary-color);
}

.social-media {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    /* Melhorar o foco para acessibilidade */
    position: relative;
}

.social-icon:focus {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.form-group input, 
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-group input:focus, 
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Mensagens de formulário */
.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-success {
    background-color: rgba(46, 213, 115, 0.1);
    color: #2ed573;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.form-error {
    background-color: rgba(255, 71, 87, 0.1);
    color: #ff4757;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.form-success i, .form-error i {
    font-size: 20px;
    margin-right: 10px;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--footer-text); /* Usando a nova variável de texto para footer */
    padding-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 30px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 100%;
    overflow-x: hidden;
    contain: content;
}

.footer-logo h2 {
    font-size: 30px;
    margin-bottom: 15px;
    color: var(--white);
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-logo p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 300px;
}

.footer-links h3, .footer-services h3, .footer-newsletter h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after, .footer-services h3::after, .footer-newsletter h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul, .footer-services ul {
    margin-top: 20px;
}

.footer-links li, .footer-services li {
    margin-bottom: 12px;
}

.footer-links a, .footer-services li {
    color: var(--footer-text); /* Aumentado o contraste */
    font-size: 15px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-newsletter p {
    color: var(--footer-text); /* Aumentado o contraste */
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    margin-bottom: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 8px 0 0 8px;
    font-family: 'Montserrat', sans-serif;
}

.newsletter-form button {
    background-color: var(--primary-dark); /* Escurecido para melhor contraste */
    color: var(--white);
    border: none;
    padding: 0 20px;
    border-radius: 0 8px 8px 0;
    font-weight: 700; /* Aumentado para melhor legibilidade */
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--primary-color); /* Ajustado para manter consistência */
}

.newsletter-message {
    font-size: 14px;
    margin-top: 10px;
    min-height: 20px;
    display: flex;
    align-items: center;
}

.newsletter-success {
    color: #2ed573;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.newsletter-error {
    color: #ff4757;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.newsletter-success i, .newsletter-error i {
    font-size: 16px;
    margin-right: 8px;
}

/* Footer bottom */
.footer-bottom {
    padding: 25px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    color: var(--footer-text); /* Aumentado o contraste */
    font-size: 14px;
}

.footer-policy {
    display: flex;
    align-items: center;
}

.footer-policy a {
    color: var(--footer-text); /* Aumentado o contraste */
    transition: var(--transition);
    font-weight: 500; /* Aumentado para melhor legibilidade */
}

.footer-policy a:hover {
    color: var(--primary-color);
}

.footer-policy span {
    margin: 0 10px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    box-shadow: 0 5px 15px rgba(216, 66, 117, 0.3);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* Cookie consent styles */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-content {
    max-width: 1200px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 20px;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 280px;
}

.cookie-content button {
    padding: 8px 20px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

#cookie-accept {
    background-color: var(--primary-color);
    color: var(--white);
}

#cookie-reject {
    background-color: transparent;
    border: 1px solid var(--white);
    color: var(--white);
}

.cookie-notice {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    margin-top: 15px;
    font-style: italic;
}

/* Responsividade */
@media (max-width: 1200px) {
    .servicos-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 992px) {
    section {
        padding: 80px 0;
    }
    
    .hero {
        padding-top: 150px;
    }
    
    .hero-content h1 {
        font-size: 36px;
    }
    
    /* Modificação do fundo do hero em telas menores */
    .hero::before {
        display: none; /* Remove o background rosa em dispositivos móveis */
    }
    
    .hero {
        background-color: var(--bg-light); /* Garante que o fundo seja claro e uniforme */
    }
    
    .sobre .container, 
    .hero .container, 
    .contact-wrapper {
        flex-direction: column;
    }
    
    .sobre-image, 
    .sobre-content,
    .hero-content, 
    .hero-image,
    .contact-info, 
    .contact-form {
        width: 100%;
    }
    
    .hero-content, 
    .sobre-image {
        margin-bottom: 50px;
    }
    
    .hero-content {
        padding-right: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .contact-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-info, 
    .contact-form {
        max-width: 600px;
        width: 100%;
    }
    
    .contact-form {
        margin-top: 40px;
    }

    /* Correção para o fundo da seção de contato em mobile */
    .contato {
        background-color: var(--bg-pink);
    }
    
    .contato::before {
        display: none; /* Remove o pseudo-elemento que divide o fundo */
    }
    
    .contact-form {
        width: 100%;
        max-width: 600px;
        margin: 0 auto; /* Centraliza o formulário */
    }
    
    /* Ajustando grid de serviços para 2 colunas */
    .servicos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .servico-card {
        padding: 30px 20px;
    }
    
    .servico-card .icon {
        width: 70px;
        height: 70px;
        margin: 0 auto 20px;
    }
    
    .servico-card h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .servico-card p {
        font-size: 14px;
    }
}

/* Fix for medium screens */
@media (max-width: 992px) and (min-width: 769px) {
    /* Target specifically the contact button at medium screens */
    .btn-contato {
        padding: 8px 15px; /* Slightly reduce padding */
        font-size: 15px; /* Slightly reduce font size */
    }
    
    /* Reduce margin between nav items to create more space */
    nav ul li {
        margin: 0 10px;
    }

    nav ul {
        gap: 10px; /* Use gap for more consistent spacing */
    }
    
    nav ul li {
        margin: 0 5px; /* Reduce margin for better fit */
    }
    
    .btn-contato {
        padding: 6px 15px; /* Slightly smaller padding */
        font-size: 15px; /* Slightly smaller font */
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
    
    .menu-mobile {
        display: block;
    }
    
    .section-header h2 {
        font-size: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo p {
        max-width: 100%;
    }
    
    .footer-links h3::after, 
    .footer-services h3::after, 
    .footer-newsletter h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .credentials-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .credentials-section {
        width: 100%;
    }
    
    /* Estilo para  menu mobile quando ativo */
    nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 20px;
        box-shadow: 0 10px 20px var(--shadow);
    }
    
    nav.active ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav.active ul li {
        margin: 10px 0;
    }
    
    /* Fix for horizontal scroll on mobile */
    html, body {
        overflow-x: hidden;
        position: relative;
        width: 100%;
    }
    
    /* Ensure all sections stay within the viewport width */
    section, .container, .hero-image, .sobre-image, .testimonial-slider, 
    .instagram-feed-wrapper, .contact-wrapper, .footer-content {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Fix potential image overflow */
    .hero-image img, .sobre-image img {
        max-width: 100%;
        width: auto;
    }
    
    /* Ensure iframe content doesn't cause overflow */
    .instagram-feed-wrapper iframe {
        max-width: 100%;
    }
    
    /* Manter 2 colunas para serviços mesmo em telas menores */
    .servicos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-content button {
        align-self: stretch;
    }

    /* Reduce or eliminate animations on mobile */
    [data-aos] {
        /* Disable AOS animations on mobile */
        transition-property: none !important;
        transform: none !important;
        animation: none !important;
        opacity: 1 !important;
    }
    
    /* Simplify hover effects on mobile */
    .servico-card:hover {
        transform: none; /* Remove transform on mobile */
        box-shadow: 0 10px 30px var(--shadow); /* Use standard shadow */
    }
    
    /* Disable transitions that cause performance issues */
    .social-icon:hover {
        transform: none;
    }
    
    /* Reduce layout shifts during scrolling */
    .hero-image, .sobre-image, .contact-form, .contact-info {
        contain: content;
    }
    
    /* Add hardware acceleration to smooth elements */
    .servico-card, .testimonial-card, .contact-form {
        transform: translateZ(0);
    }
    
    /* Optimize the typewriter effect for mobile */
    .hero-content h1 {
        min-height: auto !important; /* Override JS setting */
    }
    
    .testimonial-slider {
        height: auto; /* Allow height to adjust based on content */
        min-height: 400px; /* Minimum height but can grow */
    }
    
    .testimonial-card {
        position: relative; /* Change from absolute for better mobile layout */
        width: 100%;
        opacity: 0;
        visibility: hidden;
        display: none; /* Hide inactive cards completely */
        top: auto;
        left: auto;
    }
    
    .testimonial-card.active {
        opacity: 1;
        visibility: visible;
        display: block; /* Show only active card */
    }
    
    .testimonial-card p {
        max-width: 100%;
    }
    
    .slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 16px;
        top: calc(50% - 18px); /* Center based on 36px height */
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 28px;
    }
    
    .testimonial-card {
        padding: 25px 20px;
    }
    
    .testimonial-slider-container {
        padding: 0 40px;
    }
    
    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 14px;
        top: calc(50% - 16px); /* Center based on 32px height */
    }
    
    .testimonial-card .client-info {
        flex-direction: column;
        text-align: center;
    }
    
    .testimonial-card .client-info img {
        margin: 0 auto 10px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: 8px;
        padding: 12px;
    }
    
    /* Ajustes para telas muito pequenas, mantendo 2 colunas */
    .servico-card {
        padding: 20px 15px;
    }
    
    .servico-card .icon {
        width: 60px;
        height: 60px;
        margin: 0 auto 15px;
    }
    
    .servico-card .icon i {
        font-size: 24px;
    }
    
    .servico-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .servico-card p {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* Correção do Menu Mobile */
@media (max-width: 768px) {
    /* Garantir que o nav fique escondido por padrão */
    nav {
        display: none !important; /* Forçar ocultação independente de estilos inline */
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 20px;
        box-shadow: 0 10px 20px var(--shadow);
        z-index: 999;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }
    
    /* Apenas mostrar quando tiver a classe active */
    nav.active {
        display: block !important;
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    /* Reset quaisquer estilos inline que possam ter sido aplicados */
    nav[style] {
        display: none !important;
    }
    
    nav.active[style] {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* ...existing code for nav ul, nav ul li, etc... */
}

/* Correção do Menu Mobile */
.menu-mobile {
    display: block;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1010;
}

nav {
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 20px;
        box-shadow: 0 10px 20px var(--shadow);
        z-index: 999;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        display: block !important; /* Sempre presente no DOM, só oculto visualmente */
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }
    
    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    nav ul li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 10px 0;
        width: 100%;
        transition: background-color 0.2s ease;
    }
    
    /* Efeito visual ao clicar em links do menu */
    nav ul li a:active {
        background-color: var(--bg-pink);
    }
    
    /* Links com um indicador visual mais forte quando clicados */
    nav ul li a:focus {
        outline: none;
        background-color: var(--primary-light);
        color: var(--white);
    }
    
    .btn-contato {
        display: block;
        width: 200px;
        margin: 10px auto;
        text-align: center;
    }
    
    /* Menu toggle button states */
    .menu-mobile {
        display: block;
        font-size: 24px;
        color: var(--primary-color);
        cursor: pointer;
        z-index: 1010;
        transition: transform 0.3s ease;
    }
    
    .menu-mobile:active {
        transform: scale(0.95);
    }
}

/* Manter o menu normal para desktop */
@media (min-width: 769px) {
    nav {
        display: block !important;
        position: static;
        box-shadow: none;
        padding: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .menu-mobile {
        display: none;
    }
}

/* Classe para elementos visíveis apenas para leitores de tela */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Add font-display:swap to ensure text remains visible during webfont load */
@font-face {
    font-family: 'Montserrat';
    font-display: swap;
}

@font-face {
    font-family: 'Playfair Display';
    font-display: swap;
}

/* Language detection indicator */
.language-detection-indicator {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-detection-indicator.active {
    opacity: 1;
}

.language-detection-indicator .spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ajuste para posicionar o seletor de idioma ao lado do logo */
.logo {
    display: flex;
    align-items: center;
}

/* Language Switcher - nova posição */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 15px; /* Espaço entre o logo e as bandeiras */
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; /* Tamanho reduzido */
    height: 26px; /* Tamanho reduzido */
    opacity: 0.7;
    transition: var(--transition);
}

.lang-btn:hover, .lang-btn.active {
    opacity: 1;
    background-color: rgba(138, 80, 80, 0.1);
}

.lang-btn img {
    width: 18px; /* Tamanho reduzido */
    height: 18px; /* Tamanho reduzido */
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lang-btn.active {
    border: 1px solid var(--primary-color); /* Borda mais fina */
}

/* Header right - ajuste para remover margin-right do language-switcher */
.header-right {
    display: flex;
    align-items: center;
}

/* Media query atualizado para manter bandeiras ao lado do logo em telas menores */
@media (max-width: 768px) {
    .language-switcher {
        position: static; /* Removendo o posicionamento absoluto anterior */
        margin-left: 10px; /* Menor margem em telas pequenas */
        z-index: auto; 
    }
    
    /* Make flags even smaller on mobile */
    .lang-btn {
        width: 24px;
        height: 24px;
    }
    
    .lang-btn img {
        width: 20px;
        height: 20px;
    }
    
    /* Ajustar o tamanho do logo para manter tudo visível */
    .logo h1 {
        font-size: 22px; /* Ligeiramente menor */
    }
}

/* Ajuste para telas muito pequenas */
@media (max-width: 380px) {
    .language-switcher {
        margin-left: 5px; /* Ainda menor margem */
        gap: 4px; /* Reduzir espaçamento entre bandeiras */
    }
    
    .lang-btn {
        width: 20px; /* Ainda menor */
        height: 20px; /* Ainda menor */
        padding: 1px; /* Menos padding */
    }
    
    .lang-btn img {
        width: 14px; /* Ainda menor */
        height: 14px; /* Ainda menor */
    }
    
    /* Diminuir ainda mais o título em telas muito pequenas */
    .logo h1 {
        font-size: 18px;
    }
}

/* Estilos para a seção de locais de atendimento */
.attendance-locations {
    margin: 30px 0;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow);
}

.attendance-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-family: 'Playfair Display', serif;
}

.locations-logos {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.location-item {
    padding: 10px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 120px;
}

.location-item:hover {
    transform: translateY(-5px);
}

.location-item img {
    height: 80px;
    width: 100px;
}

@media (max-width: 576px) {
    .attendance-locations {
        padding: 15px;
    }
    
    .locations-logos {
        gap: 15px;
    }
    
    .location-item img {
        height: 60px;
    }
}

/* Estilos para a seção de locais de atendimento */
.locais-atendimento {
    background-color: var(--bg-light);
    padding: 80px 0;
}

.locais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.local-card {
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.local-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(138, 80, 80, 0.15);
}

.local-logo {
    margin-bottom: 20px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-logo {
    max-height: 100%;
    max-width: 80%;
    object-fit: contain;
}

.local-nome {
    color: var(--secondary-color);
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    position: relative;
}

.local-nome::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.local-info {
    margin-bottom: 25px;
    flex: 1;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    text-align: left;
}

.info-item i {
    color: var(--primary-color);
    font-size: 22px;
    margin-right: 15px;
    margin-top: 3px;
}

.info-item p {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 15px;
    flex: 1;
}

.info-item p strong {
    color: var(--secondary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.btn-agendar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 14px 25px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    gap: 8px;
    width: fit-content;
    margin: 0 auto;
}

.btn-agendar:hover {
    background-color: transparent;
    color: var(--primary-dark);
}

.btn-agendar i {
    font-size: 18px;
}

@media (max-width: 992px) {
    .locais-grid {
        grid-template-columns: 1fr;
        max-width: 650px;
        margin: 30px auto 0;
    }
}

@media (max-width: 576px) {
    .local-card {
        padding: 20px 15px;
    }
    
    .local-logo {
        height: 100px;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .info-item i {
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 24px;
    }
    
    .info-item p {
        text-align: center;
    }
}

/* Aumentando tamanho do logo AME */
.local-card:first-child .location-logo {
    width: 180px;
    height: auto;
    max-width: 100%;
}
