/* ═══════════════════════════════════════════════════════════════
   CLÍNICA ORTEGA — ECOGRAFÍA
   Design System v3.0 — Matching /especialidades/cirugia-general/
   Typography: Open Sans (body) + Poppins (headings)
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --navy: #0d1b3e;
    --navy-light: #132650;
    --navy-dark: #080f24;
    --blue: #034e9e;
    --blue-bright: #2471a3;
    --blue-accent: #2980b9;
    --white: #ffffff;
    --gray-50: #f7f9fc;
    --gray-100: #eef2f7;
    --gray-200: #dde4ed;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --green: #27ae60;
    --font-heading: 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Open Sans', 'Segoe UI', sans-serif;
    --section-py: 80px;
    --container-max: 1140px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--gray-700); line-height: 1.7; background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

/* ── HEADER ── */
.header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: transparent; transition: background 0.4s ease, box-shadow 0.4s ease; border-bottom: 1px solid rgba(255,255,255,0.08); }
.header.scrolled { background: var(--navy-dark); box-shadow: 0 2px 20px rgba(0,0,0,0.3); }
.n-container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo-text { color: var(--white); font-family: var(--font-heading); font-size: 1.25rem; font-weight: 500; }
.logo-text strong { font-weight: 700; }
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-list { display: flex; gap: 4px; }
.nav-link { color: rgba(255,255,255,0.8); font-size: 0.875rem; font-weight: 500; padding: 8px 14px; border-radius: var(--radius-sm); transition: var(--transition); }
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-cta-wrapper { margin-left: 12px; }
.mobile-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.75rem; cursor: pointer; }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-heading); font-weight: 600; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); text-decoration: none; line-height: 1; }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-primary { background: var(--blue-accent); color: var(--white); }
.btn-primary:hover { background: var(--blue-bright); transform: translateY(-1px); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #20bd5a; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.4); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

/* ── HERO — VIDEO ── */
.hero { position: relative; min-height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 140px 24px 80px; overflow: hidden; }
.hero-video-wrap { position: absolute; inset: 0; z-index: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,78,158,0.82) 0%, rgba(13,27,62,0.88) 60%, rgba(8,15,36,0.95) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 800px; }

.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,0.5); font-size: 0.8125rem; margin-bottom: 24px; }
.breadcrumb a { color: rgba(255,255,255,0.6); transition: var(--transition); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { color: rgba(255,255,255,0.9); font-weight: 500; }
.breadcrumb i { font-size: 0.625rem; }

.hero-title { font-family: var(--font-heading); font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; color: var(--white); line-height: 1.15; margin-bottom: 20px; }
.hero-subtitle { color: rgba(255,255,255,0.75); font-size: 1.0625rem; line-height: 1.7; max-width: 680px; margin: 0 auto 36px; }

.hero-stats { display: inline-flex; align-items: stretch; border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-lg); overflow: hidden; background: rgba(255,255,255,0.06); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin-bottom: 36px; }
.hero-stat { padding: 18px 36px; text-align: center; }
.hero-stat + .hero-stat { border-left: 1px solid rgba(255,255,255,0.15); }
.hero-stat-number { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 800; color: var(--white); line-height: 1; margin-bottom: 4px; }
.hero-stat-label { color: rgba(255,255,255,0.6); font-size: 0.8125rem; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── SECTIONS ── */
.section { padding: var(--section-py) 0; }
.section-alt { background: var(--gray-50); }

.section-tag { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--blue); font-size: 0.75rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-heading); }
.section-tag::before, .section-tag::after { content: ''; width: 28px; height: 2px; background: var(--blue); border-radius: 2px; }
.section-tag-light { color: rgba(255,255,255,0.7); }
.section-tag-light::before, .section-tag-light::after { background: rgba(255,255,255,0.3); }

.section-title { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; color: var(--navy); line-height: 1.2; margin-bottom: 16px; }
.text-white { color: var(--white) !important; }
.text-white-70 { color: rgba(255,255,255,.7) !important; }
.section-desc { color: var(--gray-500); font-size: 1rem; max-width: 640px; margin: 0 auto 48px; line-height: 1.7; }
.text-center { text-align: center; }

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-text p { color: var(--gray-600); font-size: 0.9375rem; line-height: 1.8; margin-bottom: 16px; text-align: justify; }
.about-text strong { color: var(--navy); font-weight: 600; }
.about-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }

