/* Pangi — directorio y ficha de doctores. Réplica del look de la app Pangi.
   Paleta real (styles bundle): verde #8ac43f, navy #1b1d4b, azul #3b82f6. */
:root {
    --pg-green: #8ac43f;
    --pg-green-d: #76ad33;
    --pg-navy: #1b1d4b;
    --pg-blue: #3b82f6;
    --pg-blue-d: #1d4ed8;
    --pg-text: #495057;
    --pg-muted: #6c757d;
    --pg-line: #e9ecef;
    --pg-line2: #dee2e6;
    --pg-bg: #f8f9fa;
    --pg-hero: #edeffb;
    --pg-badge: #eff6ff;
    --pg-r: 12px;
    --pg-font: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}
.pangi-app, .pangi-single {
    font-family: var(--pg-font); color: var(--pg-text); max-width: 1180px;
    margin: 0 auto; padding: 0 18px; font-size: 15px; line-height: 1.5;
}
.pangi-app .muted, .pangi-single .muted { color: var(--pg-muted); }

/* ---------- Iconos (máscaras SVG, color = currentColor) ---------- */
[class^="pangi-ico-"] { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.18em;
    background-color: currentColor; -webkit-mask: center/contain no-repeat; mask: center/contain no-repeat; }
.pangi-ico-pin   { color: var(--pg-blue); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.pangi-ico-steth { color: var(--pg-blue); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3v6a5 5 0 0010 0V3'/%3E%3Cpath d='M14 14a5 5 0 005 5 3 3 0 003-3v-3'/%3E%3Ccircle cx='20' cy='10' r='2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3v6a5 5 0 0010 0V3'/%3E%3Cpath d='M14 14a5 5 0 005 5 3 3 0 003-3v-3'/%3E%3Ccircle cx='20' cy='10' r='2'/%3E%3C/svg%3E"); }
.pangi-ico-mail  { color: var(--pg-green-d); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E"); }
.pangi-ico-person, .pangi-ico-user { color: var(--pg-blue); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
.pangi-ico-video { color: var(--pg-blue); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3Cpath d='m22 8-6 4 6 4V8z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3Cpath d='m22 8-6 4 6 4V8z'/%3E%3C/svg%3E"); }
.pangi-ico-map, .pangi-ico-docs { color: var(--pg-green-d); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3 3 6v15l6-3 6 3 6-3V3l-6 3-6-3z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3 3 6v15l6-3 6 3 6-3V3l-6 3-6-3z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E"); }
.pangi-ico-gallery { color: var(--pg-green-d); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E"); }
.pangi-ico-hosp { color: var(--pg-blue); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M12 9v4M10 11h4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M12 9v4M10 11h4'/%3E%3C/svg%3E"); }
.pangi-ico-faq { color: var(--pg-green-d); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z'/%3E%3C/svg%3E"); }

/* ---------- Filtros ---------- */
.pangi-filters { margin: 14px 0; }
.pangi-filters__inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.pangi-fld select, .pangi-sort select {
    width: 100%; padding: 11px 14px; border: 1px solid var(--pg-line2); border-radius: 10px;
    background: #fff; color: var(--pg-text); font-size: 14px; font-family: inherit; cursor: pointer;
    appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
}
.pangi-fld select:focus, .pangi-sort select:focus { outline: none; border-color: var(--pg-green); }

/* ---------- Hero ---------- */
.pangi-hero { background: var(--pg-hero); border-radius: var(--pg-r); margin: 8px 0 0; }
.pangi-hero__inner { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px; flex-wrap: wrap; gap: 12px; }
.pangi-hero h1 { margin: 0; color: var(--pg-navy); font-size: 30px; font-weight: 800; }
.pangi-hero__count { background: #fff; border: 1px solid var(--pg-line2); border-radius: 30px; padding: 8px 16px; font-weight: 600; color: var(--pg-navy); }

/* ---------- Toolbar ---------- */
.pangi-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 6px; flex-wrap: wrap; gap: 10px; }
.pangi-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--pg-muted); font-size: 14px; }
.pangi-sort select { min-width: 190px; }
.pangi-showmap { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--pg-line2);
    color: var(--pg-green-d); font-weight: 600; padding: 10px 18px; border-radius: 10px; cursor: pointer; font-family: inherit; }
.pangi-showmap.is-on, .pangi-showmap:hover { background: #f3f9ec; border-color: var(--pg-green); }

/* ---------- Tarjeta de doctor ---------- */
.pangi-list { display: flex; flex-direction: column; gap: 18px; margin: 18px 0; transition: opacity .2s; }
.pangi-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; background: #fff;
    border: 1px solid var(--pg-line); border-radius: var(--pg-r); padding: 22px 24px; }
.pangi-card__left { display: flex; gap: 18px; }
.pangi-card__photo { flex: 0 0 auto; }
.pangi-card__photo .pangi-av, .pangi-card__photo img {
    width: 120px !important; height: 120px !important; max-width: 120px; border-radius: 50% !important;
    object-fit: cover; object-position: center top; display: block; aspect-ratio: 1 / 1; }
.pangi-av--ph { display: flex; align-items: center; justify-content: center; background: var(--pg-navy); color: #fff; font-size: 44px; font-weight: 700; }
.pangi-card__gender { color: var(--pg-muted); font-size: 13px; }
.pangi-card__info h3 { margin: 2px 0 2px; font-size: 21px; color: var(--pg-navy); font-weight: 700; }
.pangi-card__info h3 a { color: inherit; text-decoration: none; }
.pangi-card__title { margin: 0 0 10px; color: var(--pg-text); }
.pangi-card__rating { margin: 0 0 8px; font-weight: 600; color: var(--pg-navy); }
.pangi-card__coll, .pangi-card__loc { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--pg-text); }
.pangi-card__right h4 { margin: 0 0 12px; color: var(--pg-navy); font-size: 16px; font-weight: 700; }
.pangi-appt-modes { display: flex; gap: 10px; margin-bottom: 14px; }
.pangi-mode { display: inline-flex; align-items: center; gap: 6px; background: var(--pg-badge); color: var(--pg-blue-d);
    border-radius: 30px; padding: 6px 14px; font-size: 13px; font-weight: 500; }
.pangi-mode.is-off { opacity: .4; filter: grayscale(1); }
.pangi-card__estimate { display: inline-flex; align-items: flex-start; gap: 8px; color: var(--pg-green-d);
    text-decoration: none; font-weight: 500; line-height: 1.4; }
.pangi-card__estimate:hover { text-decoration: underline; }
.pangi-card__gallery { margin-top: 16px; }
.pangi-card__gallery h5 { margin: 0 0 8px; color: var(--pg-navy); font-size: 15px; font-weight: 700; }
.pangi-gal-thumbs { display: flex; gap: 8px; }
.pangi-gal-thumbs img { width: 96px; height: 84px; object-fit: cover; border-radius: 8px; }

/* ---------- Paginación ---------- */
.pangi-pagination { display: flex; justify-content: center; gap: 6px; margin: 24px 0; flex-wrap: wrap; }
.pangi-pg { min-width: 38px; height: 38px; border: 1px solid var(--pg-line2); background: #fff; border-radius: 8px;
    color: var(--pg-navy); cursor: pointer; font-family: inherit; font-weight: 600; }
.pangi-pg.is-current, .pangi-pg:hover { background: var(--pg-green); border-color: var(--pg-green); color: #fff; }
.pangi-pg-ellip { padding: 0 6px; color: var(--pg-muted); align-self: center; }
.pangi-loading { text-align: center; padding: 20px; }
.pangi-spinner { width: 28px; height: 28px; border: 3px solid var(--pg-line2); border-top-color: var(--pg-green);
    border-radius: 50%; display: inline-block; animation: pangi-spin .8s linear infinite; }
@keyframes pangi-spin { to { transform: rotate(360deg); } }
.pangi-noresults { text-align: center; color: var(--pg-muted); padding: 50px 0; }

/* ============================ FICHA (single) ============================ */
.pangi-single { margin: 18px auto 50px; }
.pangi-breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--pg-muted); font-size: 13px; margin-bottom: 16px; }
.pangi-breadcrumb a { color: var(--pg-muted); text-decoration: none; }
.pangi-breadcrumb a:hover { color: var(--pg-green-d); }
.pangi-breadcrumb .current { color: var(--pg-navy); font-weight: 600; }
.pangi-single__grid { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; }
.pangi-prof-head { display: flex; gap: 22px; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-r); padding: 24px; }
.pangi-prof-photo { flex: 0 0 auto; }
.pangi-prof-photo .pangi-av, .pangi-prof-photo img {
    width: 96px !important; height: 96px !important; max-width: 96px; border-radius: 50% !important;
    object-fit: cover; object-position: center top; display: block; aspect-ratio: 1 / 1; }
.pangi-prof-meta h1 { margin: 0 0 2px; color: var(--pg-navy); font-size: 26px; font-weight: 800; }
.pangi-prof-title { margin: 0 0 14px; color: var(--pg-text); }
.pangi-prof-clinic { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--pg-line); }
.pangi-prof-clinic > div { flex: 1; }
.pangi-prof-clinic strong { color: var(--pg-blue-d); font-weight: 600; }
.pangi-dist { background: #f1fbf5; color: var(--pg-green-d); border: 1px solid #cdeccd; border-radius: 20px; padding: 4px 12px; font-size: 13px; white-space: nowrap; }
.pangi-estimate-bar { display: flex; align-items: center; gap: 10px; background: var(--pg-hero); color: var(--pg-navy);
    text-decoration: none; padding: 16px 20px; border-radius: var(--pg-r); margin: 18px 0; font-weight: 600; }

/* Tabs */
.pangi-tabs__nav { display: flex; gap: 6px; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-r);
    padding: 8px; overflow-x: auto; }
.pangi-tab { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 110px;
    background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; box-shadow: none;
    -webkit-appearance: none; appearance: none; padding: 12px 8px; cursor: pointer; color: var(--pg-muted);
    font-family: inherit; font-size: 13px; font-weight: 600; transition: color .15s, border-color .15s; }
.pangi-tab:hover { color: var(--pg-green-d); }
.pangi-tab:focus, .pangi-tab:focus-visible, .pangi-tab:active { outline: 0 !important; box-shadow: none !important; }
.pangi-tab.is-active { color: var(--pg-green-d); border-bottom-color: var(--pg-green); background: transparent; }
/* Los iconos de los tabs siguen el color del tab (gris inactivo / verde activo). */
.pangi-tab [class^="pangi-ico-"] { color: inherit; width: 1.25em; height: 1.25em; }
.pangi-pane { display: none; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-r); padding: 26px; margin-top: 16px; }
.pangi-pane.is-active { display: block; }
.pangi-pane h2 { margin: 0 0 16px; color: var(--pg-navy); font-size: 22px; font-weight: 800; }
.pangi-prof-facts { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 8px 24px; }
.pangi-prof-facts strong { color: var(--pg-navy); }
.pangi-prof-bio { line-height: 1.7; }

/* Galería */
.pangi-gallery { display: flex; flex-direction: column; gap: 16px; }
.pangi-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pangi-ba figure { margin: 0; position: relative; }
.pangi-ba img { width: 100%; height: 280px; object-fit: cover; border-radius: 8px; display: block; }
.pangi-ba figcaption { position: absolute; top: 10px; left: 10px; background: rgba(27,29,75,.8); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 20px; }

/* Testimonios */
.pangi-testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 16px; }
.pangi-testimonials blockquote { margin: 0; background: var(--pg-bg); border-left: 3px solid var(--pg-green); border-radius: 8px; padding: 16px 18px; }
.pangi-testimonials .stars { color: #f5a623; }
.pangi-testimonials p { margin: 6px 0; font-style: italic; }
.pangi-testimonials cite { color: var(--pg-muted); font-size: 13px; }

/* Hospitales */
.pangi-hospitals { list-style: none; padding: 0; margin: 0; }
.pangi-hospitals li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--pg-line); }

