/* --- Reset e Comportamento de Rolagem --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

:root {
    --primary-color: #001f3f;   
    --background-color: #f8f9fa; 
    --text-color: #333;          
    --btn-color: #25D366;       
    --white: #ffffff;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

/* --- Cabeçalho --- */
.header {
    background-color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 999;
    transition: padding 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    transition: width 0.4s ease, height 0.4s ease; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 0.8rem; 
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    padding: 0.4rem 0.6rem; 
    border-radius: 8px; 
    transition: all 0.3s ease;
}

.nav a:hover {
    color: var(--primary-color);
    background-color: #f8f9fa; 
    box-shadow: 0 4px 10px rgba(0, 31, 63, 0.12); 
}

.header.scrolled {
    /* Padding e altura removidos daqui para garantir estabilidade absoluta */
    background-color: rgba(255, 255, 255, 0.95); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    backdrop-filter: blur(5px); 
}

/* --- Hero Section (Início Animado) --- */
.hero-section {
    background: linear-gradient(-45deg, var(--primary-color), #003366, #00152b, #004080);
    background-size: 400% 400%;
    animation: gradientHero 12s ease infinite;
    color: var(--white);
    text-align: center;
    padding: 5rem 0; /* Espaço reduzido e otimizado */
    position: relative;
}

/* Keyframe: Instrui o navegador a mover as cores do fundo */
@keyframes gradientHero {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-section h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3); /* Dá destaque ao texto contra a animação */
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn-cta {
    display: inline-block;
    background-color: var(--btn-color);
    color: var(--white);
    padding: 1.2rem 2.5rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 30px;
    transition: background 0.3s, transform 0.2s;
}

.btn-cta:hover {
    background-color: #1ebe57;
    transform: translateY(-2px);
}

/* --- Produtos --- */
.produtos-section {
    padding: 3rem 0;
    text-align: center;
    background-color: var(--white);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--white); /* Trocado para branco para fundir perfeitamente com as fotos */
    padding: 0;
    border-radius: 8px;
    border: 1px solid #eaeaea; 
    transition: box-shadow 0.3s, border-color 0.3s;
    overflow: hidden;
    display: flex; /* Transforma o card em uma coluna flexível */
    flex-direction: column;
    height: 100%; /* Força todos os quadros a terem a mesma altura na linha */
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: var(--primary-color);
}

.card-img-container {
    width: 100%;
    height: 260px; /* Altura imponente para a foto de capa */
    overflow: hidden;
    border-radius: 8px 8px 0 0; /* Arredonda apenas os cantos de cima para fundir com a borda do cartão */
    background-color: var(--white);
}

.card-img-container img {
    width: 100%;
    height: 100%;
    padding: 0; /* 🎯 MÁGICA 1: Remove o respiro para a foto grudar nas bordas do quadro */
    object-fit: cover; /* 🎯 MÁGICA 2: Preenche 100% do espaço, eliminando o fundo branco solto */
    object-position: center 15%; /* 🎯 MÁGICA 3: Foca a exibição na parte superior-central da foto, protegendo os rostos de cortes */
    display: block;
}

.card h3, .card p {
    padding: 0 2rem;
}

.card h3 {
    margin-top: 1.5rem;
    font-size: 1.3rem; 
    color: var(--primary-color);
    margin-bottom: 1rem;
    white-space: nowrap; 
    overflow: visible;   
    display: block;
    text-align: center;
}

.card p {
    margin-bottom: 2rem;
    flex-grow: 1; /* 🎯 A MÁGICA 2: Preenche o espaço flexível e alinha a base de todos os quadros */
}

/* --- Sobre --- */
.sobre-section {
    padding: 3rem 0;
    background-color: var(--white);
}

.sobre-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.sobre-texto {
    flex: 1;
}

.sobre-texto p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.sobre-imagem {
    flex: 1;
}

.sobre-imagem img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* --- Seção Marcas --- */
.marcas-section {
    padding: 3rem 0;
    background-color: var(--background-color);
    text-align: center;
}

.marcas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.marca-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    width: 150px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.marca-item:hover {
    transform: translateY(-5px);
}

.marca-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%); /* Deixa as logos cinzas para um visual mais premium */
    transition: filter 0.3s;
}

.marca-item:hover img {
    filter: grayscale(0%); /* Volta a cor original ao passar o mouse */
}

/* --- Visagismo --- */
.visagismo-section {
    padding: 3rem 0;
    background-color: var(--background-color);
    text-align: center;
}

