@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #AAE1FF;
    --secondary-color: #001B57;
    --tertiary-color: #FAFAFF;
    --fourth-color: #EEF4FB;
    --fifth-color: #BBE1FF;
    --accent-color: #3A7BD5;
    --accent-soft: #D6EEFF;

    --primary-color-rgba: rgba(170, 225, 255, 0.85);
    --secondary-color-rgba: rgba(0, 27, 87, 0.8);
    --tertiary-color-rgba: rgba(250, 250, 255, 0.8);
    --fourth-color-rgba: rgba(240, 240, 240, 0.8);
    --fifth-color-rgba: rgba(187, 225, 255, 0.8);

    --font-display: 'DM Sans', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --radius: 1.25rem;
    --shadow-soft: 0 8px 32px rgba(0, 27, 87, 0.10);
    --shadow-card: 0 4px 20px rgba(0, 27, 87, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--tertiary-color);
    font-family: var(--font-body);
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ───────────────────────────────────────── */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

p {
    line-height: 1.75;
}

/* ── Utilities ────────────────────────────────────────── */

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

.logo { width: 100px; }

.section-label {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-color);
    display: block;
    margin-bottom: 0.5rem;
}

/* ── CTA Button ───────────────────────────────────────── */

.btn-cta {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 0.6rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.65rem 1.5rem;
    border: 0.2rem solid var(--secondary-color);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 14px rgba(0, 27, 87, 0.2);
}

.btn-cta:hover {
    background-color: transparent;
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 27, 87, 0.18);
}

/* ── Card Icon ────────────────────────────────────────── */

.card-icon {
    width: 4.5rem;
    height: 4.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--fifth-color) 100%);
    padding: 0.6rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(58, 123, 213, 0.2);
}

.icon { max-width: 3rem; height: auto; }

/* ── Navbar ───────────────────────────────────────────── */

.custom-nav {
    --bs-navbar-toggler-border-color: var(--secondary-color-rgba);
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><path stroke='rgba(0, 27, 87, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/></svg>");
    --bs-navbar-toggler-border-radius: 5rem;
    --bs-border-width: 2px;
    background-color: var(--primary-color-rgba);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 0;
    box-shadow: 0 2px 16px rgba(0, 27, 87, 0.08);
}

.custom-nav .container {
    border-bottom: 1px solid rgba(0, 27, 87, 0.1);
}

.custom-nav .nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 0.3rem;
}

.custom-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.custom-nav .nav-link:hover::after { transform: scaleX(1); }
.custom-nav .nav-link:hover { color: var(--secondary-color); }
.navbar-brand-color { color: var(--secondary-color); }

/* ── Hero ─────────────────────────────────────────────── */

.hero {
    padding-top: 100px !important;
    background: linear-gradient(160deg, var(--primary-color) 0%, #d6eeff 55%, var(--fifth-color) 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.55) 0%, transparent 70%);
    top: -120px;
    right: -120px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(58,123,213,0.1) 0%, transparent 70%);
    bottom: 0;
    left: -80px;
    pointer-events: none;
}

.hero p {
    max-width: 82%;
    color: rgba(0,27,87,0.75);
}

.hero h1 {
    color: var(--secondary-color);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
}

/* ── Hero image with blob behind it ──────────────────── */

.hero-img-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    max-width: 100%;
}

/* Prevent the blob from causing horizontal scroll */
.hero .col-md-6:last-child {
    padding-bottom: 1.5rem;
    padding-top: 0.5rem;
}

/* The organic blob shape behind the photo */
.hero-img-wrapper::before {
    content: '';
    position: absolute;
    inset: -18px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%;
    z-index: 0;
    opacity: 0.18;
    animation: blob-morph 8s ease-in-out infinite;
}

/* Solid ring slightly offset */
.hero-img-wrapper::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 3px solid rgba(0, 27, 87, 0.15);
    border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%;
    z-index: 0;
    animation: blob-morph 8s ease-in-out infinite;
}

@keyframes blob-morph {
    0%   { border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%; }
    33%  { border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%; }
    66%  { border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%; }
    100% { border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%; }
}

