/* ============================================
   Centro Odontológico Pacífico - Stylesheet
   ============================================ */

/* Las fuentes (Outfit) se cargan con <link> en el <head> de cada página:
   un @import aquí retrasaría el primer renderizado. */

:root {
    --primary: #4685fb;
    --primary-dark: #1e4db7;
    --primary-light: #eef4ff;
    --primary-soft: #f5f9ff;
    --gold-gradient: linear-gradient(135deg, #bf953f 0%, #fcf6ba 45%, #b38728 50%, #fbf5b7 55%, #aa771c 100%);
    --gold: #b38728;
    --gold-bright: #fcf6ba;
    --dark: #0f172a;
    --text-main: #475569;
    --text-light: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 50px rgba(70, 133, 251, 0.12);
    --shadow-premium: 0 25px 60px rgba(70, 133, 251, 0.18);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--white);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* --- Utility --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.gold-shine {
    background: var(--gold-gradient);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(70, 133, 251, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(70, 133, 251, 0.4);
}

.btn-gold {
    background: var(--gold-gradient);
    background-size: 200% auto;
    color: var(--dark);
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(179, 135, 40, 0.3);
    animation: shine 4s linear infinite;
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(179, 135, 40, 0.45);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.05rem;
    border-radius: 14px;
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 0;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
}

header.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-bottom-color: var(--border);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 64px;
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo img { height: 52px; }

.nav-menu {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-gradient);
    transition: var(--transition);
}

.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }

.nav-cta { padding: 12px 22px !important; border-radius: 10px !important; font-size: 0.9rem !important; }

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
    padding: 10px;
    color: var(--dark);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero --- */
.hero {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 20%, rgba(70, 133, 251, 0.08), transparent 50%),
        radial-gradient(circle at 15% 80%, rgba(179, 135, 40, 0.05), transparent 50%),
        linear-gradient(180deg, var(--primary-soft) 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    border: 1px solid var(--primary-light);
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.8rem);
    color: var(--dark);
    line-height: 1.05;
    margin-bottom: 28px;
    font-weight: 800;
    letter-spacing: -1.5px;
}

.hero-text p {
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--text-light);
    margin-bottom: 36px;
    max-width: 580px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-trust {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.trust-item .num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    line-height: 1;
}

.trust-item .label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.hero-image-wrap {
    position: relative;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    aspect-ratio: 4/5;
    object-fit: cover;
}

.hero-deco {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: white;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 2;
}

.hero-deco .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-deco .text strong {
    color: var(--dark);
    display: block;
    font-size: 0.95rem;
}

.hero-deco .text span {
    color: var(--text-light);
    font-size: 0.8rem;
}

/* --- Sections --- */
section { padding: 100px 0; }

.section-header {
    text-align: center;
    margin-bottom: 64px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: var(--dark);
    margin-bottom: 18px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--gold-gradient);
    margin: 0 auto 24px;
    border-radius: 10px;
}

/* --- Benefits / Features --- */
.benefits {
    background: var(--primary-soft);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.benefit-card {
    background: white;
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
}

.benefit-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    transition: var(--transition);
}

.benefit-card:hover .benefit-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.benefit-card h3 {
    color: var(--dark);
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.benefit-card p {
    color: var(--text-light);
    font-size: 0.98rem;
    line-height: 1.65;
}

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.service-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/5;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-premium);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.service-card:hover img { transform: scale(1.08); }

.service-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 80%);
    padding: 32px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.service-overlay h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.service-overlay p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.5;
}

.service-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gold-gradient);
    color: var(--dark);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Doctores / Equipo --- */
.doctors {
    background: linear-gradient(180deg, #ffffff 0%, var(--primary-soft) 100%);
}

.doctors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
}

/* Formato horizontal: la ficha ocupa la mitad del ancho y un tercio del alto
   que ocupaba en columna, así la sección entra casi entera en pantalla.
   El max-width evita que la quinta ficha, sola en su fila, se estire. */
.doctor-card {
    flex: 1 1 460px;
    max-width: 570px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 22px;
    align-items: center;
    padding: 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.doctor-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

/* Marco dorado de la foto */
.doctor-photo {
    padding: 6px;
    border-radius: 18px;
    background: var(--gold-gradient);
    background-size: 200% auto;
    animation: shine 6s linear infinite;
}

.doctor-photo img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 13px;
    display: block;
}

.doctor-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-right: 6px;
}

