/* ── Variables ─────────────────────────────────────────────── */
:root {
    --navy:       #1a3a6b;
    --navy-light: #2a4f8f;
    --navy-dark:  #0d2244;
    --navy-rgb:   26, 58, 107;
    --gold:       #c9a227;
    --gold-light: #e0b93a;
    --gold-rgb:   201, 162, 39;
    --bg-light:   #f7f9fc;
}

/* ── Base ──────────────────────────────────────────────────── */
body { font-family: 'Segoe UI', system-ui, sans-serif; }
body:not(.admin-body) { padding-top: 76px; }
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }

/* ── Colors ────────────────────────────────────────────────── */
.text-navy  { color: var(--navy) !important; }
.text-gold  { color: var(--gold) !important; }
.bg-navy    { background-color: var(--navy) !important; }
.bg-gold    { background-color: var(--gold) !important; }
.border-navy { border-color: var(--navy) !important; }
.bg-navy-soft    { background-color: rgba(26,58,107,.1); }
.bg-gold-soft    { background-color: rgba(201,162,39,.12); }
.bg-success-soft { background-color: rgba(25,135,84,.12); }
.bg-primary-soft { background-color: rgba(13,110,253,.1); }
.text-gold-dark  { color: #a07d15; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-navy {
    background: var(--navy);
    color: #fff;
    border: none;
}
.btn-navy:hover { background: var(--navy-light); color: #fff; }

.btn-gold {
    background: var(--gold);
    color: #fff;
    border: none;
    font-weight: 600;
}
.btn-gold:hover { background: var(--gold-light); color: #fff; }

.btn-outline-navy {
    border-color: var(--navy);
    color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

.btn-outline-gold {
    border-color: var(--gold);
    color: var(--gold);
}
.btn-outline-gold:hover { background: var(--gold); color: #fff; }

/* ── Navbar ────────────────────────────────────────────────── */
#mainNav {
    background: rgba(var(--navy-rgb),.95);
    backdrop-filter: blur(8px);
    transition: background .3s;
}
#mainNav.scrolled { background: rgba(var(--navy-rgb),1); box-shadow: 0 2px 20px rgba(0,0,0,.2); }
#mainNav .nav-link { color: rgba(255,255,255,.85); font-weight: 500; padding: .5rem 1rem; }
#mainNav .nav-link:hover { color: var(--gold); }
#mainNav .navbar-brand { font-size: 1.1rem; }
.navbar-logo { height: 48px; width: auto; object-fit: contain; }

/* ── Hero Slider ───────────────────────────────────────────── */
.hero-swiper {
    width: 100%;
}
.swiper-slide {
    line-height: 0;
}
.slide-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 90vh;
}

@media (max-width: 768px) {
    .swiper-slide { line-height: 0; }
    .slide-img    { height: auto; max-height: 60vh; width: 100%; object-fit: cover; }
}
.slide-default {
    height: 60vw;
    max-height: 90vh;
    background: linear-gradient(135deg, var(--navy) 0%, #0d2244 100%);
}
.swiper-button-next, .swiper-button-prev { color: var(--gold) !important; }
.swiper-pagination-bullet-active { background: var(--gold) !important; }

/* ── Sections ──────────────────────────────────────────────── */
.verse-card {
    background: linear-gradient(135deg, var(--navy) 0%, #0d2244 100%);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blockquote-footer { color: var(--gold) !important; }
.blockquote-footer::before { content: '— '; }

/* ── Service Cards ─────────────────────────────────────────── */
.service-card {
    background: white;
    border: 1px solid #e8eef5;
    transition: transform .2s, box-shadow .2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(26,58,107,.12); }
.service-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    font-size: 1.6rem;
    color: white;
}
.badge.bg-navy { background: var(--navy) !important; }

/* ── Upcoming Events ───────────────────────────────────────── */
.upcoming-event { transition: transform .15s; }
.upcoming-event:hover { transform: translateX(4px); }
.event-date {
    min-width: 48px;
    border-left: 3px solid;
    padding-left: .5rem;
    flex-shrink: 0;
}

/* ── Contact Cards ─────────────────────────────────────────── */
.contact-card {
    background: white;
    border: 1px solid #e8eef5;
    transition: box-shadow .2s;
}
.contact-card:hover { box-shadow: 0 4px 20px rgba(26,58,107,.1); }
.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background: var(--bg-light);
    border-radius: 50%;
    color: var(--navy);
    font-size: 1.2rem;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.social-icon:hover { background: var(--navy); color: white; }

/* ── Footer ────────────────────────────────────────────────── */
.footer-dark { background: #0d1f3c; }
.border-white-50 { border-color: rgba(255,255,255,.15) !important; }

/* ── Calendar ──────────────────────────────────────────────── */
#calendar { min-height: 520px; }

/* Contenedor */
.fc { font-family: 'Segoe UI', system-ui, sans-serif; }

/* Toolbar */
.fc-toolbar { padding: .25rem 0 1rem !important; }
.fc-toolbar-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
    letter-spacing: -.01em;
}

/* Botones de navegación */
.fc-button-primary {
    background: var(--navy) !important;
    border-color: var(--navy) !important;
    border-radius: 8px !important;
    font-size: .8rem !important;
    padding: .35rem .75rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transition: background .15s !important;
}
.fc-button-primary:hover {
    background: var(--navy-light) !important;
    border-color: var(--navy-light) !important;
}
.fc-button-primary:not(:disabled):active,
.fc-button-primary.fc-button-active {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
}

/* Cabecera días semana */
.fc-col-header-cell {
    background: var(--navy) !important;
    padding: .5rem 0 !important;
}
.fc-col-header-cell-cushion {
    color: rgba(255,255,255,.85) !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.fc-col-header-cell-cushion:hover { color: var(--gold) !important; }

/* Celdas de días */
.fc-daygrid-day { transition: background .15s; }
.fc-daygrid-day:hover { background: rgba(26,58,107,.03) !important; }
.fc-daygrid-day-number {
    color: #555 !important;
    font-size: .82rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    padding: .4rem .5rem !important;
}
.fc-daygrid-day-number:hover { color: var(--navy) !important; }

/* Día de hoy */
.fc-day-today {
    background: rgba(201,162,39,.07) !important;
}
.fc-day-today .fc-daygrid-day-number {
    color: var(--gold) !important;
    font-weight: 700 !important;
}

/* Eventos */
.fc-event {
    cursor: pointer !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: .75rem !important;
    font-weight: 500 !important;
    padding: 2px 6px !important;
    margin: 1px 2px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.15) !important;
    transition: opacity .15s, transform .1s !important;
}
.fc-event:hover {
    opacity: .88 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(0,0,0,.2) !important;
}
.fc-event-title, .fc-event-time {
    text-decoration: none !important;
}
.fc-event-main { padding: 0 !important; }
.fc-daygrid-event-dot { display: none !important; }

/* Vista lista */
.fc-list-event:hover td { background: rgba(26,58,107,.04) !important; }
.fc-list-event-title a {
    color: var(--navy) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}
.fc-list-event-title a:hover { color: var(--gold) !important; }
.fc-list-day-cushion { background: var(--bg-light) !important; }
.fc-list-day-text, .fc-list-day-side-text {
    color: var(--navy) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* Más eventos */
.fc-more-link {
    color: var(--navy) !important;
    font-weight: 600 !important;
    font-size: .72rem !important;
    text-decoration: none !important;
}
.fc-more-link:hover { color: var(--gold) !important; }

/* Bordes suaves */
.fc-scrollgrid { border-radius: 0 0 12px 12px; overflow: hidden; border: none !important; }
.fc-scrollgrid td, .fc-scrollgrid th { border-color: #edf0f5 !important; }
.fc-scrollgrid-section > td { border: none !important; }

/* Vista lista en móvil */
.fc-list { border: none !important; }
.fc-list-empty { color: #aaa; padding: 2rem; text-align: center; }
.fc-list-day th { border: none !important; padding: .4rem 0 !important; }
.fc-list-day-cushion {
    background: linear-gradient(90deg, rgba(26,58,107,.06) 0%, transparent 100%) !important;
    padding: .5rem 1rem !important;
    border-radius: 6px;
}
.fc-list-day-text {
    font-size: .82rem !important;
    font-weight: 700 !important;
    text-transform: capitalize;
}
.fc-list-event td { border: none !important; padding: .45rem .5rem !important; }
.fc-list-event-dot { border-radius: 50% !important; width: 10px !important; height: 10px !important; }
.fc-list-event:hover td { background: rgba(26,58,107,.04) !important; border-radius: 6px; }

@media (max-width: 767px) {
    .fc-toolbar-title { font-size: 1rem !important; }
    .fc-button-primary { font-size: .75rem !important; padding: .3rem .6rem !important; }
    .calendar-header { padding: .75rem 1rem 0 !important; }
}

/* ── Admin Layout ──────────────────────────────────────────── */
.admin-body { background: var(--bg-light); }

/* Desktop sidebar */
.admin-sidebar {
    width: 240px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--navy) 0%, #0d2244 100%);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand { border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-link {
    color: rgba(255,255,255,.75) !important;
    border-radius: 8px;
    padding: .6rem 1rem;
    font-size: .9rem;
    transition: background .15s, color .15s;
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(255,255,255,.12) !important;
    color: white !important;
}
.sidebar-link.active { font-weight: 600; }
.sidebar-link.text-danger-soft { color: rgba(255,100,100,.8) !important; }
.sidebar-link.text-danger-soft:hover { color: #fff !important; background: rgba(220,53,69,.25) !important; }
.border-white-10 { border-color: rgba(255,255,255,.1) !important; }
.admin-main { background: var(--bg-light); min-height: 100vh; }

/* Mobile topbar */
.admin-topbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 52px;
    background: linear-gradient(90deg, var(--navy) 0%, #0d2244 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* Offcanvas sidebar (mobile) */
.admin-offcanvas {
    background: linear-gradient(180deg, var(--navy) 0%, #0d2244 100%);
    width: 260px !important;
}
.admin-offcanvas .offcanvas-header { padding: 1rem 1.25rem; }
.admin-offcanvas .btn-close-white { filter: brightness(0) invert(1) opacity(.6); }

/* ── Admin Cards ───────────────────────────────────────────── */
.stat-card { transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,58,107,.1) !important; }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* ── Slide Row (admin) ─────────────────────────────────────── */
.slide-row { cursor: default; transition: box-shadow .15s; }
.slide-row:hover { box-shadow: 0 2px 12px rgba(26,58,107,.08); }
.drag-handle { cursor: grab; }
.drag-handle:active { cursor: grabbing; }
.cursor-grab { cursor: grab; }
.min-w-0 { min-width: 0; }

/* ── Calendar wrap ─────────────────────────────────────────── */
.calendar-wrap { border: 1px solid #edf0f5; }
.calendar-header { border-bottom: 1px solid #f0f2f6; }

/* ── Upcoming events sidebar ───────────────────────────────── */
.upcoming-event {
    border-left: 3px solid transparent;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.upcoming-event:hover {
    border-left-color: var(--gold);
    transform: translateX(3px);
    box-shadow: 0 4px 16px rgba(26,58,107,.08) !important;
}
.event-date {
    min-width: 44px;
    text-align: center;
    flex-shrink: 0;
}
.event-date span:first-child {
    line-height: 1;
    font-size: 1.4rem !important;
}

/* ── Event Popup Modal ─────────────────────────────────────── */
#eventPopupModal .modal-content {
    animation: popupIn .2s ease;
}
@keyframes popupIn {
    from { transform: scale(.95); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
#eventPopupLocation {
    border-left: 3px solid #e8eef5;
    margin-left: 1rem;
    padding-left: .75rem !important;
}

/* ── User Avatar ───────────────────────────────────────────── */
.user-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
    flex-shrink: 0;
}

/* ── Live Section ──────────────────────────────────────────── */
.live-section {
    background: linear-gradient(160deg, rgba(var(--navy-rgb),1) 0%, var(--navy-dark) 60%, rgba(var(--navy-rgb),.85) 100%);
    position: relative;
    overflow: hidden;
}
.live-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--gold-rgb),.12) 0%, transparent 70%);
    pointer-events: none;
}
.live-player-wrap { max-width: 860px; }

.live-badge {
    background: rgba(220,30,30,.15);
    border: 1px solid rgba(220,30,30,.4);
    color: #ff4444;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .35rem .9rem;
    border-radius: 100px;
}
.live-dot {
    width: 8px;
    height: 8px;
    background: #ff4444;
    border-radius: 50%;
    animation: livePulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .4; transform: scale(.7); }
}

/* ── Settings Tabs ─────────────────────────────────────────── */
#settingsTabs {
    background: linear-gradient(135deg, var(--navy) 0%, #0d2244 100%);
    border-radius: 12px 12px 0 0;
    border: none !important;
    padding: .5rem .75rem 0;
    gap: .15rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
#settingsTabs::-webkit-scrollbar { display: none; }

#settingsTabs .nav-link {
    color: rgba(255,255,255,.6);
    border: none;
    border-radius: 8px 8px 0 0;
    padding: .6rem 1rem;
    font-size: .82rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: color .15s, background .15s;
    position: relative;
}
#settingsTabs .nav-link i { font-size: .95rem; }

#settingsTabs .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
}

#settingsTabs .nav-link.active {
    color: var(--navy);
    background: #fff;
    font-weight: 600;
    border: none;
}
#settingsTabs .nav-link.active i { color: var(--gold); }
#settingsTabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 2px;
    background: #fff;
}

/* Card wrapper */
.settings-card .card-header {
    background: linear-gradient(135deg, var(--navy) 0%, #0d2244 100%);
    border-radius: 12px 12px 0 0 !important;
    border: none;
    padding: 0;
}
.settings-card { border-radius: 12px !important; overflow: hidden; }
.settings-card .card-body { padding: 2rem 2.25rem; }

/* Pane titles */
.tab-pane h5 {
    color: var(--navy);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid #f0f3f8;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.tab-pane h5 i { color: var(--gold); font-size: 1.1rem; }

@media (max-width: 767px) {
    #settingsTabs .nav-link { padding: .55rem .7rem; font-size: .78rem; gap: .3rem; }
    .settings-card .card-body { padding: 1.25rem; }
}

/* ── Home Admin Tabs (estilo limpio con subrayado) ─────────── */
.home-card {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(26,58,107,.08);
}
.home-card .card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0 1.5rem;
}
.home-card .card-body { padding: 2rem 2.25rem; }

#homeTabs {
    border-bottom: none;
    gap: .25rem;
}
#homeTabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: .85rem 1.1rem;
    font-size: .875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
#homeTabs .nav-link i { font-size: .95rem; }
#homeTabs .nav-link:hover { color: var(--navy); border-bottom-color: #dee2e6; }
#homeTabs .nav-link.active {
    color: var(--navy);
    font-weight: 600;
    border-bottom-color: var(--gold);
    background: transparent;
}
#homeTabs .nav-link.active i { color: var(--gold); }

@media (max-width: 767px) {
    .home-card .card-header { padding: 0 .75rem; overflow-x: auto; }
    .home-card .card-body   { padding: 1.25rem; }
    #homeTabs .nav-link     { padding: .7rem .75rem; font-size: .8rem; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 991px) {
    /* On mobile the d-flex wrapper starts below the topbar */
    body.admin-body > .d-flex { flex-direction: column; }
    .admin-main { padding-top: .5rem !important; }
}
@media (max-width: 768px) {
    .slide-content h1 { font-size: 1.8rem; }
}
