/* =========================================
   VARIÁVEIS GLOBAIS E PALETA EXATA
========================================= */
:root {
    --color-offwhite: #F3F4EE;
    --color-teal: #2A505B;
    --color-green-gray: #68837E;
    --color-navy: #072233;
    
    --font-heading: 'Quiche Sans', 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

/* =========================================
   IMPORTAÇÃO DA QUICHE SANS DO ZIP
========================================= */
@font-face {
    font-family: 'Quiche Sans';
    src: url('../assets/fonts/Fontspring-DEMO-quichesans-light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap; 
}

/* =========================================
   RESET E BASE
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; 
}

body {
    background-color: var(--color-offwhite);
    color: var(--color-navy);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3, .footer-logo, .brand {
    font-family: var(--font-heading);
    font-weight: 300; 
    text-transform: uppercase;
    color: var(--color-navy);
    letter-spacing: 1px;
}

/* =========================================
   ANIMAÇÕES DE ENTRADA E SCROLL
========================================= */
.page-enter {
    animation: pageFadeIn 0.8s ease-out forwards;
}

@keyframes pageFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.hidden-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hidden-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hidden-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hidden-down {
    opacity: 0;
    transform: translateY(-50px);
    transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.in-view {
    opacity: 1;
    transform: none; 
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
    .hidden-left, .hidden-right, .hidden-up, .hidden-down, .page-enter {
        opacity: 1;
        transform: translate(0);
        transition: none;
        animation: none;
    }
}

/* =========================================
   CABEÇALHO / NAVBAR
========================================= */
.site-header {
    background-color: var(--color-offwhite);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(7, 34, 51, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.8rem;
    color: var(--color-teal);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-navy);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-body);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-teal);
}

.btn-agendar-nav {
    background-color: var(--color-teal);
    color: var(--color-offwhite) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
}

/* =========================================
   BOTÕES GLOBAIS
========================================= */
.btn-primary, .btn-outline {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-teal);
    color: var(--color-offwhite);
}

.btn-primary:hover {
    background-color: var(--color-green-gray);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-teal);
    border: 2px solid var(--color-teal);
}

.btn-outline:hover {
    background-color: var(--color-teal);
    color: var(--color-offwhite);
}

/* =========================================
   HERO SECTION (TOPO)
========================================= */
.hero-section {
    position: relative;
    background-color: var(--color-navy);
    color: var(--color-offwhite);
    padding: 6rem 0;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(7, 34, 51, 0.8), rgba(7, 34, 51, 0.8)), url('../assets/Marca d_água-29.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-text {
    flex: 1.4; 
}

.hero-text h1 {
    font-size: 2.6rem; 
    color: var(--color-offwhite);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.hero-text .subtitle {
    font-size: 1.2rem;
    font-weight: 600; 
    font-family: var(--font-body);
    color: var(--color-offwhite);
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* =========================================
   COMPORTAMENTO DINÂMICO DOS BOTÕES DA HERO
========================================= */
.hero-actions {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: flex-start;
    gap: 1rem;
}

.btn-top {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    text-align: center;
}

/* Ambos Vazados no Desktop */
.btn-matersul, .btn-rededor {
    background-color: transparent;
    color: var(--color-offwhite);
    border: 2px solid var(--color-offwhite);
}

.btn-matersul:hover, .btn-rededor:hover {
    background-color: var(--color-offwhite);
    color: var(--color-navy);
}

.hero-image-box {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-img {
    max-width: 450px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 4px solid var(--color-teal);
}

/* =========================================
   SOBRE O DOUTOR
========================================= */
.about-section {
    padding: 6rem 2rem;
    text-align: center;
    max-width: 800px;
}

.about-section h2 {
    font-size: 2.5rem;
    color: var(--color-teal);
    margin-bottom: 0.5rem;
}

.crm {
    display: block;
    font-size: 0.9rem;
    color: var(--color-green-gray);
    font-weight: 600;
    font-family: var(--font-body);
    margin-bottom: 2rem;
}

.about-section p {
    font-size: 1.1rem;
    color: var(--color-navy);
    font-family: var(--font-body);
    margin-bottom: 1.5rem;
}

/* =========================================
   SERVIÇOS
========================================= */
.services-section {
    background-color: rgba(104, 131, 126, 0.1); 
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--color-navy);
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem; 
    width: 100%; 
}

.service-card {
    background: var(--color-offwhite);
    padding: 2rem 3rem; 
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(7, 34, 51, 0.05);
    border-top: 4px solid var(--color-teal);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(7, 34, 51, 0.1);
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--color-teal);
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 1rem;
    font-family: var(--font-body);
}

/* =========================================
   CTA FINAL E CARDS DE AGENDAMENTO
========================================= */
.cta-section {
    padding: 6rem 0;
    text-align: center;
    background-color: var(--color-offwhite);
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--color-green-gray);
    font-family: var(--font-body);
}

