/* Configuración de Accesibilidad y Fuentes */
body {
    font-size: 18px; /* Fuente base recomendada para adultos mayores */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 5rem;
}

@media (max-width: 767px) {
    body {
        padding-top: 5.25rem;
    }
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
}

/* Efecto Hover Suave */
.transition-all {
    transition: all 0.3s ease;
}

/* Ajustes para el Banner del Día 14 */
.banner-glow {
    animation: pulse-gold 2s infinite;
}

.carousel-slide {
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1s ease, transform 1s ease;
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
}

#carousel-caption {
    max-width: 36rem;
}

#carousel-caption-title {
    letter-spacing: -0.03em;
}

.carousel-control {
    background: rgba(15, 23, 42, 0.72);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    transition: background 0.2s ease;
}

.carousel-control:hover {
    background: rgba(15, 23, 42, 0.9);
}

#carousel-dots button {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.65);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

#carousel-dots button.active {
    background: white;
    transform: scale(1.2);
}

/* Estilos Galería Avanzada */
.filter-btn.active {
    background-color: #1e3a8a; /* blue-900 */
    color: white;
    border-color: #1e3a8a;
}

.gallery-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

#lightbox.active {
    display: flex;
}

#lightbox {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

#lightbox.active {
    opacity: 1;
    visibility: visible;
}

#lightbox-img {
    max-width: min(100%, 1200px);
    max-height: min(85vh, 900px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 1rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* Estilos Grupos Pastorales */
.grupo-card {
    background-color: white;
    padding: 1rem 0.75rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;    
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .grupo-card {
        padding: 1.5rem 1rem;
        border-radius: 1.5rem;
    }
}

.grupo-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 1.5rem;
    padding: 2px;
    background: linear-gradient(90deg, #f59e0b, #fde68a, #f59e0b, #fde68a);
    background-size: 300% 300%;
    /* Compatibilidad: definir la propiedad estándar `mask` además del prefijo -webkit- */
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: glowBorder 3s linear infinite;
    pointer-events: none;
}

.grupo-card h3 {
    text-align: center;
    margin-bottom: 0.75rem;
}

.grupo-card p {
    margin-top: auto;
    padding-top: 0.5rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.grupo-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-0.25rem);
    border-color: #f59e0b;
}

@keyframes glowBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.modal-full {
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Animación de entrada */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-full.active {
    opacity: 1;
    visibility: visible;
    /* display: flex; */ /* Removed as visibility handles display */
}

.modal-container {
    background-color: white;
    width: 92vw;
    max-width: 1000px;
    height: auto;
    max-height: 92vh;
    border-radius: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .modal-container {
        width: 75vw;
        height: auto;
        max-height: 85vh;
        border-radius: 2rem;
    }
}

.modal-full.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header-custom {
    background-color: white;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .modal-header-custom {
        padding: 1.5rem 2.5rem;
    }
}

.modal-body-custom {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1rem;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
    .modal-body-custom {
        padding: 40px;
    }
}

/* Estilos para el Carrusel de Calendario */
.event-card {
    min-width: 180px;
    flex: 0 0 calc(20% - 1rem);
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.event-card:hover {
    transform: translateY(-10px);
}

/* Efecto de Reflejo/Espejo */
.event-card::after {
    content: "";
    position: absolute;
    top: 105%;
    left: 10%;
    width: 80%;
    height: 20px;
    background: linear-gradient(to bottom, rgba(30, 58, 138, 0.1), transparent);
    filter: blur(4px);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.event-card:hover::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .event-card {
        flex: 0 0 85%;
    }
}

#calendar-grid,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
}

@media (min-width: 640px) {
    #calendar-grid,
    .calendar-grid {
        gap: 0.75rem;
    }
}

#calendar-grid {
    border-radius: 1rem;
    overflow: hidden;
    background: white;
}

