:root {
  --primary: #502369;
  --primary-dark: #2b1238;
  --primary-soft: #f4ecf8;
  --accent: #8f5cab;
  --dark: #151515;
  --text: #464646;
  --muted: #6b6b6b;
  --light: #faf7fb;
  --white: #ffffff;
  --border: #eadff0;
  --shadow: 0 18px 45px rgba(80, 35, 105, 0.13);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; color: var(--text); background: #fff; line-height: 1.6; }
a { color: inherit; text-decoration: none; }

.top-strip { background: var(--primary-dark); color: #fff; padding: 10px 20px; font-size: 14px; }
.top-strip .inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.top-strip strong { color: #f1d9ff; }

.nav { background: rgba(255,255,255,0.94); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; backdrop-filter: blur(12px); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; color: var(--primary-dark); font-size: 22px; }
.brand-mark { width: 46px; height: 46px; border-radius: 16px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; box-shadow: 0 12px 28px rgba(80,35,105,0.25); }
.nav-links { display: flex; gap: 22px; align-items: center; font-weight: 700; color: var(--dark); font-size: 14px; }
.nav-links a:hover { color: var(--primary); }

.mobile-toggle {
  display: none;
  background: var(--primary);
  color: #ffffff;
  border: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
}

.mobile-btn {
  display: none;
}

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 22px; border-radius: 999px; font-weight: 800; transition: 0.2s ease; text-align: center; border: none; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 16px 32px rgba(80,35,105,0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 42px rgba(80,35,105,0.32); color: #fff; }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #e6d7ee; }

.hero { padding: 82px 20px 72px; background: radial-gradient(circle at 8% 2%, rgba(143,92,171,0.22), transparent 25%), radial-gradient(circle at 95% 5%, rgba(143,92,171,0.14), transparent 25%), #fff; }
.container { max-width: 1180px; margin: 0 auto; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; }
.eyebrow { display: inline-flex; padding: 9px 15px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 20px; }
.hero h1 { color: var(--dark); font-size: 56px; line-height: 1.05; letter-spacing: -1.6px; margin-bottom: 22px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 19px; max-width: 680px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.trust-item { background: rgba(255,255,255,0.82); border: 1px solid var(--border); border-radius: 18px; padding: 16px; box-shadow: 0 10px 24px rgba(80,35,105,0.06); }
.trust-item strong { display: block; color: var(--dark); font-size: 18px; margin-bottom: 3px; }
.trust-item span { color: var(--muted); font-size: 14px; }

.hero-card { background: linear-gradient(145deg, rgba(6,73,77,0.92), rgba(80,35,105,0.78)), url('https://images.unsplash.com/photo-1579165466741-7f35e4755660?auto=format&fit=crop&w=1200&q=80'); background-size: cover; background-position: center; min-height: 540px; border-radius: 34px; box-shadow: var(--shadow); position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.hero-card-content { width: 100%; color: #fff; padding: 34px; background: linear-gradient(transparent, rgba(0,0,0,0.58)); }
.hero-card-content h2 { font-size: 30px; line-height: 1.18; margin-bottom: 10px; }
.hero-card-content p { color: #fbf5ff; margin-bottom: 0; font-size: 16px; }
.floating-panel { position: absolute; top: 28px; right: 28px; background: #fff; color: var(--dark); border-radius: 20px; padding: 18px; width: 220px; box-shadow: 0 18px 38px rgba(0,0,0,0.18); }
.floating-panel small { color: var(--primary); font-weight: 900; text-transform: uppercase; display: block; margin-bottom: 6px; }
.floating-panel strong { font-size: 22px; line-height: 1.1; display: block; }

.section { padding: 78px 20px; }
.section-soft { background: var(--light); }
.section-white { background: #fff; }
.section-dark { background: radial-gradient(circle at top left, rgba(143,92,171,0.16), transparent 30%), linear-gradient(135deg, var(--primary-dark), #102d36); color: #fff; }
.section-title { max-width: 820px; margin: 0 auto 46px; text-align: center; }
.section-title h2 { color: var(--dark); font-size: 40px; line-height: 1.15; letter-spacing: -0.8px; margin-bottom: 14px; }
.section-title p { color: var(--muted); font-size: 18px; }
.section-dark .section-title h2 { color: #fff; }
.section-dark .section-title p { color: #f1d9ff; }

.services-grid { column-count: 3; column-gap: 20px; display: block; }
.services-grid > a, .services-grid > div { display: block; break-inside: avoid; margin-bottom: 20px; }
.service-card { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 26px; box-shadow: 0 12px 30px rgba(80,35,105,0.07); transition: 0.22s ease; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 22px 45px rgba(80,35,105,0.12); }
.service-icon { width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; margin-bottom: 18px; }
.service-card h3 { color: var(--dark); font-size: 21px; margin-bottom: 9px; }
.service-card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; flex-grow: 1; }
.service-card a { color: var(--primary); font-weight: 900; font-size: 14px; }

.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 42px; align-items: center; }
.about-image { min-height: 470px; border-radius: 32px; background: linear-gradient(rgba(80,35,105,0.15), rgba(6,73,77,0.42)), url('../img/laboratorio-merino-buenos-aires-estudios-clinicos.png?auto=format&fit=crop&w=1200&q=80'); background-size: cover; background-position: center; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.about-badge { position: absolute; left: 24px; bottom: 24px; right: 24px; background: rgba(255,255,255,0.94); border-radius: 22px; padding: 22px; color: var(--dark); box-shadow: 0 16px 34px rgba(0,0,0,0.16); }
.about-badge strong { color: var(--primary); font-size: 30px; display: block; line-height: 1; margin-bottom: 6px; }
.about-content h2 { color: var(--dark); font-size: 40px; line-height: 1.15; margin-bottom: 18px; }
.about-content p { margin-bottom: 14px; font-size: 17px; }
.feature-list { list-style: none; display: grid; gap: 12px; margin: 24px 0; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; }
.check { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; }

.branches-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.branch-card { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: 28px; padding: 30px; box-shadow: 0 18px 45px rgba(0,0,0,0.16); }
.branch-card h3 { font-size: 28px; margin-bottom: 16px; color: #fff; }
.branch-info { display: grid; gap: 12px; margin-bottom: 22px; }
.branch-info div { display: flex; gap: 10px; align-items: flex-start; color: #f1d9ff; }

.areas-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: start; }
.areas-intro { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-radius: 30px; padding: 34px; box-shadow: var(--shadow); }
.areas-intro h2 { font-size: 34px; line-height: 1.15; margin-bottom: 14px; }
.areas-intro p { color: #fbf5ff; margin-bottom: 22px; }
.localities { display: flex; flex-wrap: wrap; gap: 10px; }
.localities a { background: #fff; color: var(--primary-dark); border: 1px solid var(--border); border-radius: 999px; padding: 10px 15px; font-weight: 800; font-size: 14px; box-shadow: 0 8px 20px rgba(80,35,105,0.05); transition: 0.18s ease; }
.localities a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

.seo-grid, .patient-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.seo-card, .patient-card { background: #fff; border-radius: 24px; padding: 28px; box-shadow: 0 12px 30px rgba(80,35,105,0.07); border: 1px solid var(--border); }
.seo-card h3, .patient-card h3 { color: var(--dark); margin-bottom: 9px; font-size: 21px; }
.patient-number { width: 50px; height: 50px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; margin-bottom: 18px; }

.cta-box { background: radial-gradient(circle at right, rgba(143,92,171,0.24), transparent 28%), linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; border-radius: 34px; padding: 46px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; box-shadow: var(--shadow); }
.cta-box h2 { font-size: 36px; line-height: 1.15; margin-bottom: 10px; }
.cta-box p { color: #fbf5ff; font-size: 18px; }

.footer { background: #111111; color: #d6eeee; padding: 44px 20px 30px; }
.footer-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr 0.9fr; gap: 28px; }
.footer h3 { color: #fff; margin-bottom: 12px; }
.footer p, .footer a { color: #d6c9dc; font-size: 15px; }
.footer-links { display: grid; gap: 8px; }
.copyright { max-width: 1180px; margin: 32px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); color: #bda9c8; font-size: 14px; text-align: center; }
.floating-whatsapp { position: fixed; right: 20px; bottom: 20px; z-index: 80; background: #25d366; color: #fff; padding: 15px 20px; border-radius: 999px; font-weight: 900; box-shadow: 0 16px 36px rgba(0,0,0,0.24); }

.accreditation-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 38px; align-items: center; }
.certificate-card { background: #ffffff; border: 1px solid var(--border); border-radius: 30px; padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.certificate-card img { width: 100%; display: block; border-radius: 20px; }
.accreditation-content { background: #ffffff; border: 1px solid var(--border); border-radius: 30px; padding: 36px; box-shadow: 0 12px 30px rgba(80,35,105,0.08); }
.accreditation-content h2 { color: var(--dark); font-size: 40px; line-height: 1.15; margin-bottom: 16px; }
.accreditation-content p { color: var(--text); font-size: 17px; margin-bottom: 14px; }
.accreditation-points { display: grid; gap: 14px; margin-top: 24px; }
.accreditation-point { display: flex; gap: 12px; align-items: flex-start; background: var(--primary-soft); border: 1px solid var(--border); border-radius: 18px; padding: 16px; color: var(--dark); }
.accreditation-point strong { display: block; color: var(--primary); margin-bottom: 3px; }

/* Breadcrumbs */
.breadcrumb-container { background: #f8fafc; padding: 1rem 0; border-bottom: 1px solid #e2e8f0; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: #64748b; }
.breadcrumbs a { color: var(--primary); font-weight: 600; }
.breadcrumbs .separator { font-size: 0.7rem; opacity: 0.5; }

/* Responsive Headings & Layouts */
.page-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--dark);
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.sidebar-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.card {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* SEO Links Grid (3 columns) */
.seo-links-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 16px; 
    margin-top: 32px; 
}

@media (max-width: 980px) {
    .seo-links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .seo-links-grid { grid-template-columns: 1fr; }
}

.seo-link-card { 
    background: #fff; 
    border: 1px solid var(--border); 
    padding: 18px; 
    border-radius: 18px; 
    font-size: 0.95rem; 
    color: var(--text); 
    transition: 0.22s ease; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    box-shadow: 0 4px 12px rgba(80,35,105,0.04);
}

.seo-link-card:hover { 
    border-color: var(--primary); 
    color: var(--primary); 
    transform: translateY(-3px); 
    box-shadow: 0 12px 28px rgba(80,35,105,0.08); 
}

@media (max-width: 980px) {
  .hero-grid, .about-grid, .areas-wrap, .cta-box, .accreditation-grid { grid-template-columns: 1fr; }
  .desktop-btn { display: none; }
  .mobile-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 86px;
    left: 20px;
    right: 20px;
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
    border: 1px solid var(--border);
    gap: 18px;
  }
  .nav-links.active { display: flex; }
  .mobile-btn { display: inline-flex; width: 100%; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #ffffff; padding: 14px 18px; border-radius: 999px; font-weight: 800; }
  .hero h1 { font-size: 42px; }
  .page-title { font-size: 2.6rem; letter-spacing: -1px; }
  .sidebar-layout { grid-template-columns: 1fr; gap: 2rem; }
  .services-grid { column-count: 2; }
  .branches-grid, .seo-grid, .patient-grid, .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hero { padding: 58px 18px; }
  .hero h1 { font-size: 30px; }
  .hero p, .section-title p { font-size: 16px; }
  .trust-row { grid-template-columns: 1fr; }
  .services-grid { column-count: 1; }
  .section { padding: 56px 18px; }
  .section-title h2, .about-content h2, .areas-intro h2, .cta-box h2 { font-size: 26px; }
  .hero-card { min-height: 420px; flex-direction: column; justify-content: space-between; align-items: stretch; }
  .floating-panel { position: relative; top: auto; right: auto; margin: 18px; width: auto; }
  .btn { width: 100%; }
  .floating-whatsapp { left: 18px; right: 18px; text-align: center; }
  .page-title { font-size: 2.0rem; letter-spacing: -0.5px; }
  .card { padding: 1.5rem; }
}

/* Editor Output Helpers (Columns) */
.editor-row { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 2rem; }
.editor-col { flex: 1; min-width: 280px; }

/* Rich Content */
.rich-content img { max-width: 100%; height: auto; border-radius: 12px; }
.rich-content iframe { max-width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; display: block; margin: 1.5rem auto; border: none; }
.rich-content h1, .rich-content h2, .rich-content h3 { margin-top: 1.5rem; margin-bottom: 1rem; color: var(--dark); }
.rich-content p { margin-bottom: 1rem; }
.rich-content ul, .rich-content ol { margin-left: 1.5rem; margin-bottom: 1rem; }