.agendamento-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.agendamento-card {
    background-color: #ffffff;
    border: 2px solid rgba(104, 131, 126, 0.2);
    border-radius: 15px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 320px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    box-shadow: 0 10px 25px rgba(7, 34, 51, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.agendamento-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-teal);
    box-shadow: 0 15px 35px rgba(7, 34, 51, 0.15);
}

.agendamento-logo {
    width: 90px;         
    height: 90px;        
    border-radius: 50%; 
    object-fit: cover;   
    border: 1px solid rgba(104, 131, 126, 0.15);
    box-shadow: 0 4px 15px rgba(7, 34, 51, 0.08); 
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.agendamento-card:hover .agendamento-logo {
    transform: scale(1.08);
}

.agendamento-card span {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-teal);
}

/* =========================================
   NOVA SEÇÃO: ONDE ATENDO (ESTILO CARTÃO)
========================================= */
.location-section {
    padding: 6rem 0;
    background-color: rgba(104, 131, 126, 0.1); 
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem; /* Espaçamento entre texto e mapa */
    background: var(--color-offwhite);
    border-radius: 15px;
    padding: 3.5rem; /* Recuo interno para não colar nas bordas */
    box-shadow: 0 10px 30px rgba(7, 34, 51, 0.05);
    border-top: 4px solid var(--color-teal);
    align-items: center; /* Centraliza verticalmente o mapa com as informações */
}

.location-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.location-info h3 {
font-family: var(--font-heading); 
    font-weight: 300; 
    text-transform: uppercase;
    font-size: 1.6rem; 
    color: var(--color-navy);
    margin-bottom: 1rem;
    letter-spacing: 1px;
    line-height: 1.4;
}

.location-desc {
 font-size: 1rem;
    color: var(--color-green-gray);
    font-family: var(--font-body);
    font-weight: 500;
    margin-bottom: 2.5rem !important;
}

.location-header {
    margin-bottom: 4rem;
}

.ohb-highlight {
    font-size: 2.2rem; 
    color: var(--color-teal); 
    display: block; 
    margin-bottom: -0.2rem;
}

/* Lista com Ícones (Morada, Horário, WhatsApp) */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
}

.info-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(42, 80, 91, 0.08); 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-teal);
}

.info-icon svg {
    width: 22px;
    height: 22px;
}

.info-text {
    display: flex;
    flex-direction: column;
}


.info-text strong {
    font-family: var(--font-body) !important; 
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-navy);
    margin-bottom: 0.2rem;
    letter-spacing: 0;
}

.info-text span {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-green-gray);
    line-height: 1.5;
}

/* Link WhatsApp Texto */
.wpp-link {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--color-teal);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.wpp-link:hover {
    color: var(--color-navy);
    text-decoration: underline;
}

/* Mapa do Google e Bordas Arredondadas */
.location-map {
    width: 100%;
    height: 100%;
    min-height: 380px;
    border-radius: 12px; /* Cantos arredondados no mapa */
    overflow: hidden; /* Garante que o iframe respeita as bordas */
    box-shadow: 0 4px 20px rgba(7, 34, 51, 0.08);
}

