:root {
    /* Color Palette - Clinical Premium */
    --color-primary: #0f172a;
    /* Slate 900 - Dark text */
    --color-secondary: #0A66C2;
    /* Medical Blue */
    --color-accent: #38bdf8;
    /* Light Blue highlight */
    --color-surface: #ffffff;
    /* White bg */
    --color-surface-alt: #f8fafc;
    /* Slate 50 - Off white */
    --color-dark: #020617;
    /* Very dark */
    --color-text: #334155;
    /* Slate 700 - Body copy */

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-surface);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    color: var(--color-primary);
    line-height: 1.2;
}

.serif-italic {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 600;
}

.accent-color {
    color: var(--color-secondary);
}

.text-center {
    text-align: center;
}

.text-white {
    color: white !important;
}

.mt-3 {
    margin-top: 2rem;
}

.w-100 {
    width: 100%;
}

/* Utilities */
.bg-light {
    background-color: var(--color-surface-alt);
}

.bg-dark {
    background-color: var(--color-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.hover-scale {
    transition: var(--transition);
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--color-secondary);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary:hover {
    background-color: #0d4a8c;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--color-primary);
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: white;
}

/* Top Bar */
.top-bar {
    background-color: var(--color-primary);
    color: white;
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.divider {
    margin: 0 10px;
    opacity: 0.5;
}

.topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.hover-link {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: var(--transition);
}

.hover-link:hover {
    color: var(--color-secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-primary);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 100px 0 140px 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 100%);
    z-index: -1;
    border-bottom-left-radius: 100px;
}

.hero-text {
    max-width: 650px;
}

.tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--color-secondary);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.15rem;
    color: var(--color-text);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.trust-badges small {
    display: block;
    color: var(--color-text);
    font-weight: 500;
}

.google-rating span {
    color: #FBBC05;
    /* Google Gold */
    font-size: 1.2rem;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(2.5rem, 4vw, 3rem);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--color-text);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Treatments grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.treatment-card {
    background: var(--color-surface);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.treatment-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(10, 102, 194, 0.08);
    /* slight blue shadow */
}

.card-icon {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-secondary);
    letter-spacing: -1px;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

.treatment-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.treatment-card p {
    color: var(--color-text);
    font-size: 0.95rem;
}

/* Split Section (Why us) */
.split-section {
    overflow: hidden;
}

.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.img-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-secondary);
    font-weight: 500;
}

.check-list {
    list-style: none;
    margin: 30px 0;
}

.check-list li {
    margin-bottom: 15px;
    color: var(--color-primary);
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.check-mark {
    display: inline-block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-secondary);
    border-radius: 50%;
    position: relative;
    margin-top: 2px;
}

.check-mark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: 2px solid var(--color-secondary);
    border-left: none;
    border-top: none;
    transform: rotate(45deg);
}

/* Cases Slider */
.cases-swiper {
    padding-bottom: 50px;
}

.case-card {
    background: var(--color-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.before-after-placeholder {
    display: flex;
    height: 300px;
    background: #1e293b;
}

.half {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
}

.half:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.case-info {
    padding: 30px;
}

.case-info h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.case-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-style: italic;
}

/* Swiper Customization */
.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

.swiper-pagination-bullet-active {
    background: white;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    transform: scale(0.5);
}

/* CTA Contact */
.cta-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.cta-text {
    padding: 60px;
    background: linear-gradient(135deg, var(--color-surface-alt) 0%, var(--color-surface) 100%);
}

.cta-text h2 {
    margin-bottom: 20px;
}

.cta-text p {
    color: var(--color-text);
    margin-bottom: 40px;
}

.contact-methods {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
}

.cta-form {
    padding: 60px;
    background: var(--color-primary);
    color: white;
}

.cta-form h3 {
    color: white;
    margin-bottom: 30px;
}

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.appointment-form input,
.appointment-form select {
    width: 100%;
    padding: 15px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
}

.appointment-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.appointment-form select {
    color: rgba(255, 255, 255, 0.8);
}

.appointment-form small {
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    display: block;
    text-align: center;
}

/* Footer */
.footer {
    padding: 60px 0 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-brand h3 {
    margin-bottom: 10px;
}

.footer-brand p {
    color: var(--color-text);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--color-text);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        padding: 20px;
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
        z-index: -1;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        pointer-events: none;
        align-items: flex-start;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-bg {
        width: 100%;
        top: auto;
        bottom: 0;
        height: 50%;
        border-bottom-left-radius: 0;
    }

    .hero {
        padding-bottom: 60px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .btn-large {
        width: 100%;
    }

    .split-content {
        grid-template-columns: 1fr;
    }

    .cta-card {
        grid-template-columns: 1fr;
    }

    .top-bar-content {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .contact-methods {
        flex-direction: column;
    }

    .btn-whatsapp {
        width: 100%;
        justify-content: center;
        min-height: 52px;
    }

    /* Botones — mínimo 44px táctil */
    .btn-primary,
    .btn-outline {
        min-height: 52px;
        padding: 15px 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-large {
        min-height: 56px;
        padding: 18px 36px;
    }

    /* Inputs — evitar zoom automático en iOS */
    input,
    select,
    textarea {
        font-size: 16px !important;
        min-height: 52px;
    }

    /* Cursor */
    * { cursor: auto; }
    .cursor { display: none; }
}

/* ─── breakpoint adicional 768px para refinamiento fino ─────────────────── */
@media (max-width: 768px) {
    .top-bar {
        display: none; /* Ocultar topbar en pantallas muy pequeñas para ganar espacio */
    }

    .navbar {
        top: 0; /* Sin topbar */
    }

    h1 {
        font-size: clamp(2.4rem, 10vw, 3.4rem);
    }

    .hero {
        padding-top: 90px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── prefers-reduced-motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .nav-links { transition: none; }
    .preloader { display: none; }
}