/* Placa con borde dorado para el nombre */
.doctor-name {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.2px;
    line-height: 1.3;
    padding: 8px 14px;
    border: 2px solid transparent;
    border-radius: 10px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        var(--gold-gradient) border-box;
    box-shadow: 0 3px 10px rgba(179, 135, 40, 0.14);
    margin-bottom: 10px;
}

.doctor-role {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid rgba(70, 133, 251, 0.25);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}

.doctor-bio {
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Por debajo de este ancho la columna de texto queda demasiado estrecha para
   leerse al lado de la foto: la ficha vuelve a apilarse. */
@media (max-width: 620px) {
    .doctor-card {
        grid-template-columns: 1fr;
        gap: 16px;
        justify-items: center;
    }
    .doctor-photo { max-width: 260px; }
    .doctor-info { align-items: center; text-align: center; padding-right: 0; }
}

/* --- Testimonials --- */
.testimonials {
    background: var(--primary-soft);
}

.testimonial-card {
    background: white;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 1.05rem;
    margin-bottom: 18px;
    letter-spacing: 2px;
}

.testimonial-text {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.author-info strong {
    color: var(--dark);
    font-size: 0.95rem;
    display: block;
}

.author-info span {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* --- CTA --- */
.cta-section {
    padding: 60px 24px;
}

.cta-box {
    background:
        radial-gradient(circle at 80% 20%, rgba(252, 246, 186, 0.15), transparent 50%),
        linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    text-align: center;
    padding: 80px 32px;
    border-radius: 36px;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    top: -150px;
    left: -150px;
}

.cta-box::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    bottom: -120px;
    right: -120px;
}

.cta-box > * { position: relative; z-index: 1; }

.cta-box h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
    margin-bottom: 18px;
    color: white;
    font-weight: 800;
    letter-spacing: -1px;
}

.cta-nap {
    margin-top: 32px;
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}
.cta-nap strong { color: white; }
.cta-nap a { color: white; text-decoration: none; }

address { font-style: normal; }

.cta-box p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 36px;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Map --- */
.map-section {
    padding: 0;
    line-height: 0;
}

.map-section iframe {
    width: 100%;
    height: 480px;
    border: 0;
    display: block;
    filter: grayscale(20%);
}

/* --- Floating WhatsApp --- */
.wa-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 64px;
    height: 64px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
    color: white;
}

.wa-float::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: #25d366;
    opacity: 0.5;
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 0; }
}

.wa-float:hover { transform: scale(1.08); }

/* --- Footer --- */
footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 80px 0 30px;
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 50px;
}

.footer-logo img {
    height: 70px;
    width: auto;
    margin-bottom: 22px;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.75;
    font-size: 0.95rem;
    margin-bottom: 22px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.05rem;
    color: white;
    margin-bottom: 22px;
    font-weight: 700;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-list a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: var(--transition);
}

.footer-list a:hover { color: white; }

.footer-list svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 50px auto 0;
    padding: 28px 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
}

/* --- Reveal animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .nav-menu { gap: 24px; }
    .nav-link { font-size: 0.9rem; }
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }
    .hero-text p, .hero-cta, .hero-trust { margin-left: auto; margin-right: auto; justify-content: center; }
    .hero-badge { margin-left: auto; margin-right: auto; }
    .hero-image-wrap { max-width: 480px; margin: 0 auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    section { padding: 70px 0; }
    .nav-menu {
        position: fixed;
        top: 70px;
        right: 0;
        width: 100%;
        max-width: 320px;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 30px 28px;
        gap: 24px;
        transform: translateX(100%);
        transition: var(--transition);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }
    .nav-menu.active { transform: translateX(0); }
    .nav-menu .nav-link { font-size: 1.1rem; }
    .nav-menu .nav-cta { width: 100%; }
    .menu-toggle { display: block; }

    .hero { padding-top: 120px; }
    .hero-deco { left: 10px; bottom: -20px; padding: 14px 18px; }
    .hero-deco .icon { width: 40px; height: 40px; }

    .cta-box { padding: 60px 24px; border-radius: 28px; }
    .footer-grid { grid-template-columns: 1fr; gap: 36px; text-align: left; }
    .wa-float { width: 56px; height: 56px; bottom: 20px; right: 20px; }
    .wa-float svg { width: 30px; height: 30px; }
}

@media (max-width: 480px) {
    .hero-trust { gap: 20px; }
    .trust-item .num { font-size: 1.5rem; }
    .hero-cta .btn { width: 100%; }
}

/* ============================================
   Libro de Reclamaciones Virtual
   ============================================ */