/* ── PROCEDURES ── */
.procedure-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.procedure-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 24px; transition: var(--transition); }
.procedure-card:hover { border-color: var(--blue-accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.procedure-card-header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.procedure-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue-accent); flex-shrink: 0; margin-top: 6px; }
.procedure-card h3 { font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 700; color: var(--navy); line-height: 1.3; }
.procedure-card p { color: var(--gray-500); font-size: 0.8125rem; line-height: 1.6; padding-left: 20px; }

/* ── POR QUÉ ELEGIRNOS — imagen fondo + filtro azul ── */
.section-porque { position: relative; padding: var(--section-py) 0; overflow: hidden; }
.porque-bg { position: absolute; inset: 0; z-index: 0; }
.porque-bg img { width: 100%; height: 100%; object-fit: cover; }
.porque-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,78,158,0.88) 0%, rgba(13,27,62,0.92) 50%, rgba(8,15,36,0.96) 100%); }
.porque-content { position: relative; z-index: 2; }

.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-md); padding: 32px 28px; transition: var(--transition); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.why-card:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.25); transform: translateY(-3px); }
.why-card-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); background: rgba(41,128,185,0.25); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.why-card-icon i { font-size: 1.5rem; color: var(--blue-accent); }
.why-card h3 { font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.why-card p { color: rgba(255,255,255,0.65); font-size: 0.875rem; line-height: 1.7; }

/* ── SERVICES ── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 28px 24px; transition: var(--transition); text-align: center; }
.service-card:hover { border-color: var(--blue-accent); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.service-card.active { border-color: var(--blue-accent); background: linear-gradient(135deg, #eef6ff, #e8f0fe); }
.service-card-icon { width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--gray-50); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; transition: var(--transition); }
.service-card:hover .service-card-icon { background: var(--blue-accent); }
.service-card-icon i { font-size: 1.5rem; color: var(--blue-accent); transition: var(--transition); }
.service-card:hover .service-card-icon i { color: var(--white); }
.service-card h3 { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.service-card p { color: var(--gray-500); font-size: 0.8125rem; line-height: 1.6; margin-bottom: 12px; }
.service-link { color: var(--blue-accent); font-size: 0.8125rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; transition: var(--transition); }
.service-link:hover { gap: 8px; }

/* ── PROCESS ── */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.process-grid::before { content: ''; position: absolute; top: 28px; left: 12.5%; right: 12.5%; height: 2px; background: var(--gray-200); }
.process-step { text-align: center; position: relative; }
.process-number { width: 56px; height: 56px; border-radius: 50%; background: var(--blue-accent); color: var(--white); font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; position: relative; z-index: 2; box-shadow: 0 4px 12px rgba(41,128,185,0.25); }
.process-step h3 { font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.process-step p { color: var(--gray-500); font-size: 0.8125rem; line-height: 1.6; max-width: 220px; margin: 0 auto; }
.prep-list { list-style: none; padding: 0; margin: 0 auto; max-width: 280px; text-align: left; }
.prep-list li { color: var(--gray-500); font-size: 0.8125rem; line-height: 1.6; margin-bottom: 8px; padding-left: 14px; position: relative; }
.prep-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-accent); }
.prep-list li strong { color: var(--navy); font-weight: 600; }

