/* ==========================================================================
   Doktopia — hoja de estilos del sitio público (inicio, directorio y perfiles)
   El panel y la reserva usan app.css; esta hoja es solo para las vistas de
   resources/views/sitio. Reglas: sin estilos inline ni <style> en Blade y solo
   los 5 tamaños de tipografía de Variables (--fs-xs … --fs-xl).
   Estilo: tarjetas blancas redondeadas sobre fondo gris claro, detalles en negro.
   Secciones: Variables · Reset · Layout · Tipografía · Botones · Tarjetas ·
   Portada del médico · Servicios · Tablas · Chips · Consultorio · Médicos
   relacionados · Cabecera e inicio · Directorio · Pie · Responsive
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap");

/* ---------- Variables ---------- */
:root {
    /* Tipografía: únicos tamaños permitidos */
    --fs-xs: 12px;
    --fs-sm: 14px;
    --fs-md: 17px;
    --fs-lg: 22px;
    --fs-xl: 34px;

    --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Colores: grises y negro */
    --bg: #eef1f3;
    --card: #ffffff;
    --tile: #f1f3f6;
    --tile-hover: #e9ecf0;
    --line: #e3e7ec;
    --ink: #111317;
    --text: #23262d;
    --muted: #8a919c;
    --faint: #b8bec7;
    --urgencia: #b4472d;

    /* Forma */
    --radius-lg: 22px;
    --radius-md: 14px;
    --pill: 999px;
    --shadow: 0 1px 2px rgba(17, 19, 23, 0.04), 0 10px 30px rgba(17, 19, 23, 0.05);
}

/* ---------- Reset ---------- */
* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: var(--fs-sm);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body > main {
    flex: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
    margin: 0;
    padding: 0;
}

ul,
ol {
    list-style: none;
}

button,
input,
select {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

/* ---------- Layout ---------- */
.pagina {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.contenedor {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.rejilla-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.rejilla-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.dos-columnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

/* ---------- Tipografía ---------- */
h1 {
    color: var(--ink);
    font-size: var(--fs-xl);
    font-weight: 600;
    line-height: 1.15;
}

h2 {
    color: var(--ink);
    font-size: var(--fs-lg);
    font-weight: 600;
    line-height: 1.25;
}

h3 {
    color: var(--ink);
    font-size: var(--fs-md);
    font-weight: 600;
}

.texto-tenue {
    color: var(--muted);
}

.texto-bloque {
    white-space: pre-line;
}

.etiqueta-seccion {
    margin: 18px 0 8px;
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.grupo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0 14px;
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.grupo::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--faint);
    opacity: 0.6;
}

.vacio {
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--muted);
    text-align: center;
}

/* ---------- Botones ---------- */
.boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid var(--ink);
    border-radius: var(--pill);
    background: var(--card);
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.boton:hover {
    background: var(--tile-hover);
}

.boton-negro {
    background: var(--ink);
    color: #fff;
}

.boton-negro:hover {
    background: #2a2e36;
}

.boton-claro {
    border-color: #fff;
    background: #fff;
}

/* ---------- Tarjetas ---------- */
.tarjeta {
    margin-bottom: 18px;
    padding: 26px;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
}

.tarjeta > h2 {
    margin-bottom: 14px;
}

.etiqueta {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 10px;
    border-radius: var(--pill);
    background: var(--card);
    color: var(--ink);
    font-size: var(--fs-xs);
    font-weight: 600;
}

/* ---------- Portada del médico ---------- */
.portada {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 24px;
    align-items: center;
}

.foto {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--tile);
}

.foto-iniciales {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: var(--fs-xl);
    font-weight: 700;
}

.portada-datos > * + * {
    margin-top: 8px;
}

.urgencias {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--pill);
    background: var(--ink);
    color: #fff;
    font-weight: 700;
}

.rubro {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--pill);
    background: var(--tile);
    color: var(--text);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.especialidades {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    color: var(--muted);
}

