/** 
 * Mobile-First Stylesheet for Orthopedic Doctor Landing Page
 * Colors: Deep medical blue, soft feminine blue/white backgrounds.
 * Typography: Inter (body), Outfit (headings)
 */

:root {
    /* Color Palette */
    --primary: #161616;
    /* Medical Deep Blue */
    --primary-light: #4A7A9F;
    --secondary: #af7d6d;
    /* Soft Rose/Nude - adds feminine touch */
    --accent: #E8F1F5;
    /* Very soft blue for backgrounds */

    --text-main: #334155;
    --text-muted: #64748b;
    --text-light: #f8fafc;

    --bg-white: #ffffff;
    --bg-light: #f8fafc;

    --border-color: #e2e8f0;



    /* Spacing & Layout */
    --container-padding: 24px;
    --section-padding: 64px 0;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;

    /* Typography */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Transitions */
    --transition: all 0.3s ease;

    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--bg-light);
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-divider {
    height: 4px;
    width: 60px;
    background-color: var(--secondary);
    margin: 0 auto 16px;
    border-radius: 2px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Buttons (Mobile friendly: large tap targets) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-large {
    padding: 18px 32px;
    font-size: 1.1rem;
    width: 100%;
    /* Full width on mobile by default */
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-light);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--accent);
}

.btn-block {
    width: 100%;
    padding: 16px;
}

/* --- Header & Navigation --- */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-crm {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Hamburger Menu */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-btn .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Nav Hidden by default */
.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.main-nav.active {
    display: block;
}

.nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-main);
    padding: 10px;
}

.nav-link:hover {
    color: var(--primary);
}

/* --- Hero Section Mobile --- */
.hero {
    background-color: #12ACAF;
    padding-top: 40px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

/* Add a subtle overlay for better text readability if needed, 
   or just rely on the dark background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(18, 172, 175, 0.95) 0%, rgba(18, 172, 175, 0.6) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 0 auto;
    max-width: 400px;
    /* Reduced size for profile photo */
    aspect-ratio: 1 / 1;
    /* Makes it square */
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image fills the square without stretching */
    display: block;
}

.hero-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #12ACAF;
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.hero-text {
    text-align: center;
}

.hero-title {
    font-size: 2.2rem;
    margin-bottom: 16px;
    line-height: 1.1;
    color: var(--text-light);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-actions .btn-primary {
    background-color: var(--bg-white);
    color: #12ACAF;
}

.hero-actions .btn-primary:hover {
    background-color: var(--accent);
    color: #0d8285;
}

.hero-actions .btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.hero-actions .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
}

/* --- Sobre Mim --- */
.lead-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
    font-family: var(--font-heading);
}

.sobre-content p {
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-top: 4px solid var(--secondary);
}

.stat-icon {
    font-size: 40px;
    color: var(--primary-light);
    margin-bottom: 16px;
}

.stat-card h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.stat-card p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Surgery Carousel Styles */
.surgery-carousel-wrapper {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.carousel-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.carousel-container {
    position: relative;
    max-width: 420px;
    /* Further reduced for compact mobile view */
    margin: 0 auto;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: transparent;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    aspect-ratio: 9 / 12;
    /* Optimized for even smaller vertical footprint */
}

@media (min-width: 768px) {
    .carousel-container {
        max-width: 1200px;
        box-shadow: none;
        overflow: visible;
    }

    .carousel-slides {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        height: auto;
        aspect-ratio: auto;
    }

    .slide {
        display: block !important;
        border-radius: var(--border-radius-md);
        overflow: hidden;
        box-shadow: var(--shadow-md);
        opacity: 1 !important;
        transform: none !important;
    }

    .carousel-prev,
    .carousel-next,
    .carousel-indicators {
        display: none !important;
    }

    .slide-caption {
        font-size: 0.8rem;
        padding: 15px 10px;
    }
}

.slide {
    min-width: 100%;
    position: relative;
    display: none;
    /* Mobile carousel logic */
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 9 / 16;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
}

/* Navigation Buttons */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: #fff;
    width: 25px;
    border-radius: 5px;
}

/* --- Formação --- */
.formacao {
    background-color: #12ACAF;
}

.formacao .section-title {
    color: var(--text-light);
}