.lr-page { background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 420px); }

.lr-main { padding: 130px 0 80px; }
.lr-container { max-width: 940px; }

/* --- Aviso oficial (Anexo 2, D.S. 011-2011-PCM) --- */
.lr-aviso {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 30px 32px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 26px;
}

.lr-aviso-icon {
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.lr-aviso h1 {
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    color: var(--dark);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.lr-aviso p { color: var(--text-main); font-size: 1rem; margin: 0; }

/* --- Alertas --- */
.lr-alert {
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 0.93rem;
    margin-bottom: 24px;
    line-height: 1.55;
}

.lr-alert ul { margin: 8px 0 0 20px; }
.lr-alert p { margin: 6px 0 0; }
.lr-alert a { color: inherit; font-weight: 700; }

.lr-alert-warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.lr-alert-error { background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c; }
.lr-alert-info  { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }

/* --- Definiciones --- */
.lr-defs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.lr-def-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
}

.lr-def-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 10px;
}

.lr-def-card p { font-size: 0.92rem; color: var(--text-main); margin: 0; }

.lr-def-note {
    grid-column: 1 / -1;
    display: flex;
    gap: 11px;
    align-items: flex-start;
    color: var(--text-light);
    font-size: 0.88rem;
    padding: 2px 4px;
}

.lr-def-note svg { flex-shrink: 0; margin-top: 2px; }
.lr-def-note p { margin: 0; }

/* --- Formulario --- */
.lr-fieldset {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 30px 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.lr-fieldset legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--dark);
    padding: 0 12px 0 0;
    margin-left: -2px;
}

.lr-num {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
}

.lr-fieldset-provider { background: var(--primary-soft); }

.lr-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px 26px;
    margin-top: 6px;
}

.lr-provider-grid dt {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 2px;
}

.lr-provider-grid dd {
    margin: 0;
    font-weight: 700;
    color: var(--dark);
    font-size: 0.94rem;
    word-break: break-word;
}

.lr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.lr-col-2 { grid-column: 1 / -1; }

.lr-field { display: flex; flex-direction: column; }

.lr-field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 7px;
}

.req { color: #dc2626; font-weight: 800; }

.lr-field input,
.lr-field select,
.lr-field textarea {
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--dark);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: border-color 0.25s, box-shadow 0.25s;
    width: 100%;
}

.lr-field textarea { resize: vertical; min-height: 92px; line-height: 1.55; }

.lr-field input:focus,
.lr-field select:focus,
.lr-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(70, 133, 251, 0.14);
}

.lr-field input.has-error,
.lr-field select.has-error,
.lr-field textarea.has-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.lr-help {
    display: block;
    font-size: 0.79rem;
    color: var(--text-light);
    margin-top: 6px;
    line-height: 1.45;
}

/* --- Checkboxes --- */
.lr-check-row {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    background: var(--primary-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 15px 17px;
    margin-top: 18px;
}

.lr-check-row input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--primary);
    cursor: pointer;
}

.lr-check-row label {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.55;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.lr-check-row input.has-error { outline: 2px solid #dc2626; outline-offset: 3px; }

/* --- Sub-bloque representante --- */
.lr-subblock {
    margin-top: 18px;
    padding: 20px 22px 24px;
    border: 1.5px dashed var(--primary);
    border-radius: var(--radius-md);
    background: var(--primary-soft);
}

.lr-subblock h3 {
    font-size: 0.98rem;
    color: var(--primary-dark);
    font-weight: 800;
}

.lr-subblock .lr-grid { margin-top: 14px; }

/* --- Tarjetas de radio --- */
.lr-radio-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0 22px;
}

.lr-radio-card {
    position: relative;
    display: block;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 17px 19px;
    cursor: pointer;
    transition: var(--transition);
}

.lr-radio-card:hover { border-color: var(--primary); }

.lr-radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lr-radio-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(70, 133, 251, 0.12);
}

.lr-radio-card:has(input:focus-visible) { outline: 2px solid var(--primary-dark); outline-offset: 2px; }

.lr-radio-body { display: flex; flex-direction: column; gap: 4px; }
.lr-radio-title { font-weight: 800; color: var(--dark); font-size: 1rem; }
.lr-radio-desc { font-size: 0.85rem; color: var(--text-light); line-height: 1.45; }

/* --- Nota legal --- */
.lr-legal {
    background: var(--dark);
    color: #cbd5e1;
    border-radius: var(--radius-md);
    padding: 24px 28px;
    font-size: 0.86rem;
    line-height: 1.65;
    margin-bottom: 22px;
}