.especialidades strong {
    color: var(--ink);
}

.redes {
    display: flex;
    gap: 8px;
}

.redes a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tile);
    color: var(--ink);
    font-size: var(--fs-xs);
    font-weight: 700;
}

.redes a:hover {
    background: var(--ink);
    color: #fff;
}

.acciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 170px;
}

/* ---------- Servicios y procedimientos ---------- */
.item {
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--tile);
}

.item img {
    width: 100%;
    max-height: 160px;
    margin-bottom: 10px;
    border-radius: 10px;
    object-fit: cover;
}

.item p {
    margin-top: 4px;
}

.puntos {
    display: grid;
    gap: 3px;
    margin-top: 8px;
}

.puntos li::before {
    content: "● ";
    color: var(--ink);
    font-size: var(--fs-xs);
}

/* ---------- Tablas ---------- */
.tabla-scroll {
    overflow-x: auto;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
}

.tabla th {
    padding: 0 10px 8px;
    color: var(--muted);
    font-size: var(--fs-xs);
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

.tabla td {
    padding: 10px;
    border-top: 1px solid var(--line);
    vertical-align: top;
}

.tabla strong {
    color: var(--ink);
}

.tabla small {
    display: block;
    color: var(--muted);
    font-size: var(--fs-xs);
}

.col-anios {
    width: 110px;
    color: var(--muted);
    white-space: nowrap;
}

/* ---------- Chips ---------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--tile);
    color: var(--ink);
    font-weight: 600;
}

.chip small {
    display: block;
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 400;
}

/* ---------- Consultorio ---------- */
.consultorio-cab {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.consultorio-cab h2 {
    margin: 0;
}

.logo-unidad {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    background: var(--tile);
}

.logo-iniciales {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}

.imagen-unidad {
    width: 100%;
    max-height: 220px;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.mapa {
    display: block;
    width: 100%;
    height: 190px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--tile);
}

.enlace-mapa {
    display: inline-block;
    margin-top: 8px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
}

.direccion {
    margin-top: 10px;
    color: var(--muted);
}

.sucursales {
    display: grid;
    gap: 8px;
}

.sucursales li {
    display: grid;
    gap: 2px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--tile);
}

.sucursales a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
}

.datos {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
}

.datos dt {
    color: var(--muted);
}

.datos dd {
    color: var(--ink);
}

.datos dd a:hover {
    text-decoration: underline;
}

.consultorio .redes {
    margin-top: 16px;
}

/* ---------- Médicos relacionados (tarjetas de 3 en 3) ---------- */
.colega {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 18px 10px;
    border-radius: var(--radius-md);
    background: var(--tile);
    text-align: center;
    transition: background 0.15s;
}

.colega:hover {
    background: var(--tile-hover);
}

.colega strong {
    color: var(--ink);
}

.colega .texto-tenue {
    font-size: var(--fs-xs);
}

.colega-foto {
    width: 68px;
    height: 68px;
    margin-bottom: 8px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--tile-hover);
}

.colega-logo {
    border-radius: 16px;
    background: var(--card);
}

.colega-iniciales {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}

/* ---------- Cabecera e inicio ---------- */
.cabecera {
    background: var(--card);
    border-bottom: 1px solid var(--line);
}

.cabecera-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.logo img {
    height: auto;
}

.menu {
    display: flex;
    gap: 22px;
    color: var(--muted);
    font-weight: 600;
}

.menu a:hover {
    color: var(--ink);
}

.portada-inicio {
    padding: 56px 0 28px;
}

.portada-inicio h1 {
    max-width: 640px;
    margin-bottom: 24px;
}

.sobretitulo {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sobretitulo-claro {
    color: var(--faint);
}

.lead {
    max-width: 640px;
    margin: 10px 0 20px;
    color: var(--muted);
    font-size: var(--fs-md);
}

.buscador {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
}

.campo {
    display: grid;
    gap: 4px;
}

.campo span {
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.campo input,
.campo select,
.campo textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--tile);
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    outline: 2px solid var(--ink);
    outline-offset: 1px;
}