.visagismo-botoes {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-rosto {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Efeito ao passar o mouse ou quando o botão estiver selecionado */
.btn-rosto:hover, .btn-rosto.ativo {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(0, 31, 63, 0.2);
}

.resultado-box {
    margin-top: 3rem;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: 8px;
    border-left: 5px solid var(--btn-color); /* Destaque verde da sua paleta */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: left;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 0.5s ease-out; /* Animação suave extra */
}

.resultado-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* Keyframe para a caixa de resultado pular suavemente na tela */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Depoimentos --- */
.depoimentos-section {
    padding: 3rem 0;
    background-color: var(--white);
    overflow: hidden; 
    text-align: center;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.badge-google {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.badge-reclame {
    background-color: #e5f6e5;
    color: #1f7d22;
    border: 1px solid #bceabf;
}

.depoimentos-wrapper {
    width: 100%;
    margin-top: 3rem;
    overflow: hidden; 
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.depoimentos-slider {
    display: flex;
    gap: 2rem;
    animation: scrollDepoimentos 30s linear infinite; 
    width: calc(300px * 10); 
}

.depoimentos-slider:hover {
    animation-play-state: paused;
}

.depoimento-card {
    background-color: var(--background-color);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    text-align: left;
    flex: 0 0 300px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.stars {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.depoimento-card p {
    font-style: italic;
    color: #555;
    margin-bottom: 1.5rem;
}

.depoimento-card h4 {
    color: var(--primary-color);
    font-size: 1rem;
}

@keyframes scrollDepoimentos {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-300px * 3 - 6rem)); } 
}

/* --- Localização --- */
.localizacao-section {
    padding: 3rem 0;
    background-color: var(--white);
    text-align: center;
}

.loja-info {
    display: flex;
    align-items: center; 
    gap: 3rem;
    margin-top: 3rem;
    text-align: left;
    width: 100%;
}

.dados-loja {
    flex: 1; 
    background-color: var(--background-color);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}

.dados-loja h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.dados-loja p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.btn-outline {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s;
    text-align: center;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.mapa-container {
    flex: 1.8; 
    height: 380px; 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mapa-container iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
    pointer-events: auto; /* Trava de segurança para touch no celular */
}

/* --- Contato --- */
.contato-section {
    padding: 3rem 0;
    background-color: var(--background-color);
    text-align: center;
}

.subtitle {
    margin-bottom: 2rem;
}

.formulario {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.btn-submit {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: #003366;
}

/* --- Rodapé Minimalista Premium (Layout Horizontal) --- */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2.5rem 0 1.5rem 0; /* Altura reduzida para um visual mais enxuto */
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Parte Superior: Marca (Esquerda) e Redes (Direita) */
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* MÁGICA: Nivela perfeitamente o topo dos dois lados */
    width: 100%;
}

.footer-brand-signature {
    text-align: left; /* Desfaz o alinhamento centralizado */
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
    color: var(--white);
}

.slogan-destaque {
    font-size: 0.95rem;
    font-style: italic;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Redes Sociais e Label */
.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    gap: 0.6rem; /* Espaço exato para os ícones ficarem na direção do slogan */
}

.social-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--white); /* Mesma cor exata do "Óticas Gama99" */
    font-weight: 700; /* Mesmo peso em negrito para não destoar */
    margin: 0;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

/* O resto do .social-icons a, a:hover, etc, continua exatamente igual... */

.social-icons a {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icons a:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Linha Divisória Fininha */
.footer-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Parte Inferior: Textos Legais */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-copyright p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    margin: 0;
}

.footer-pride p {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* O BR Discreto e Elegante */
.br-discreto {
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.6; /* Deixa quase transparente */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borda muito suave */
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    letter-spacing: 1px;
}

/* --- FAQ Flutuante --- */
.faq-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 2px solid var(--primary-color);
    transition: transform 0.3s, background-color 0.3s, color 0.3s, opacity 0.5s ease;
}

.faq-float:hover {
    transform: scale(1.05); 
    background-color: var(--white); 
    color: var(--primary-color); 
    box-shadow: none; 
}

.faq-icon {
    width: 30px !important; 
    height: 30px !important; 
    fill: currentColor;
    display: block;
}

.faq-box {
    position: fixed;
    bottom: 100px; 
    right: 30px;
    width: 350px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1001; 
    display: none; 
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eaeaea;
}

.faq-box.active {
    display: flex; 
}

.faq-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-header h3 {
    font-size: 1.1rem;
}

.faq-header button {
    background: transparent;
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.faq-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.faq-body details {
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.8rem;
}

.faq-body details:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-body summary {
    font-weight: 700;
    cursor: pointer;
    color: var(--primary-color);
    outline: none;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.faq-body p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* =======================================================
   COMPORTAMENTO DESKTOP (PC) - TRAVA DE SEGURANÇA
   ======================================================= */
#btn-menu {
    display: none; /* MÁGICA: Oculta o hambúrguer em telas grandes */
    font-size: 2rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* =======================================================
   COMPORTAMENTO MOBILE (Celulares e Tablets)
   ======================================================= */
@media (max-width: 768px) {
    
    /* 1. Cabeçalho e Menu Hambúrguer */
    .header .container {
        flex-wrap: nowrap !important; 
        position: relative; /* Âncora para o menu descer corretamente */
    }

    #btn-menu {
        display: block; /* Revela o hambúrguer APENAS no celular */
        margin-left: auto; /* Empurra o botão para a extrema direita */
        padding: 0.5rem; 
    }

    .nav ul {
        display: none; /* Recolhe os botões normais no celular */
        flex-direction: column;
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 0; 
        z-index: 999;
    }

    .nav ul.ativo {
        display: flex; /* O JS ativa isso para o menu descer */
    }

    .nav ul li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0; 
    }

    .nav ul li:last-child {
        border-bottom: none;
    }

    .nav ul li a {
        display: block;
        padding: 1.2rem; 
        text-align: center;
        font-size: 1.1rem;
    }

    /* 2. Redução de Gargalos Visuais (Espaçamentos e Leitura) */
    .hero-section {
        padding: 4rem 0; 
    }
    
    .hero-section h2 { 
        font-size: 2.2rem; 
    }

    .sobre-texto p {
        text-align: left; /* Melhora a leitura no mobile */
    }

    .sobre-content, .loja-info {
        flex-direction: column;
        gap: 2rem;
    }
    
    .mapa-container, .dados-loja {
        width: 100%;
    }
    
    /* 3. Correção do Rodapé (Alinhamento Centralizado Perfeito) */
    .footer-top, .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-brand-signature {
        text-align: center;
    }

    .footer-social {
        align-items: center;
    }

    /* 4. Ajuste de Proporção do Botão FAQ */
    .faq-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .faq-icon {
        width: 25px !important; 
        height: 25px !important; 
    }

    .faq-box {
        width: 90%;
        right: 5%;
        bottom: 80px; 
    }
}

/* Classes de Animação Modulares */
.oculto {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}
.mostrar {
    opacity: 1;
    transform: translateY(0);
}