.lr-legal-title {
    color: var(--gold-bright);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.78rem;
    margin-bottom: 10px;
}

.lr-legal ul { margin: 0; padding-left: 20px; }
.lr-legal li { margin-bottom: 8px; }
.lr-legal li:last-child { margin-bottom: 0; }
.lr-legal strong { color: var(--white); }

/* --- Acciones --- */
.lr-actions { text-align: center; padding: 6px 0 10px; }
.lr-actions button { width: 100%; max-width: 380px; }
.lr-actions button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.lr-actions-note { font-size: 0.83rem; color: var(--text-light); margin-top: 14px; }

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover { background: var(--primary-light); transform: translateY(-2px); }

/* --- Constancia --- */
.lr-constancia:focus { outline: none; }

.lr-constancia-head {
    text-align: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px 30px;
    margin-bottom: 26px;
    box-shadow: var(--shadow-md);
}

.lr-ok-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
}

.lr-constancia-head h2 { font-size: 1.5rem; color: var(--dark); margin-bottom: 10px; }
.lr-constancia-head p { color: var(--text-main); max-width: 560px; margin: 0 auto; font-size: 0.95rem; }

.lr-constancia-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* --- Hoja imprimible --- */
.lr-hoja {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 36px 40px 40px;
    box-shadow: var(--shadow-sm);
    color: var(--dark);
}

.lr-hoja h3 {
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 7px;
    margin: 28px 0 14px;
}

.lr-hoja-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    border-bottom: 3px solid var(--dark);
    padding-bottom: 18px;
}

.lr-hoja-brand { display: flex; gap: 14px; align-items: flex-start; }
.lr-hoja-logo { width: 58px; height: auto; }
.lr-hoja-brand > div { display: flex; flex-direction: column; }
.lr-hoja-brand strong { font-size: 1rem; color: var(--dark); }
.lr-hoja-brand span { font-size: 0.82rem; color: var(--text-light); }

.lr-hoja-id { text-align: right; display: flex; flex-direction: column; gap: 3px; margin-left: auto; }
.lr-hoja-title { font-weight: 800; letter-spacing: 0.08em; font-size: 0.9rem; }
.lr-hoja-num { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 1.02rem; color: var(--primary-dark); }
.lr-hoja-fecha { font-size: 0.8rem; color: var(--text-light); }

