@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
    --f-color-primary: #5a2a82;
    --f-color-primary-dark: #45205f;
    --f-color-primary-light: #efe6f5;
    --f-color-ink: #241f2b;
    --f-color-ink-soft: #5c5566;
    --f-color-border: #e3dde9;
    --f-color-surface: #ffffff;
    --f-color-canvas: #f7f4f9;
    --f-color-success-bg: #e7f4ec;
    --f-color-success: #2f7d55;
    --f-color-danger-bg: #fbebea;
    --f-color-danger: #a83232;
    --f-color-danger-border: #eecaca;
    --f-radius: 10px;
    --f-font: 'IBM Plex Sans', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--f-font);
    background: var(--f-color-canvas);
    color: var(--f-color-ink);
    font-size: 16px;
    line-height: 1.5;
}

.f-pantalla {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
}

.f-logo {
    margin-bottom: 20px;
    text-align: center;
}

.f-logo img {
    width: 140px;
    max-width: 60%;
    height: auto;
}

.f-card {
    width: 100%;
    max-width: 420px;
    background: var(--f-color-surface);
    border-radius: var(--f-radius);
    padding: 26px 22px;
    box-shadow: 0 4px 18px rgba(36, 31, 43, 0.09);
}

.f-card h1 {
    font-size: 21px;
    color: var(--f-color-primary);
    margin: 0 0 6px;
    text-align: center;
}

.f-card p.f-subtitulo {
    color: var(--f-color-ink-soft);
    text-align: center;
    margin: 0 0 22px;
    font-size: 14.5px;
}

.f-campo {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 16px;
}

.f-campo input,
.f-campo select {
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    font-size: 16px;
    border: 1.5px solid var(--f-color-border);
    border-radius: 8px;
    font-family: inherit;
    background: var(--f-color-surface);
    color: var(--f-color-ink);
}

.f-campo input:focus,
.f-campo select:focus {
    outline: none;
    border-color: var(--f-color-primary);
    box-shadow: 0 0 0 3.5px var(--f-color-primary-light);
}

.f-campo-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
}

.f-campo-checkbox input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.f-form-filtros {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
}

.f-form-filtros .f-campo {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

.f-boton {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 6px;
    background: var(--f-color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.f-boton:active {
    transform: translateY(1px);
}

.f-boton-inscripcion {
    margin-top: 18px;
}

.f-enlace-secundario {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--f-color-primary);
    text-decoration: none;
}

.f-enlace-secundario:hover {
    text-decoration: underline;
}

.f-alerta {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    text-align: center;
}

.f-alerta-error {
    background: var(--f-color-danger-bg);
    color: var(--f-color-danger);
    border: 1px solid var(--f-color-danger-border);
}

.f-alerta-exito {
    background: var(--f-color-success-bg);
    color: var(--f-color-success);
    border: 1px solid var(--f-color-border);
}

/* --- Shell de app (topbar + contenido + bottombar + menú deslizante) --- */

body.f-app {
    padding-bottom: 78px;
}

.f-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--f-color-surface);
    border-bottom: 1px solid var(--f-color-border);
}

.f-topbar-logo {
    height: 30px;
    width: auto;
}

.f-topbar-titulo {
    margin: 0;
    font-size: 16.5px;
    font-weight: 600;
    color: var(--f-color-primary);
}

.f-contenido {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.f-bottombar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    background: var(--f-color-surface);
    border-top: 1px solid var(--f-color-border);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.f-bottombar-boton {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 4px 8px;
    background: none;
    border: none;
    color: var(--f-color-ink-soft);
    font-family: inherit;
    font-size: 11px;
    text-decoration: none;
    cursor: pointer;
}

.f-bottombar-boton svg {
    width: 22px;
    height: 22px;
}

.f-bottombar-boton:hover,
.f-bottombar-boton:active {
    color: var(--f-color-primary);
    text-decoration: none;
}

.f-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(36, 31, 43, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 29;
}

.f-menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.f-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 78%;
    max-width: 300px;
    background: var(--f-color-surface);
    box-shadow: 4px 0 24px rgba(36, 31, 43, 0.18);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 30;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    overflow-y: auto;
}