.calendar-header-cell {
    background: #fbfdff;
    padding: 0.4rem 0.15rem;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

@media (min-width: 640px) {
    .calendar-header-cell {
        padding: 0.75rem 0.9rem;
        text-align: left;
        font-size: 12px;
    }
}

.calendar-cell {
    background: #ffffff;
    border-right: 1px solid rgba(148, 163, 184, 0.06);
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    transition: all 0.18s ease;
    min-height: 4.25rem;
    padding: 0.35rem 0.25rem;
    position: relative;
}

@media (min-width: 640px) {
    .calendar-cell {
        min-height: 7rem;
        padding: 0.75rem;
    }
}

.calendar-cell.today {
    background: #ffffff;
}

.calendar-cell.selected {
    background: #0f172a;
    color: white;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.calendar-cell:hover {
    background: #fbfdff;
}

/* Estilo Google-Calendar-like para eventos dentro de celdas */
.gc-event {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.35rem 0.6rem 0.35rem 0.8rem;
    border-radius: 8px;
    background: #dbeafe;
    color: #0f172a;
    font-size: 0.85rem;
    line-height: 1.1;
    margin-bottom: 0.45rem;
    box-sizing: border-box;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 639px) {
    .gc-event {
        padding: 0.15rem 0.25rem;
        font-size: 0.65rem;
        gap: 0.2rem;
        border-radius: 4px;
        margin-bottom: 0.2rem;
    }
    .gc-event-time {
        display: none;
    }
}

.gc-event::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 6px;
    border-radius: 4px;
    background: rgba(0,0,0,0.12);
}

.calendar-event-pill.more {
    background: #e2e8f0;
    color: #334155;
    padding: 0.3rem 0.5rem;
    border-radius: 9999px;
    display: inline-block;
}

/* Event type colors */
.gc-type-misa { background: #06b6d4; color: white; }
.gc-type-cumple { background: #10b981; color: white; }
.gc-type-festivo { background: #047857; color: white; }
.gc-type-default { background: #60a5fa; color: white; }

.calendar-grid .calendar-cell {
    min-height: 4.25rem;
}

@media (min-width: 640px) {
    .calendar-grid .calendar-cell {
        min-height: 7rem;
    }
}

#calendar-mini-grid,
.calendar-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.5rem;
}

.calendar-mini-header,
.calendar-mini-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-mini-cell {
    aspect-ratio: 1 / 1;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    color: #475569;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-mini-cell.today {
    background: #fef3c7;
    border-color: #f59e0b;
}

.calendar-mini-cell.selected {
    background: #2563eb;
    color: white;
}

.calendar-mini-cell:hover {
    background: #e2e8f0;
}

/* Contenedor de eventos apilados dentro de la celda */
.events-stack { position: relative; }

.calendar-event-pill.more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #334155;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    box-shadow: 0 6px 12px rgba(15,23,42,0.04);
}

/* Google-Calendar-like toolbar */
.gc-toolbar { background: transparent; }
.gc-view-toggle { cursor: pointer; }

/* Eventos estilo Google Calendar dentro de la celda */
.gc-event .gc-event-time { font-weight: 600; color: rgba(15,23,42,0.75); font-size: 0.75rem; }
.gc-event .gc-event-title { font-size: 0.85rem; color: #0f172a; overflow: hidden; text-overflow: ellipsis; }
.calendar-cell .gc-event { width: calc(100% - 12px); padding-left: 1.1rem; }

/* Left stripe color overrides per event type */
.gc-type-misa::before { background: #0891b2; }
.gc-type-cumple::before { background: #059669; }
.gc-type-festivo::before { background: #065f46; }
.gc-type-default::before { background: #2563eb; }
.gc-event .gc-event-time { font-weight: 600; color: rgba(15,23,42,0.75); font-size: 0.75rem; }
.gc-event .gc-event-title { font-size: 0.85rem; color: #0f172a; }
.calendar-cell .gc-event { width: 100%; }

/* Día actual más visible (círculo) */
.calendar-cell.today .day-number { background: #2563eb; color: white; padding: 0.15rem 0.5rem; border-radius: 9999px; }

@keyframes pulse-gold {
    0% { background-color: #fef3c7; }
    50% { background-color: #fde68a; }
    100% { background-color: #fef3c7; }
}

/* Media Query para pantallas pequeñas */
@media (max-width: 640px) {
    body {
        font-size: 16px; /* Ajuste ligero en móviles */
    }
}

/* Tarjeta con Cuna/Borde Inferior Dorado Gradiente */
.card-golden-cradle {
    border-radius: 2.5rem;
    padding: 3px 3px 22px 3px;
    background: linear-gradient(90deg, #d97706 0%, #f59e0b 25%, #fef08a 50%, #f59e0b 75%, #d97706 100%);
    box-shadow: 0 20px 35px -10px rgba(217, 119, 6, 0.2), 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
}

.card-golden-cradle:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 45px -10px rgba(217, 119, 6, 0.3), 0 15px 25px -5px rgba(0, 0, 0, 0.12);
}

.card-golden-cradle > .card-golden-inner {
    background-color: #ffffff;
    border-top-left-radius: calc(2.5rem - 3px);
    border-top-right-radius: calc(2.5rem - 3px);
    border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

/* Ocultar barra de desplazamiento en carruseles horizontales móviles */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Animación llamativa para indicador de deslizamiento en móvil */
@keyframes swipe-bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(7px); }
}
.animate-swipe-hint {
    display: inline-block;
    animation: swipe-bounce 1.2s infinite ease-in-out;
}