/* =========================================
   RODAPÉ (FOOTER)
========================================= */
.site-footer {
    background-color: var(--color-navy);
    color: var(--color-offwhite);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .footer-logo {
    color: var(--color-offwhite);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: rgba(243, 244, 238, 0.7);
    font-family: var(--font-body);
}

.footer-crm {
    font-weight: 600;
    margin-top: 1rem;
    color: var(--color-green-gray) !important;
}

.footer-links h4, .footer-contact h4 {
    color: var(--color-offwhite); 
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links a, .footer-contact a {
    display: block;
    color: rgba(243, 244, 238, 0.7);
    text-decoration: none;
    font-family: var(--font-body);
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-links a:hover, .footer-contact a:hover {
    color: var(--color-offwhite);
}

.footer-contact strong {
    color: var(--color-offwhite);
}

.footer-bottom {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(243, 244, 238, 0.1);
    font-size: 0.9rem;
    font-family: var(--font-body);
    color: rgba(243, 244, 238, 0.5);
}

.nextlayer-link {
    color: rgb(0, 102, 255);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nextlayer-link:hover {
    color: var(--color-offwhite);
}

/* =========================================
   RESPONSIVIDADE (MOBILE E TABLET)
========================================= */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center; 
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .location-grid {
        grid-template-columns: 1fr;
        padding: 2rem; /* Reduz espaçamento interno em ecrãs menores */
        gap: 2rem;
    }
    
    .location-map {
        min-height: 300px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; 
    }
    
    /* Redução do texto principal no Mobile e Aumento da Logo */
    .hero-text h1 {
        font-size: 1.85rem; 
    }
    
    .hero-symbol {
        height: 105px !important; 
        margin-bottom: 1.5rem;
    }

    .nav-logo {
        height: 85px !important; 
        margin: 0 auto; 
    }

    .hero-img {
        max-width: 100%;
    }
    
    .agendamento-cards {
        flex-direction: column;
        align-items: center;
    }
    
    .header-container {
        justify-content: center; 
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* --- ESTILOS MOBILE DOS BOTÕES DA HERO (Ambos Vazados) --- */
    .hero-actions {
        grid-template-columns: 1fr; 
        width: 100%;
    }
    
    .btn-top {
        width: 100%; 
    }

    /* Assegura que ambos fiquem vazados na versão mobile também */
    .btn-matersul, .btn-rededor {
        background-color: transparent !important;
        color: var(--color-offwhite) !important;
        border: 2px solid var(--color-offwhite) !important;
    }

    .btn-matersul:hover, .btn-rededor:hover {
        background-color: var(--color-offwhite) !important;
        color: var(--color-navy) !important;
    }
}

/* =========================================
   ESTILIZAÇÃO DAS LOGOS NAS SEÇÕES
========================================= */
.nav-logo {
    height: 75px; 
    width: auto;
    object-fit: contain;
    display: block;
}

.hero-symbol {
    height: 80px; 
    width: auto;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1); 
    opacity: 0.9;
}

.card-icon {
    height: 60px; 
    width: auto;
    display: block;
    margin: 0 auto 1rem auto; 
    object-fit: contain;
}

.footer-logo-img {
    max-width: 260px; 
    height: auto;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

/* =========================================
   BOTÕES FLUTUANTES (INSTAGRAM E E-MAIL)
========================================= */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
    animation: floatIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes floatIn {
    to { opacity: 1; transform: translateY(0); }
}

.float-btn {
    width: 55px;
    height: 55px;
    background-color: var(--color-teal); 
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-offwhite); 
    box-shadow: 0 4px 15px rgba(7, 34, 51, 0.2);
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.float-btn:hover {
    background-color: var(--color-navy); 
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(7, 34, 51, 0.3);
}

.float-icon {
    width: 26px;
    height: 26px;
}

@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    .float-btn {
        width: 50px;
        height: 50px;
    }
    .float-icon {
        width: 22px;
        height: 22px;
    }
}

/* =========================================
   MENU MOBILE INFERIOR FLUTUANTE (GAVETA)
========================================= */
.mobile-menu-trigger, .mobile-menu-overlay {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-trigger {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 20px; 
        width: 50px;
        height: 50px;
        background-color: var(--color-teal);
        border-radius: 50%;
        justify-content: center;
        align-items: center;
        color: var(--color-offwhite);
        box-shadow: 0 4px 15px rgba(7, 34, 51, 0.2);
        border: none;
        z-index: 998; 
        cursor: pointer;
        transition: transform 0.3s ease, background-color 0.3s ease;
    }

    .mobile-menu-trigger:active {
        transform: scale(0.9);
        background-color: var(--color-navy);
    }

    .mobile-menu-overlay {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: var(--color-offwhite);
        border-radius: 25px 25px 0 0;
        box-shadow: 0 -10px 40px rgba(7, 34, 51, 0.2);
        z-index: 9999; 
        padding: 2rem;
        transform: translateY(120%); 
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .mobile-menu-overlay.menu-open {
        transform: translateY(0);
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        border-bottom: 2px solid rgba(7, 34, 51, 0.05);
        padding-bottom: 1rem;
    }

    .mobile-menu-title {
        font-family: var(--font-heading);
        font-size: 1.5rem;
        color: var(--color-navy);
        letter-spacing: 1px;
    }

    .mobile-menu-close {
        background: none;
        border: none;
        color: var(--color-teal);
        width: 32px;
        height: 32px;
        cursor: pointer;
        padding: 0;
    }

    .mobile-menu-links {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
    }

    .mobile-menu-links .mobile-link {
        text-decoration: none;
        color: var(--color-navy);
        font-size: 1.2rem;
        font-weight: 500;
        font-family: var(--font-body);
        text-align: center;
        padding: 0.8rem;
        border-radius: 10px;
        transition: background-color 0.3s ease;
    }

    .mobile-menu-links .mobile-link:active {
        background-color: rgba(7, 34, 51, 0.05);
    }

    .mobile-menu-links .btn-primary {
        color: var(--color-offwhite);
        margin-top: 0.5rem;
    }
    
    .mobile-menu-links .btn-primary:active {
        background-color: var(--color-navy);
    }

    .location-header {
        margin-bottom: 4rem;
        text-align: center;
        width: 100%;
    }

.location-info h3,.location-desc {
        text-align: center;
    }
}