.formacao .section-desc {
    color: rgba(255, 255, 255, 0.85);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--accent);
    top: 0;
    bottom: 0;
    left: 24px;
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 40px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--bg-white);
    border: 4px solid var(--accent);
    border-radius: 50%;
    left: 16px;
    top: 4px;
    z-index: 1;
}

.timeline-content {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-light);
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.timeline-inst {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

/* --- Áreas de Atuação --- */
.atuacao {
    background-color: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.service-card {
    background: var(--bg-white);
    padding: 32px 24px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.service-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.service-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.service-text {
    color: var(--text-muted);
}

/* --- Atuações (Locais) --- */
.locais {
    background-color: #12ACAF;
}

.locais .section-title {
    color: var(--text-light);
}

.locais .section-desc {
    color: rgba(255, 255, 255, 0.9);
}

.locais-carousel-container {
    position: relative;
    max-width: 280px;
    /* Small width for mobile carousel */
    margin: 40px auto 0;
    overflow: hidden;
}

.locais-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.local-slide {
    min-width: 100%;
    position: relative;
    display: none;
}

.local-slide.active {
    display: block;
}

.local-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 260px;
    margin: 0 auto;
    width: 100%;
}

.local-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #12ACAF;
}

.local-img-wrapper {
    width: 150px;
    height: 150px;
    background: #fff;
    border-radius: var(--border-radius-sm);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.local-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.local-name {
    font-size: 1.15rem;
    margin-bottom: 0;
    color: #fff;
    line-height: 1.3;
}

.local-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

/* --- Carousel Controls --- */
.locais-carousel-prev,
.locais-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.locais-carousel-prev:hover,
.locais-carousel-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

.locais-carousel-prev {
    left: 10px;
}

.locais-carousel-next {
    right: 10px;
}

.locais-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.locais-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.locais-dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

@media (min-width: 768px) {
    .locais-carousel-container {
        max-width: 100% !important;
        overflow: visible;
    }

    .locais-slides {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .local-slide {
        display: block !important;
    }

    .locais-carousel-prev,
    .locais-carousel-next,
    .locais-carousel-indicators {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .locais-slides {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        max-width: 850px;
        margin: 0 auto;
    }
}

/* --- Contato --- */
.contato {
    background-color: var(--bg-white);
}

.contato .section-title {
    color: var(--primary);
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info {
    width: 100%;
    display: flex;
    justify-content: center;
}

.contact-form-container {
    width: 100%;
    background-color: var(--bg-white);
    padding: 32px 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.info-card {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.info-card i {
    font-size: 24px;
    color: #12ACAF;
    margin-top: 4px;
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--primary);
}

.info-card p {
    color: var(--text-muted);
}

.text-link {
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 8px;
    display: inline-block;
}

.social-links {
    margin: 20px 0;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #12ACAF;
}

.map-container {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.contact-form-container {
    background-color: var(--bg-white);
    padding: 48px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-title {
    margin-bottom: 24px;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

.form-col {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 74, 118, 0.1);
}

/* --- Footer --- */
.footer {
    background-color: var(--primary);
    color: var(--text-light);
    padding: 40px 0;
    text-align: center;
}

.footer-crm {
    margin-top: 12px;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* --- Responsive Desktop Adjustments --- */
@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .mobile-menu-btn {
        display: none;
    }

    .main-nav {
        display: block;
        position: static;
        box-shadow: none;
        padding: 0;
        border: none;
        width: auto;
    }

    .nav-list {
        flex-direction: row;
        gap: 32px;
    }

    .nav-link {
        padding: 0;
    }

    /* Hero */
    .hero-content {
        flex-direction: row-reverse;
        align-items: center;
        gap: 60px;
    }

    .hero-image-wrapper {
        flex: 1;
        margin: 0;
    }

    .hero-text {
        flex: 1;
        text-align: left;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-actions {
        flex-direction: row;
    }

    .btn-large {
        width: auto;
    }

    /* Outras seções */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Captcha Styles */
.captcha-group {
    margin-top: 20px;
}

#captcha-question {
    font-weight: 700;
    color: #12ACAF;
    background: rgba(18, 172, 175, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Ensure all required fields have a visual cue if needed */
.contact-form input:required:invalid,
.contact-form textarea:required:invalid {
    border-bottom: 2px solid rgba(18, 172, 175, 0.3);
}