/* ======================= Estilos Gerais e Variáveis ======================= */
:root {
    /* Paleta de Cores - Tema Cardiologia */
    --color-primary: #A62C2B; /* Vermelho Vinho (Destaque) */
    --color-bg-light: #F9F2F2; /* Vermelho Rosado (Fundo Seção) */
    --color-bg-secondary: #F5E8E8; /* Vermelho Claro (Secundário) */
    --color-text: #4A4A4A; /* Cinza Escuro (Texto) */
    --color-white: #FFFFFF;
    --color-black: #000000;

    /* Tipografia */
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Lato', sans-serif;

    /* Outros */
    --header-height: 70px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-secondary);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.section {
    padding: 80px 0;
    overflow: hidden;
}

.section:nth-child(even) {
    background-image: linear-gradient(to top, var(--color-bg-light) 0%, #FEFBFB 100%);
}

/* Adiciona padding ao topo das páginas para não cortar o conteúdo abaixo do header fixo */
.page-section {
    padding-top: calc(var(--header-height) + 60px);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    filter: brightness(1.2);
}

ul {
    list-style: none;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.title-xl {
    font-family: var(--font-primary);
    font-size: 2.8rem;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.title-lg {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.title-md {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.15rem;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: bold;
    font-family: var(--font-primary);
    text-transform: uppercase;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
}

.btn-primary {
    background-image: linear-gradient(45deg, #8f2423 0%, #A62C2B 50%, #c0392b 100%);
    background-size: 200% auto;
    color: var(--color-white);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(166, 44, 43, 0.4);
    color: var(--color-white);
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--color-white);
    font-size: 1.1rem;
}

.btn-whatsapp i {
    margin-right: 10px;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    color: var(--color-white);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.centered-cta {
    text-align: center;
    margin-top: 50px;
}

/* ======================= Header e Navegação ======================= */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

#header.scrolled {
    box-shadow: 0 2px 20px rgba(74, 74, 74, 0.08);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 50px;
}

#menu {
    display: flex;
    gap: 20px;
}

.nav-link {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-text);
    padding: 10px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-image: linear-gradient(to right, #A62C2B, #c0392b);
    transition: width 0.4s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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


#btn-mobile {
    display: none;
}

/* ======================= Seção Hero ======================= */
#inicio {
    padding-top: var(--header-height);
    background-color: #FEFBFB;
    background-image: radial-gradient(ellipse 70% 90% at 10% 10%, var(--color-bg-secondary) 0%, rgba(254, 251, 251, 0) 70%);
}

.hero-container {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--header-height));
    gap: 30px;
}

.hero-text {
    flex: 1 1 55%;
    padding-right: 30px;
}

.hero-image {
    flex: 1 1 45%;
    position: relative;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(25% 0%, 90% 0, 100% 10%, 100% 90%, 90% 100%, 25% 100%, 2.5% 55%, 2.5% 45%);
}

/* ======================= Seção Especialidades/Cards ======================= */
.cards-container {
    display: grid;
    gap: 30px;
}

.card {
    background-color: var(--color-white);
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04), 0 10px 30px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.06), 0 15px 40px rgba(166, 44, 43, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #8f2423, #A62C2B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* ======================= Seção Sobre ======================= */
.about-container {
    display: grid;
    align-items: center;
    gap: 50px;
}

.about-text p {
    margin-bottom: 25px;
}

.about-image img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.credentials {
    margin-top: 20px;
    padding-left: 0;
}

.credentials li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.credentials i {
    color: var(--color-primary);
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* ======================= Página Tratamentos ======================= */
.treatments-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.treatment-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    background: var(--color-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.treatment-item:hover {
     transform: translateY(-5px);
     box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.treatment-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    padding-top: 5px;
}

.treatment-content h2 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* ======================= Seção Contato ======================= */
.contact-container {
    display: grid;
    gap: 50px;
    align-items: center;
}

.contact-info .btn-whatsapp {
    margin-top: 20px;
}

.map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.mapa-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.mapa-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.address-details {
    margin-top: 30px;
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.8;
}

.address-details p {
    margin-bottom: 8px;
}

.address-details i {
    margin-right: 12px;
    color: var(--color-primary);
    width: 20px;
    text-align: center;
}

/* ======================= Rodapé ======================= */
#footer {
    background-color: #f8f8f8;
    color: #777;
    text-align: center;
    padding: 25px 0;
    border-top: 1px solid #eee;
}

/* ======================= Botão Flutuante WhatsApp ======================= */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    color: var(--color-white);
}

/* ======================= Media Queries (Responsividade) ======================= */

@media (min-width: 768px) {
    .title-xl {
        font-size: 3.5rem;
    }

    .cards-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .about-container {
        grid-template-columns: 1fr 1.5fr;
    }

    .contact-container {
        grid-template-columns: 1fr 1fr;
    }

    .contact-info {
        text-align: left;
    }
}

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        min-height: auto;
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .hero-text {
        padding-right: 0;
    }
    
    .hero-image {
        display: none;
    }
}


@media (max-width: 767px) {
    .section {
        padding: 60px 0;
    }

    .page-section {
        padding-top: calc(var(--header-height) + 40px);
    }

    .title-xl {
        font-size: 2.2rem;
    }

    .title-lg {
        font-size: 1.8rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .credentials li {
        justify-content: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #menu {
        display: block;
        position: absolute;
        width: 100%;
        top: var(--header-height);
        right: 0;
        background: var(--color-white);
        height: 0;
        transition: height 0.6s cubic-bezier(0.18, 0.89, 0.32, 1.28);
        visibility: hidden;
        overflow-y: hidden;
        z-index: 100;
        border-top: 1px solid rgba(0,0,0,0.05);
    }

    #nav.active #menu {
        height: calc(100vh - var(--header-height));
        visibility: visible;
        overflow-y: auto;
    }

    #menu li {
        padding: 1rem 0;
        margin: 0 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    #menu li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        text-align: center;
        font-size: 1.2rem;
    }
    
    .nav-link::after {
        display: none;
    }

    #btn-mobile {
        display: flex;
        padding: 0.5rem 1rem;
        font-size: 1rem;
        border: none;
        background: none;
        cursor: pointer;
        gap: 0.5rem;
    }

    #hamburger {
        border-top: 2px solid;
        width: 20px;
        color: var(--color-text);
    }

    #hamburger::after,
    #hamburger::before {
        content: '';
        display: block;
        width: 20px;
        height: 2px;
        background: currentColor;
        margin-top: 5px;
        transition: 0.3s;
        position: relative;
    }

    #nav.active #hamburger {
        border-top-color: transparent;
    }

    #nav.active #hamburger::before {
        transform: rotate(135deg);
    }

    #nav.active #hamburger::after {
        transform: rotate(-135deg);
        top: -7px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}