.f-menu.abierto {
    transform: translateX(0);
}

.f-menu-header {
    padding: 0 20px 18px;
    border-bottom: 1px solid var(--f-color-border);
    margin-bottom: 10px;
}

.f-menu-header img {
    height: 38px;
}

.f-menu-link {
    display: block;
    padding: 13px 20px;
    color: var(--f-color-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 14.5px;
}

.f-menu-link:hover {
    background: var(--f-color-primary-light);
    text-decoration: none;
}

.f-menu-link.activo {
    color: var(--f-color-primary);
    background: var(--f-color-primary-light);
}

.f-menu-link-proximamente {
    opacity: 0.5;
    cursor: default;
}

.f-menu-link-proximamente small {
    display: block;
    font-weight: 400;
    font-size: 11px;
}

.f-menu-instalar {
    display: block;
    padding: 6px 20px 0;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--f-color-ink-soft);
    text-decoration: none;
}

.f-menu-instalar:hover {
    color: var(--f-color-primary);
    text-decoration: underline;
}

.f-menu-link-salir {
    margin-top: auto;
    border-top: 1px solid var(--f-color-border);
    color: var(--f-color-danger);
}

.f-novedad-destacada,
.f-novedad-detalle {
    display: block;
    width: 100%;
    background: var(--f-color-surface);
    border-radius: var(--f-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(36, 31, 43, 0.07);
    text-decoration: none;
    color: inherit;
    margin-bottom: 14px;
}

.f-novedad-extracto {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.f-novedad-lista {
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--f-color-surface);
    border-radius: var(--f-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(36, 31, 43, 0.07);
}

.f-novedad-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--f-color-border);
    text-decoration: none;
    color: var(--f-color-ink);
}

.f-novedad-lista li:last-child .f-novedad-item {
    border-bottom: none;
}

.f-novedad-item:hover {
    background: var(--f-color-primary-light);
    text-decoration: none;
}

.f-novedad-item-titulo {
    font-weight: 600;
    font-size: 14.5px;
}

.f-novedad-item-fecha {
    font-size: 12px;
    color: var(--f-color-ink-soft);
    white-space: nowrap;
}

.f-volver {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--f-color-primary);
    text-decoration: none;
}

.f-volver:hover {
    text-decoration: underline;
}

.f-evento-lugar {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--f-color-ink-soft);
}

.f-evento-cancelado {
    display: inline-block;
    margin: 0 0 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--f-color-danger-bg);
    color: var(--f-color-danger);
    font-size: 12px;
    font-weight: 600;
}

.f-novedad-imagen {
    display: block;
    width: 100%;
    height: auto;
}

.f-novedad-texto {
    padding: 18px 20px;
}

.f-novedad-texto > h2 {
    margin: 0 0 4px;
    font-size: 16.5px;
    color: var(--f-color-primary);
}

.f-novedad-fecha {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--f-color-ink-soft);
}

.f-novedad-cuerpo {
    font-size: 14.5px;
    line-height: 1.6;
}

.f-novedad-cuerpo p {
    margin: 0 0 10px;
}

.f-novedad-cuerpo p:last-child {
    margin-bottom: 0;
}

.f-novedad-cuerpo ul,
.f-novedad-cuerpo ol {
    margin: 0 0 10px;
    padding-left: 22px;
}

.f-novedad-cuerpo a {
    color: var(--f-color-primary);
}

.f-novedad-cuerpo h1,
.f-novedad-cuerpo h2,
.f-novedad-cuerpo h3 {
    margin: 14px 0 8px;
    line-height: 1.3;
    color: var(--f-color-ink);
}