.seccion {
    padding: 44px 0;
}

.seccion-suave {
    background: var(--tile);
}

.seccion h2 {
    margin-bottom: 18px;
}

.seccion h2.espaciado {
    margin-top: 36px;
}

.rejilla-texto {
    margin-top: 6px;
}

.tarjeta-texto {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
}

.tarjeta-texto p {
    margin-top: 6px;
    color: var(--muted);
}

.pasos {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 24px;
    counter-reset: paso;
}

.pasos li {
    position: relative;
    padding: 56px 18px 18px;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
    counter-increment: paso;
}

.pasos li::before {
    content: counter(paso);
    position: absolute;
    top: 16px;
    left: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 700;
}

.pasos p {
    margin-top: 6px;
    color: var(--muted);
}

.franja {
    padding: 36px 0;
    background: var(--ink);
    color: #fff;
}

.franja h2 {
    margin-bottom: 8px;
    color: #fff;
}

.franja p {
    max-width: 560px;
    color: var(--faint);
}

.franja-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.correo-grande {
    color: var(--ink);
    font-size: var(--fs-lg);
    font-weight: 600;
    text-decoration: underline;
}

/* ---------- Directorio ---------- */
.paginas {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* ---------- Pie ---------- */
.pie {
    padding: 14px 20px 26px;
    color: var(--muted);
    font-size: var(--fs-xs);
    text-align: center;
}

.pie a {
    text-decoration: underline;
}

.sitio-inicio .pie {
    padding: 28px 0;
    background: var(--ink);
    color: var(--faint);
}

.pie-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .menu {
        display: none;
    }

    .buscador {
        grid-template-columns: 1fr 1fr;
    }

    .campo-grande {
        grid-column: 1 / -1;
    }

    .pasos {
        grid-template-columns: repeat(2, 1fr);
    }

    .rejilla-texto {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 820px) {
    .portada {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .portada .especialidades,
    .portada .redes {
        justify-content: center;
    }

    .acciones {
        width: 100%;
    }

    .rejilla-2,
    .dos-columnas {
        grid-template-columns: 1fr;
    }

    .franja-fila,
    .pie-fila {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    /* Los médicos relacionados siguen de 3 en 3, más compactos */
    .rejilla-3:not(.rejilla-texto) {
        gap: 8px;
    }

    .rejilla-3:not(.rejilla-texto) .colega {
        padding: 14px 6px;
    }

    .rejilla-3:not(.rejilla-texto) .colega-foto {
        width: 52px;
        height: 52px;
    }

    .rejilla-texto,
    .pasos,
    .buscador {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: var(--fs-lg);
    }
}

/* Campo-trampa contra robots: fuera de la vista, sin display:none para que los robots lo llenen. */
.trampa {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Landing para médicos (inicio) ---------- */
.cabecera-oscura {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--ink);
}

.cabecera-oscura .menu {
    color: var(--faint);
}

.cabecera-oscura .menu a:hover {
    color: #fff;
}

.heroe {
    padding: 72px 0 88px;
    background: var(--ink);
    color: #fff;
}

.heroe h1 {
    color: #fff;
    font-weight: 700;
}

.heroe-fila {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
}

.heroe-lead {
    margin: 18px 0 28px;
    max-width: 560px;
    color: var(--faint);
    font-size: var(--fs-md);
}

.heroe-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.boton-contorno {
    border-color: rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #fff;
}

.boton-contorno:hover {
    background: rgba(255, 255, 255, 0.1);
}

.heroe-nota {
    margin-top: 16px;
    color: var(--muted);
    font-size: var(--fs-xs);
}

.heroe-visual {
    display: grid;
    gap: 14px;
}

/* Maquetas ilustrativas del producto (HTML y CSS, sin imágenes) */
.maqueta {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow);
}

.maqueta-etiqueta {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.maqueta-titulo {
    color: var(--ink);
    font-size: var(--fs-md);
    font-weight: 600;
}

.maqueta-detalle {
    color: var(--muted);
}

.maqueta-botones {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.maqueta-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: 1px solid var(--ink);
    border-radius: var(--pill);
    color: var(--ink);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.maqueta-boton-negro {
    background: var(--ink);
    color: #fff;
}

.maqueta-aviso {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: 36px;
}

.maqueta-punto {
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ink);
}

.punto-a {
    background: var(--ink);
}

.punto-b {
    background: var(--muted);
}

.punto-c {
    background: var(--faint);
}

.maqueta-perfil {
    display: grid;
    justify-items: center;
    gap: 6px;
    text-align: center;
}

.maqueta-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: var(--fs-lg);
    font-weight: 600;
}

.maqueta-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 12px;
}

.maqueta-chips span {
    padding: 4px 12px;
    border-radius: var(--pill);
    background: var(--tile);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.maqueta-fila {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.maqueta-fila span:nth-child(2) {
    min-width: 44px;
    color: var(--muted);
    font-weight: 600;
}

.maqueta-chat {
    display: grid;
    gap: 8px;
    background: var(--tile);
    box-shadow: none;
}

.burbuja {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    background: var(--card);
}

.burbuja-paciente {
    justify-self: start;
    border-bottom-left-radius: 4px;
}

.burbuja-asistente {
    justify-self: end;
    border-bottom-right-radius: 4px;
    background: var(--ink);
    color: #fff;
}

.bloque {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-top: 36px;
}

.bloque-inverso .bloque-texto {
    order: 2;
}

.bloque-titulo {
    margin-bottom: 10px;
    font-size: var(--fs-lg);
    line-height: 1.25;
}

.bloque-texto p:not(.sobretitulo) {
    color: var(--muted);
    font-size: var(--fs-md);
}

.bloque-visual {
    width: 100%;
    max-width: 420px;
    justify-self: center;
}

.nota-visual {
    margin-top: 20px;
    color: var(--muted);
    font-size: var(--fs-xs);
}

.video-demo {
    width: 100%;
    border-radius: var(--radius-lg);
    background: var(--ink);
    box-shadow: var(--shadow);
}

.pasos-4 {
    grid-template-columns: repeat(4, 1fr);
}

.precios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: stretch;
}

.precio {
    padding: 28px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
}

.precio-destacado {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.precio-nombre {
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.precio-monto {
    margin: 10px 0 18px;
    color: var(--ink);
    font-size: var(--fs-xl);
    font-weight: 700;
    line-height: 1.1;
}

.precio-monto span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: 500;
}

.precio-destacado .precio-monto,
.precio-destacado .precio-nombre {
    color: #fff;
}

.precio-destacado .precio-monto span {
    color: var(--faint);
}

.precio-lista {
    display: grid;
    gap: 10px;
}

.precio-lista li {
    position: relative;
    padding-left: 22px;
}

.precio-lista li::before {
    content: "✓";
    position: absolute;
    left: 0;
    font-weight: 700;
}

.preguntas {
    display: grid;
    gap: 10px;
    max-width: 780px;
}

.pregunta {
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow);
}

.pregunta summary {
    padding: 16px 20px;
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
}

.pregunta p {
    padding: 0 20px 18px;
    color: var(--muted);
}

.boton-separado {
    margin-top: 22px;
}

@media (max-width: 900px) {
    .heroe {
        padding: 48px 0 56px;
    }

    .heroe-fila,
    .bloque,
    .precios {
        grid-template-columns: 1fr;
    }

    .bloque {
        gap: 20px;
    }

    .bloque-inverso .bloque-texto {
        order: 0;
    }

    .pasos-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .maqueta-aviso {
        margin-left: 0;
    }
}

@media (max-width: 560px) {
    .pasos-4 {
        grid-template-columns: 1fr;
    }

    .heroe-acciones .boton {
        width: 100%;
    }
}