.lr-sello {
    align-self: flex-end;
    margin-top: 7px;
    padding: 4px 11px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.lr-sello-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.lr-sello-pend { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

.lr-row {
    display: flex;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px dotted var(--border);
    font-size: 0.9rem;
}

.lr-row span { min-width: 250px; color: var(--text-light); }
.lr-row strong { color: var(--dark); word-break: break-word; }

.lr-hoja-text { margin: 16px 0; }

.lr-hoja-text > span {
    display: block;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 6px;
}

.lr-hoja-text p {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

.lr-hoja-acciones { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 18px 20px; }
.lr-hoja-acciones > p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 12px; }
.lr-hoja-lineas span { display: block; border-bottom: 1px solid #cbd5e1; height: 28px; }
.lr-hoja-acciones .lr-hoja-block { margin-top: 16px; }

.lr-hoja-firma { font-size: 0.79rem; color: var(--text-light); font-style: italic; margin-top: 12px; }

.lr-hoja-legal {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.74rem;
    color: var(--text-light);
    line-height: 1.55;
}

.lr-hoja-legal p { margin: 0 0 7px; }

/* --- Responsive --- */
@media (max-width: 760px) {
    .lr-main { padding: 106px 0 60px; }
    .lr-aviso { flex-direction: column; gap: 16px; padding: 24px 22px; }
    .lr-defs { grid-template-columns: 1fr; }
    .lr-grid { grid-template-columns: 1fr; gap: 15px; }
    .lr-radio-cards { grid-template-columns: 1fr; }
    .lr-fieldset { padding: 22px 20px 24px; }
    .lr-hoja { padding: 24px 20px 28px; }
    .lr-hoja-id { text-align: left; margin-left: 0; }
    .lr-sello { align-self: flex-start; }
    .lr-row { flex-direction: column; gap: 2px; }
    .lr-row span { min-width: 0; font-size: 0.78rem; }
    .lr-constancia-actions .btn { width: 100%; }
}

/* --- Impresión --- */
@media print {
    .no-print, header, footer, .wa-float { display: none !important; }

    body, .lr-page { background: #fff !important; }
    .lr-main { padding: 0 !important; }
    .lr-container { max-width: 100% !important; padding: 0 !important; }

    .lr-hoja {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .lr-hoja h3 { break-after: avoid; page-break-after: avoid; }
    .lr-hoja-block, .lr-hoja-text, .lr-hoja-acciones { break-inside: avoid; page-break-inside: avoid; }

    a[href]:after { content: none !important; }

    @page { margin: 14mm; }
}

.lr-nota-coherencia {
    margin-top: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    font-size: 0.84rem;
    line-height: 1.55;
}

.lr-fieldset-intro {
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

.lr-fieldset-intro strong { color: var(--dark); }

/* Campo trampa anti-bot: fuera de pantalla, nunca oculto con display:none
   (algunos bots ignoran los campos que detectan como ocultos). */
.lr-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ============================================
   SEO local: textos, preguntas frecuentes y
   páginas de tratamientos
   ============================================ */

.hero-kicker {
    display: block;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    line-height: 1.3;
}

.doctor-link {
    margin-top: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}
.doctor-link:hover { color: var(--primary-dark); text-decoration: underline; }

.local-seo { background: var(--primary-soft); }

.local-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: start;
}

.local-text h2,
.faq-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--dark);
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.15;
    margin-bottom: 22px;
}

.local-text p { font-size: 1.05rem; margin-bottom: 16px; line-height: 1.75; }
.local-text strong { color: var(--dark); }
.local-text a, .prose a, .faq a { color: var(--primary-dark); font-weight: 600; }

.local-facts {
    list-style: none;
    margin-top: 24px;
    padding: 22px 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.local-facts li { padding: 6px 0; }

.faq details {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: var(--transition);
}
.faq details[open] { border-color: var(--primary); box-shadow: var(--shadow-sm); }

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 52px 18px 22px;
    font-weight: 700;
    color: var(--dark);
    position: relative;
    line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--primary);
    transition: var(--transition);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 22px 20px; line-height: 1.7; }

/* --- Páginas de tratamientos --- */
.page-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(70, 133, 251, 0.08), transparent 50%),
        linear-gradient(180deg, var(--primary-soft) 0%, #ffffff 100%);
    padding: 150px 0 70px;
}

.page-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    color: var(--dark);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -1.2px;
    margin-bottom: 22px;
}

.page-lead {
    font-size: clamp(1.05rem, 1.4vw, 1.18rem);
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 620px;
}

.page-hero-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
}

.breadcrumb {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 18px;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--text-light); }
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.page-content { padding: 80px 0; }

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 56px;
    align-items: start;
}

.prose h2 {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    color: var(--dark);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin: 44px 0 16px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; color: var(--dark); margin: 24px 0 8px; }
.prose p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 16px; }
.prose strong { color: var(--dark); }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { font-size: 1.02rem; line-height: 1.7; margin-bottom: 8px; }

.steps { list-style: none; margin-left: 0 !important; counter-reset: paso; }
.steps li {
    counter-increment: paso;
    position: relative;
    padding: 18px 20px 18px 68px;
    background: var(--primary-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.steps li::before {
    content: counter(paso);
    position: absolute;
    left: 18px;
    top: 16px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-aside { position: sticky; top: 110px; display: grid; gap: 20px; }

.aside-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
}
.aside-card h2 { font-size: 1.2rem; color: var(--dark); margin-bottom: 12px; }
.aside-card p, .aside-card li { font-size: 0.95rem; line-height: 1.6; }
.aside-card ul { list-style: none; margin: 14px 0 18px; }
.aside-card li { padding: 4px 0; }
.aside-card .btn { width: 100%; }

.aside-doctor { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.aside-doctor img { width: 72px; height: 90px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.aside-doctor strong { display: block; color: var(--dark); }
.aside-doctor span { font-size: 0.88rem; color: var(--text-light); }

.faq-narrow { max-width: 820px; margin: 0 auto; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.related-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    transition: var(--transition);
}
.related-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.related-card img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }

@media (max-width: 1024px) {
    .local-grid, .page-hero-grid, .content-grid { grid-template-columns: 1fr; gap: 40px; }
    .page-hero { padding-top: 130px; }
    .page-hero-img { max-width: 480px; margin: 0 auto; }
    .page-aside { position: static; }
}

@media (max-width: 768px) {
    .page-hero-img { aspect-ratio: 16 / 10; max-width: none; }
}