/* FAQs */
.pangi-faqs { display: flex; flex-direction: column; gap: 10px; }
.pangi-faq { border: 1px solid var(--pg-line); border-radius: 10px; padding: 4px 16px; }
.pangi-faq summary { cursor: pointer; font-weight: 600; color: var(--pg-navy); padding: 12px 0; list-style: none; }
.pangi-faq summary::-webkit-details-marker { display: none; }
.pangi-faq summary::before { content: "+"; color: var(--pg-green-d); font-weight: 700; margin-right: 10px; }
.pangi-faq[open] summary::before { content: "–"; }
.pangi-faq__a { padding: 0 0 14px; line-height: 1.6; }

/* Sidebar cita */
.pangi-appt-box { background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-r); padding: 22px; position: sticky; top: 20px; }
.pangi-appt-box h3 { margin: 0 0 16px; color: var(--pg-navy); font-size: 20px; font-weight: 800; }
.pangi-appt-fld { display: block; margin: 14px 0; }
.pangi-appt-fld > span { display: block; font-size: 13px; color: var(--pg-muted); margin-bottom: 6px; }
.pangi-appt-fld select { width: 100%; padding: 11px 14px; border: 1px solid var(--pg-line2); border-radius: 10px; background: #fff; font-family: inherit; color: var(--pg-text); }
.pangi-btn { display: block; text-align: center; background: var(--pg-green); color: #fff; text-decoration: none;
    padding: 13px; border-radius: 10px; font-weight: 700; margin-top: 16px; transition: background .15s; }
.pangi-btn:hover { background: var(--pg-green-d); color: #fff; }

/* Responsive */
@media (max-width: 900px) {
    .pangi-filters__inner { grid-template-columns: repeat(2, 1fr); }
    .pangi-card { grid-template-columns: 1fr; }
    .pangi-single__grid { grid-template-columns: 1fr; }
    .pangi-appt-box { position: static; }
}
@media (max-width: 560px) {
    .pangi-filters__inner { grid-template-columns: 1fr; }
    .pangi-card__left { flex-direction: column; }
    .pangi-hero h1 { font-size: 24px; }
    .pangi-ba img { height: 200px; }
}