.f-novedad-cuerpo h1:first-child,
.f-novedad-cuerpo h2:first-child,
.f-novedad-cuerpo h3:first-child {
    margin-top: 0;
}

.f-novedad-cuerpo h1 {
    font-size: 22px;
}

.f-novedad-cuerpo h2 {
    font-size: 19px;
}

.f-novedad-cuerpo h3 {
    font-size: 16.5px;
}

/* Clases que genera el tamaño de letra del editor Quill del admin
   (no se carga el CSS de Quill en la webapp, solo estos tres valores). */
.f-novedad-cuerpo .ql-size-small {
    font-size: 0.75em;
}

.f-novedad-cuerpo .ql-size-large {
    font-size: 1.5em;
}

.f-novedad-cuerpo .ql-size-huge {
    font-size: 2.5em;
}

.f-novedad-cuerpo .ql-align-center {
    text-align: center;
}

.f-novedad-cuerpo .ql-align-right {
    text-align: right;
}

.f-novedad-cuerpo .ql-align-justify {
    text-align: justify;
}

.f-zocalo-app {
    width: 100%;
    background: var(--f-color-primary-light);
    color: var(--f-color-primary-dark);
    border-radius: var(--f-radius);
    padding: 10px 16px;
    margin-bottom: 14px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}

.f-cal-preview {
    width: 100%;
    margin-bottom: 14px;
}

.f-cal-preview-hoy {
    display: block;
    width: 100%;
    background: var(--f-color-surface);
    border-radius: var(--f-radius);
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(36, 31, 43, 0.07);
    text-decoration: none;
    color: inherit;
}

.f-cal-preview-hoy-cabecera {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.f-cal-preview-hoy-fecha {
    font-weight: 700;
    font-size: 15.5px;
    color: var(--f-color-primary);
    text-transform: capitalize;
}

.f-cal-preview-hoy-hebreo {
    font-size: 12.5px;
    color: var(--f-color-ink-soft);
}

.f-cal-preview-hoy-detalle {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.f-cal-festividad-evento {
    background: var(--f-color-success-bg);
    color: var(--f-color-success);
    text-decoration: none;
    cursor: pointer;
}

.f-cal-festividad-evento:hover {
    background: var(--f-color-success);
    color: #fff;
    text-decoration: none;
}

.f-cal-preview-hoy-link {
    display: block;
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--f-color-primary);
    text-decoration: none;
}

.f-cal-preview-hoy-link:hover {
    text-decoration: underline;
}

.f-cal-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.f-cal-preview-dia {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: var(--f-color-surface);
    border-radius: var(--f-radius);
    padding: 10px 4px;
    box-shadow: 0 2px 8px rgba(36, 31, 43, 0.07);
    text-decoration: none;
    color: inherit;
}

.f-cal-preview-dia-semana {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--f-color-ink-soft);
    text-transform: uppercase;
}

.f-cal-preview-dia-numero {
    font-size: 16px;
    font-weight: 700;
    color: var(--f-color-ink);
}

.f-rotativo-carousel {
    width: 100%;
}

.f-rotativo-slides {
    position: relative;
    width: 100%;
    border-radius: var(--f-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(36, 31, 43, 0.07);
    background: var(--f-color-surface);
}

.f-rotativo-slide {
    display: none;
}

.f-rotativo-slide.activo {
    display: block;
}

.f-rotativo-slide img {
    display: block;
    width: 100%;
    height: auto;
}

.f-rotativo-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.f-rotativo-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.f-rotativo-agenda {
    position: relative;
    width: 100%;
    padding-top: 64.2857%;
    overflow: hidden;
}

.f-rotativo-agenda-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 1400px;
    height: 900px;
    border: 0;
    transform-origin: top left;
}

.f-rotativo-controles {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}

