/* ============================================
   Clinica Familiar Santa Fe — Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.07), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-xl: 0 24px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);

    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--slate-800);
    background: #ffffff;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: var(--teal-600);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--teal-700);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--teal-600);
    color: #ffffff;
    border-color: var(--teal-600);
}

.btn-primary:hover {
    background: var(--teal-700);
    border-color: var(--teal-700);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    border-color: rgba(255,255,255,0.5);
    backdrop-filter: blur(4px);
}

.btn-outline-light:hover {
    background: #ffffff;
    color: var(--teal-700);
    border-color: #ffffff;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1rem;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--slate-800);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
}

.logo-icon {
    color: var(--teal-600);
    flex-shrink: 0;
}

.logo-accent {
    color: var(--teal-600);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:not(.btn) {
    color: var(--slate-600);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.nav-links a:not(.btn):hover {
    color: var(--teal-700);
    background: var(--teal-50);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--slate-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.82) 0%,
        rgba(13, 148, 136, 0.65) 50%,
        rgba(15, 23, 42, 0.78) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    text-align: center;
    padding: 120px 24px 80px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.hero-badge svg {
    color: #fbbf24;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.hero-headline em {
    font-style: italic;
    color: var(--teal-200);
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.hero-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9375rem;
    font-weight: 500;
}

.trust-item svg {
    color: var(--teal-300);
}

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255,255,255,0.6);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(8px); }
    60% { transform: translateX(-50%) translateY(4px); }
}

/* --- Section Shared --- */
.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal-600);
    background: var(--teal-50);
    border: 1px solid var(--teal-100);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    color: var(--slate-900);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--slate-500);
    line-height: 1.7;
}

/* --- Services --- */
.services {
    padding: 100px 0;
    background: var(--slate-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    border: 1px solid var(--slate-100);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--teal-100);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--teal-50);
    border: 1px solid var(--teal-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-600);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--teal-600);
    border-color: var(--teal-600);
    color: #ffffff;
}

.service-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--slate-500);
    line-height: 1.7;
}

/* --- About --- */
.about {
    padding: 100px 0;
    background: #ffffff;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.about-img-main img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: -40px;
    right: -32px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 5px solid #ffffff;
}

.about-img-secondary img {
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.about-accent {
    position: absolute;
    top: -20px;
    right: 40px;
    color: var(--teal-300);
}

.about-content .section-tag {
    margin-bottom: 16px;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.about-content > p {
    color: var(--slate-600);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 32px 0 40px;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: var(--slate-700);
    font-size: 0.9375rem;
}

.value-icon {
    width: 32px;
    height: 32px;
    background: var(--teal-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-600);
    flex-shrink: 0;
}

.about-content .btn {
    margin-top: 8px;
}

/* --- Insurance Banner --- */
.insurance-banner {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--teal-700) 0%, var(--teal-900) 100%);
    position: relative;
    overflow: hidden;
}

.insurance-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.insurance-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.insurance-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.insurance-content .section-title {
    color: #ffffff;
    margin-bottom: 16px;
}

.insurance-content .section-subtitle {
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
}

.insurance-badges {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.insurance-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 16px 28px;
    border-radius: var(--radius-lg);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9375rem;
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.insurance-badge:hover {
    background: rgba(255,255,255,0.18);
    transform: translateY(-2px);
}

.insurance-badge svg {
    color: var(--teal-200);
}

/* --- Contact --- */
.contact {
    padding: 100px 0;
    background: var(--slate-50);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-info .section-tag {
    margin-bottom: 16px;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 16px;
}

.contact-info > .section-subtitle {
    text-align: left;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--teal-50);
    border: 1px solid var(--teal-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-600);
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate-400);
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--slate-700);
    font-size: 1rem;
    line-height: 1.6;
}

.contact-item a {
    color: var(--teal-700);
    font-weight: 500;
}

.contact-item a:hover {
    color: var(--teal-600);
    text-decoration: underline;
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Contact Form */
.contact-form-wrapper {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--slate-100);
}

.contact-form-wrapper h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.form-note {
    font-size: 0.875rem;
    color: var(--slate-400);
    margin-bottom: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--slate-800);
    background: var(--slate-50);
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--teal-500);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--slate-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-success {
    text-align: center;
    padding: 40px 20px;
}

.form-success svg {
    color: var(--teal-500);
    margin-bottom: 16px;
}

.form-success h4 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--slate-800);
    margin-bottom: 8px;
}

.form-success p {
    color: var(--slate-500);
    font-size: 0.9375rem;
}

/* --- Footer --- */
.footer {
    background: var(--slate-900);
    padding: 64px 0 0;
    color: rgba(255,255,255,0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-light {
    color: #ffffff;
    margin-bottom: 16px;
}

.logo-light .logo-accent {
    color: var(--teal-400);
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.5);
    max-width: 280px;
}

.footer-links h4 {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9375rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--teal-300);
    text-decoration: none;
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.35);
}

.footer-bottom a {
    color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
    color: var(--teal-300);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default: always visible (no JS fallback) */
.reveal {
    opacity: 1;
    transform: none;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        gap: 48px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 4px;
        border-bottom: 1px solid var(--slate-100);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a:not(.btn) {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .nav-links .btn {
        align-items: center;
        justify-content: center;
        margin-top: 8px;
    }

    .hero-content {
        padding: 100px 20px 60px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-trust {
        flex-direction: column;
        gap: 12px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

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

    .about-images {
        max-width: 480px;
        margin: 0 auto;
    }

    .about-img-secondary {
        right: -16px;
        bottom: -24px;
    }

    .about-img-secondary img {
        width: 160px;
        height: 160px;
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-info .section-title,
    .contact-info > .section-subtitle {
        text-align: center;
    }

    .contact-form-wrapper {
        padding: 28px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .insurance-badges {
        flex-direction: column;
        align-items: center;
    }

    .insurance-badge {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-headline {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .service-card {
        padding: 28px 24px;
    }

    .contact-form-wrapper {
        padding: 24px;
    }
}