.hero-img {
    position: relative;
    z-index: 1;
    background-size: cover;
    background-position: center;
    border-radius: 60% 40% 55% 45% / 50% 55% 45% 50%;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: top center;
    margin-top: 1rem;
    animation: blob-morph 8s ease-in-out infinite;
    /* box-shadow: var(--shadow-soft); */
}

/* ── Services ─────────────────────────────────────────── */

.servicos {
    background-color: var(--fourth-color);
    position: relative;
}

.servico-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    border-top: 4px solid var(--primary-color);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-card);
}

.servico-card:hover {
    transform: translateY(-8px);
    border-top-color: var(--accent-color);
    box-shadow: 0 12px 36px rgba(0, 27, 87, 0.14);
}

.servico-card h4 {
    font-size: 1.15rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* ── About ────────────────────────────────────────────── */

.sobre {
    background: linear-gradient(180deg, #fff 0%, var(--tertiary-color) 100%);
}

/* Wrapper for sobre image with decorative ring behind */
.sobre-img-wrapper {
    position: relative;
    display: inline-block;
}

.sobre-img-wrapper::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-soft) 100%);
    z-index: 0;
    opacity: 0.6;
    transform: rotate(-3deg);
}

.sobre-img-wrapper::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--fifth-color) 0%, var(--primary-color) 100%);
    z-index: 0;
    opacity: 0.4;
    transform: rotate(2deg);
}

.sobre-img {
    position: relative;
    z-index: 1;
    background-color: var(--secondary-color);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: center;
    margin-top: 1rem;
    box-shadow: var(--shadow-soft);
}

.sobre ul {
    padding-left: 0;
    list-style: none;
}

.sobre ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.4rem;
}

.sobre ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 0.7rem;
    top: 0.25rem;
}

/* ── Office / Consultório ─────────────────────────────── */

.consultorio {
    background-color: var(--fourth-color);
}

.consultorio-img {
    max-height: 500px;
    object-fit: cover;
    object-position: center;
}

.consultorio-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--secondary-color);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    opacity: 0.3;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.consultorio-carousel .carousel-indicators .active {
    opacity: 1;
    transform: scale(1.3);
}

.consultorio-nav-btn {
    background-color: var(--secondary-color);
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 27, 87, 0.25);
}

.consultorio-nav-btn:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.consultorio-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ── Contact ──────────────────────────────────────────── */

.contato {
    background: linear-gradient(135deg, #fff 0%, var(--accent-soft) 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle decorative circle behind CTA */
.contato::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 50%);
    left: -120px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    pointer-events: none;
}

.mapa-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.mapa-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Footer ───────────────────────────────────────────── */

.footer {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--fifth-color) 100%);
    color: var(--secondary-color);
}

.footer-brand { color: var(--secondary-color); }

.footer-tagline {
    font-size: 0.85rem;
    color: rgba(0,27,87,0.7) !important;
    margin-top: 0.25rem;
}

.footer-heading {
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
    color: #000;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(0, 27, 87, 0.12);
}

.footer-copy {
    color: rgba(0,27,87,0.6);
    font-size: 0.82rem;
}

/* ── WhatsApp Float ───────────────────────────────────── */

.whatsapp-float {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    z-index: 9999;
    background-color: #25D366;
    color: #fff;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: wpp-pulse 2.5s infinite;
}

.whatsapp-float svg {
    width: 1.9rem;
    height: 1.9rem;
}

.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
    animation: none;
}

@keyframes wpp-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    70%  { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 768px) {
    .hero p { max-width: 100%; }

    .consultorio-nav-btn { display: none; }

    .card-icon { margin-inline: auto; }

    .consultorio-img {
        height: auto;
        max-height: 480px;
        aspect-ratio: 4 / 3;
    }

    .sobre-img-wrapper::before,
    .sobre-img-wrapper::after {
        inset: -8px;
    }

    .contato::before { display: none; }
}

@media (max-width: 576px) {
    .logo { width: 5rem; }
    .navbar-brand { font-size: 1.25rem !important; }
    /* .hero-img-wrapper::before,
    .hero-img-wrapper::after { inset: -10px; } */
}