/* Página de cronograma: extiende modulos/muni_servicio.css */

.muni-svc-page {
    max-width: 520px;
    margin: 0 auto;
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: radial-gradient(120% 80% at 50% -20%, rgba(148, 163, 184, 0.12), transparent 55%);
}

.muni-svc-page-head {
    margin: 4px 0 14px;
    padding: 0 2px;
}

.muni-svc-page-h1 {
    margin: 0 0 8px;
    font-size: clamp(1.12rem, 4vw, 1.32rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #0f172a;
}

.muni-svc-page-lead {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #475569;
}

.muni-svc-page-lead strong {
    font-weight: 600;
    color: #334155;
}

/* Ancla #muni-sv-N desde el menú interno o enlaces externos */
.muni-svc-detail-section[id^="muni-sv-"] {
    scroll-margin-top: 76px;
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}

.muni-svc-detail-section[id^="muni-sv-"]:target,
.muni-svc-detail-section.muni-svc-detail-section--targeted {
    border-radius: 18px;
    box-shadow:
        0 0 0 2px rgba(51, 65, 85, 0.35),
        0 10px 28px -12px rgba(15, 23, 42, 0.12);
}

.muni-svc-faq {
    margin: 20px 0 8px;
    padding: 14px 14px 16px;
    border-radius: 18px;
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 20px -12px rgba(15, 23, 42, 0.08);
}

.muni-svc-faq__title {
    margin: 0 0 12px;
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.muni-svc-faq__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.muni-svc-faq__item {
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    overflow: hidden;
}

.muni-svc-faq__q {
    padding: 12px 14px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    list-style: none;
}

.muni-svc-faq__q::-webkit-details-marker {
    display: none;
}

.muni-svc-faq__item[open] .muni-svc-faq__q {
    border-bottom: 1px solid #f1f5f9;
}

.muni-svc-faq__a {
    margin: 0;
    padding: 10px 14px 14px;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #64748b;
}

.muni-svc-page .muni-svc-sc:first-of-type {
    margin-top: 4px;
}

/* Evitar “encoger” toda la tarjeta al tocar (solo página detalle) */
.muni-svc-sc__wrap--no-press:active .muni-svc-sc__card {
    transform: none;
}

.muni-svc-sc--detail .muni-svc-sc__card {
    overflow: visible;
    padding-bottom: 22px;
    background: linear-gradient(165deg, #ffffff 0%, #fafbfc 42%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 12px 32px -10px rgba(15, 23, 42, 0.08);
}

.muni-svc-sc--detail .muni-svc-sc__deco {
    font-size: 88px;
    color: rgba(51, 65, 85, 0.06);
}

.muni-svc-detail-hero {
    margin-bottom: 14px;
}

.muni-svc-detail-hero__icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
    border-radius: 16px;
}

.muni-svc-detail-hero__title {
    font-size: clamp(17px, 4.5vw, 20px);
    letter-spacing: -0.03em;
}

.muni-svc-detail-lead {
    margin: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.45;
}

/* Barra contextual: hora + resumen */
.muni-svc-detail-meta {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.muni-svc-detail-meta__clock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.muni-svc-detail-meta__clock > i {
    font-size: 17px;
    color: #64748b;
}

.muni-svc-detail-meta__now {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.muni-svc-detail-meta__hint {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

.muni-svc-detail-meta__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.muni-svc-detail-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.02em;
}

.muni-svc-detail-pill strong {
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

/* Navegación rápida entre servicios */
.muni-svc-detail-jump {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    margin: 0 -4px 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.muni-svc-detail-jump::-webkit-scrollbar {
    display: none;
}

.muni-svc-detail-jump__a {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.muni-svc-detail-jump__a:active {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Secciones por servicio: acento lateral sutil */
.muni-svc-detail-section {
    position: relative;
    margin: 0 -6px;
    padding: 0 6px 4px;
    scroll-margin-top: 72px;
}

.muni-svc-detail-section::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 52px;
    bottom: 12px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #cbd5e1, #e2e8f0);
    opacity: 0.85;
    pointer-events: none;
}

.muni-svc-detail-section--reco::before {
    background: linear-gradient(180deg, #34d399, #10b981);
}

.muni-svc-detail-section--agua::before {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

.muni-svc-detail-section--cem::before {
    background: linear-gradient(180deg, #94a3b8, #64748b);
}

.muni-svc-detail-section--other::before {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
}

.muni-svc-sc--detail .muni-svc-sc__item--detail-block {
    align-items: flex-start;
    border-top: none;
    padding-top: 10px;
    padding-bottom: 20px;
    margin-bottom: 2px;
}

.muni-svc-sc--detail .muni-svc-sc__item--detail-block:first-of-type {
    padding-top: 4px;
}

.muni-svc-detail-svc-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    margin: 0 0 10px;
    font-size: 16px;
    padding-left: 2px;
}

.muni-svc-detail-ico {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.muni-svc-detail-ico--reco {
    border-color: rgba(16, 185, 129, 0.35);
    color: #059669;
    background: linear-gradient(160deg, #ecfdf5, #fff);
}

.muni-svc-detail-ico--agua {
    border-color: rgba(59, 130, 246, 0.35);
    color: #2563eb;
    background: linear-gradient(160deg, #eff6ff, #fff);
}

.muni-svc-detail-ico--cem {
    border-color: rgba(100, 116, 139, 0.4);
    color: #475569;
    background: linear-gradient(160deg, #f8fafc, #fff);
}

.muni-svc-detail-ico--other {
    border-color: #e2e8f0;
    color: #64748b;
}

/* Paneles por sector */
.muni-svc-detail-panel {
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 4px 14px -6px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.muni-svc-detail-panel:first-of-type {
    margin-top: 0;
}

.muni-svc-detail-panel:active {
    border-color: #cbd5e1;
}

.muni-svc-detail-panel__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid #f1f5f9;
}

.muni-svc-detail-panel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.15);
    flex-shrink: 0;
}

.muni-svc-detail-section--reco .muni-svc-detail-panel__dot {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.muni-svc-detail-section--agua .muni-svc-detail-panel__dot {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.muni-svc-detail-section--cem .muni-svc-detail-panel__dot {
    background: #64748b;
}

.muni-svc-detail-panel__sector {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.muni-svc-detail-panel__status {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    max-width: 68%;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
}

.muni-svc-detail-panel__status--ok {
    color: #059669;
}

.muni-svc-detail-panel__status--warn {
    color: #b45309;
}

.muni-svc-detail-panel__status--muted {
    color: #64748b;
}

.muni-svc-detail-panel__body {
    padding: 12px 14px 14px;
}

.muni-svc-detail-chip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

.muni-svc-detail-chip--wide {
    margin-bottom: 12px;
}

.muni-svc-detail-chip > i {
    color: #94a3b8;
    font-size: 15px;
    flex-shrink: 0;
}

.muni-svc-detail-chip__lab {
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.06em;
}

.muni-svc-detail-chip__val {
    flex: 1 1 100%;
    min-width: 0;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
}

/* Franjas mañana / tarde */
.muni-svc-detail-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.muni-svc-detail-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(105deg, #fafbfc 0%, #fff 55%);
    border: 1px solid #e2e8f0;
}

.muni-svc-detail-slot--ok {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(105deg, #ecfdf5 0%, #fff 55%);
}

.muni-svc-detail-slot--warn {
    border-color: rgba(245, 158, 11, 0.28);
    background: linear-gradient(105deg, #fffbeb 0%, #fff 55%);
}

.muni-svc-detail-slot__icon {
    color: #94a3b8;
    font-size: 16px;
    display: flex;
}

.muni-svc-detail-slot__lab {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    flex: 1 1 auto;
    min-width: 4.5rem;
}

.muni-svc-detail-slot__lab--ok {
    color: #059669;
}

.muni-svc-detail-slot__lab--warn {
    color: #b45309;
}

.muni-svc-detail-slot__lab--muted {
    color: #64748b;
}

.muni-svc-detail-slot__when {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    margin-left: auto;
}

.muni-svc-detail-slot__time {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.muni-svc-detail-slot__unit {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
}

.muni-svc-detail-slot--empty {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    justify-content: center;
}

.muni-svc-detail-footnote {
    position: relative;
    z-index: 2;
    margin: 18px 0 0;
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    color: #94a3b8;
    text-align: center;
    border-top: 1px dashed #e2e8f0;
}

/* Estado vacío */
.muni-svc-detail-empty-card .muni-svc-sc__empty-msg {
    text-align: center;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.muni-svc-detail-empty-visual {
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
}

.muni-svc-detail-empty-visual__ring {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f8fafc, #fff);
    border: 2px dashed #cbd5e1;
    color: #94a3b8;
    font-size: 28px;
}

.muni-svc-sc--empty .muni-svc-sc__empty-msg {
    position: relative;
    z-index: 2;
    margin: 0;
    padding: 4px 8px 8px;
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
    line-height: 1.55;
}

.muni-svc-page-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-width: 280px;
    margin: 16px auto 0;
    padding: 12px 18px;
    border-radius: 14px;
    text-decoration: none;
    color: #475569;
    font-weight: 800;
    font-size: 13px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.muni-svc-page-back i {
    font-size: 20px;
    margin-left: -4px;
}

.muni-svc-page-back:active {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}