/* ── STATS ── */
.stats-section { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat-item { padding: 16px; }
.stat-number { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; color: var(--white); line-height: 1; margin-bottom: 6px; }
.stat-label { color: rgba(255,255,255,0.6); font-size: 0.875rem; }

/* ── TESTIMONIALS ── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 28px; transition: var(--transition); }
.testimonial-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.testimonial-stars { color: #f59e0b; font-size: 0.875rem; margin-bottom: 12px; display: flex; gap: 2px; }
.testimonial-card > p { color: var(--gray-600); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 20px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-accent); color: var(--white); font-family: var(--font-heading); font-weight: 700; font-size: 0.9375rem; display: flex; align-items: center; justify-content: center; }
.testimonial-info strong { display: block; color: var(--navy); font-size: 0.875rem; }
.testimonial-info span { color: var(--gray-400); font-size: 0.75rem; }

/* ═══ FAQ — TARJETAS CON ICONO LATERAL ═══ */
.faq-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 960px; margin: 0 auto; }
.faq-card { display: flex; gap: 20px; align-items: flex-start; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 28px 24px; transition: var(--transition); }
.faq-card:hover { border-color: var(--blue-accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.faq-card-icon { width: 48px; height: 48px; min-width: 48px; border-radius: var(--radius-sm); background: linear-gradient(135deg, rgba(3,78,158,0.08), rgba(41,128,185,0.12)); display: flex; align-items: center; justify-content: center; }
.faq-card-icon i { font-size: 1.375rem; color: var(--blue); }
.faq-card-body h3 { font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.35; }
.faq-card-body p { color: var(--gray-600); font-size: 0.8125rem; line-height: 1.7; }
.faq-card-body strong { color: var(--navy); font-weight: 600; }

/* ── CTA ── */
.cta-section { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); padding: 64px 0; text-align: center; }
.cta-content { max-width: 640px; margin: 0 auto; }
.cta-section h2 { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--white); margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.7); font-size: 1rem; margin-bottom: 32px; line-height: 1.7; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.cta-address { color: rgba(255,255,255,0.5); font-size: 0.8125rem; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cta-address i { color: rgba(255,255,255,0.4); }

/* ── FOOTER ── */
.footer { background: var(--navy-dark); padding: 56px 0 0; color: rgba(255,255,255,0.6); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-col h4 { font-family: var(--font-heading); font-size: 0.8125rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,0.5); font-size: 0.8125rem; transition: var(--transition); }
.footer-col ul a:hover { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,0.45); font-size: 0.8125rem; line-height: 1.7; margin-bottom: 16px; }
.footer-contact p { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.5); font-size: 0.8125rem; margin-bottom: 8px; }
.footer-contact i { color: var(--blue-accent); font-size: 1rem; }
.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.footer-socials a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); font-size: 1rem; transition: var(--transition); }
.footer-socials a:hover { background: var(--blue-accent); border-color: var(--blue-accent); color: var(--white); }
.footer-bottom { padding: 20px 0; text-align: center; font-size: 0.75rem; color: rgba(255,255,255,0.3); }

/* ── FAB + SCROLL TOP ── */
.fab-whatsapp { position: fixed; bottom: 24px; right: 24px; z-index: 999; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.75rem; box-shadow: 0 4px 16px rgba(37,211,102,0.4); transition: var(--transition); animation: pulse-fab 2s infinite; }
.fab-whatsapp:hover { transform: scale(1.1); }
@keyframes pulse-fab { 0%, 100% { box-shadow: 0 4px 16px rgba(37,211,102,0.4); } 50% { box-shadow: 0 4px 28px rgba(37,211,102,0.6); } }

.scroll-top { position: fixed; bottom: 90px; right: 24px; z-index: 998; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; border: 1px solid rgba(255,255,255,0.15); cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition); }
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--blue-accent); }

/* ── ANIMATIONS ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .procedure-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    :root { --section-py: 56px; }
    .mobile-toggle { display: flex; }
    .nav-menu { position: fixed; top: 70px; left: 0; width: 100%; background: var(--navy-dark); flex-direction: column; padding: 20px; transform: translateY(-110%); transition: var(--transition); border-top: 1px solid rgba(255,255,255,0.08); }
    .nav-menu.open { transform: translateY(0); }
    .nav-list { flex-direction: column; width: 100%; }
    .nav-link { display: block; padding: 12px 16px; }
    .nav-cta-wrapper { margin-left: 0; margin-top: 12px; width: 100%; }
    .nav-cta-wrapper .btn { width: 100%; }
    .hero { min-height: 480px; padding: 120px 20px 60px; }
    .hero-stats { flex-direction: column; }
    .hero-stat + .hero-stat { border-left: none; border-top: 1px solid rgba(255,255,255,0.15); }
    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .procedure-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr 1fr; }
    .process-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .process-grid::before { display: none; }
    .stats-grid { grid-template-columns: 1fr; gap: 16px; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .faq-cards { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .hero { padding: 110px 16px 48px; }
    .hero-title { font-size: 1.75rem; }
    .hero-stats { width: 100%; }
    .hero-stat { padding: 14px 20px; }
    .hero-ctas { flex-direction: column; }
    .hero-ctas .btn { width: 100%; }
    .procedure-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .process-grid { grid-template-columns: 1fr; }
    .cta-buttons { flex-direction: column; }
    .cta-buttons .btn { width: 100%; }
    .faq-card { flex-direction: column; gap: 14px; }
}