.f-rotativo-flecha {
    background: var(--f-color-surface);
    border: 1.5px solid var(--f-color-border);
    color: var(--f-color-primary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.f-rotativo-puntos {
    display: flex;
    gap: 6px;
}

.f-rotativo-punto {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--f-color-border);
    cursor: pointer;
}

.f-rotativo-punto.activo {
    background: var(--f-color-primary);
}

.f-perfil-datos {
    width: 100%;
    margin: 0;
}

.f-perfil-datos dt {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--f-color-ink-soft);
    margin-top: 16px;
}

.f-perfil-datos dt:first-child {
    margin-top: 0;
}

.f-perfil-datos dd {
    margin: 3px 0 0;
    font-size: 15.5px;
    color: var(--f-color-ink);
}

.f-lista-actividades {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.f-actividad {
    background: var(--f-color-surface);
    border-radius: var(--f-radius);
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(36, 31, 43, 0.07);
}

.f-actividad h2 {
    margin: 0 0 4px;
    font-size: 15.5px;
    color: var(--f-color-primary);
}

.f-actividad-horario {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--f-color-ink-soft);
}

.f-actividad-detalle {
    margin: 0 0 4px;
    font-size: 13.5px;
    color: var(--f-color-ink-soft);
}

.f-actividad-suspendida {
    opacity: 0.6;
}

.f-actividad-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--f-color-danger-bg);
    color: var(--f-color-danger);
    font-size: 12px;
    font-weight: 600;
}

.f-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
}

.f-cal-nav span {
    font-weight: 600;
    font-size: 15px;
    color: var(--f-color-ink);
    text-transform: capitalize;
}

.f-cal-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--f-color-surface);
    border: 1.5px solid var(--f-color-border);
    color: var(--f-color-primary);
    font-size: 18px;
    text-decoration: none;
}

.f-cal-grilla {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: var(--f-color-surface);
    border-radius: var(--f-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(36, 31, 43, 0.07);
    margin-bottom: 14px;
}

.f-cal-grilla th {
    padding: 8px 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--f-color-ink-soft);
    text-align: center;
    border-bottom: 1px solid var(--f-color-border);
}

.f-cal-grilla td {
    padding: 1px;
    text-align: center;
    vertical-align: top;
}

.f-cal-dia {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    height: 52px;
    padding-top: 4px;
    text-decoration: none;
    border-radius: 6px;
}

.f-cal-dia:hover {
    background: var(--f-color-primary-light);
    text-decoration: none;
}

.f-cal-dia-numero {
    font-size: 13px;
    font-weight: 600;
    color: var(--f-color-ink);
}

.f-cal-dia-hebreo {
    font-size: 8.5px;
    color: var(--f-color-ink-soft);
    line-height: 1.1;
}

.f-cal-dia-marcas {
    display: flex;
    align-items: center;
    gap: 3px;
    min-height: 7px;
}

.f-cal-punto {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.f-cal-punto-festividad {
    background: var(--f-color-primary);
}

.f-cal-marca-evento {
    font-size: 6.5px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--f-color-success);
}

.f-cal-dia-hoy .f-cal-dia-numero {
    color: var(--f-color-primary);
}

.f-cal-dia-seleccionado {
    background: var(--f-color-primary-light);
}

.f-cal-detalle h2 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--f-color-primary);
    text-transform: capitalize;
}

.f-cal-detalle-hebreo {
    margin: 0 0 10px;
    font-size: 13.5px;
    color: var(--f-color-ink-soft);
}

.f-cal-festividad {
    display: inline-block;
    margin: 0 6px 8px 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--f-color-primary-light);
    color: var(--f-color-primary-dark);
    font-size: 12.5px;
    font-weight: 600;
}

.f-cal-eventos-dia {
    margin-top: 10px;
    border-top: 1px solid var(--f-color-border);
}

.f-cal-eventos-dia .f-novedad-item {
    padding: 12px 0;
}

.f-cal-credito {
    width: 100%;
    text-align: center;
    font-size: 11.5px;
    color: var(--f-color-ink-soft);
    margin-top: 4px;
}

.f-cal-credito a {
    color: var(--f-color-ink-soft);
}
