/* =====================================================
   BASE GLOBALI
   ===================================================== */

body {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f6f7fb;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

.parrocchia-card {
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}

.parrocchia-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.12);
}

/* =====================================================
   ANIMAZIONI GLOBALI
   ===================================================== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeUp 0.6s ease both;
}

/* =====================================================
   CARD PARROCCHIE – IMMAGINI
   ===================================================== */

.parrocchia-card .parrocchia-img {
    position: relative;
    width: 100%;
    height: 170px;
    overflow: hidden;
    border-radius: 12px;
}

.parrocchia-card .parrocchia-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
}

.parrocchia-card:hover .parrocchia-img img {
    transform: scale(1.06);
}

.parrocchia-card .parrocchia-img::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.35), transparent);
    border-radius: inherit;
}

/* =====================================================
   CERCHI DATA / CALENDARIO
   ===================================================== */

.circle-date {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(13,110,253,0.35);
    transition: transform .25s ease, box-shadow .25s ease;
}

.circle-date:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 26px rgba(13,110,253,0.45);
}

.circle-date .day {
    font-size: 20px;
    line-height: 18px;
}

.circle-date .month {
    font-size: 12px;
    margin-top: -2px;
}

/* =====================================================
   EVENTI HOME – LAYOUT MODERNO
   ===================================================== */

.event-modern-card {
    border-radius: 1.1rem;
    border: none;
    padding: 1rem 1.25rem !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

.event-modern-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(0,0,0,0.10);
}

.event-date-circle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    line-height: 1;
}

.event-date-circle div:first-child {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

.event-date-circle div:nth-child(2) {
    font-size: 1rem;
}

.event-date-circle div:last-child {
    font-size: 0.65rem;
}

.event-modern-card h6 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    line-height: 1.25;
}

.event-modern-card .text-muted {
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.event-modern-card .badge {
    font-size: 0.6rem;
    padding: 0.25rem 0.45rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* =====================================================
   FOOTER
   ===================================================== */

footer {
    background: linear-gradient(180deg, #111827, #020617);
    color: #f5f5f5;
    padding: 40px 0;
}

footer a {
    color: #dcdcdc;
    transition: color .2s ease;
}

footer a:hover {
    color: #ffffff;
}

/* =====================================================
   CARD NOTIZIE
   ===================================================== */

.news-section .card-img-top {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: 0.75rem 0.75rem 0 0;
}

.news-section .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.news-section .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.14);
}

.news-section .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-section .card-body h3,
.news-section .card-body h5 {
    min-height: 3rem;
}

.news-section .card-body p.card-text {
    flex-grow: 1;
}

.news-section .card-body a.stretched-link {
    margin-top: auto;
}

.news-section .col-lg-6 .row {
    height: 100%;
}

.news-section .badge {
    display: inline-block !important;
    width: auto !important;
    max-width: max-content !important;
    padding: 0.35rem 0.6rem;
    border-radius: 0.4rem;
    white-space: nowrap;
}

/* =====================================================
   SANTO DEL GIORNO – DESKTOP
   ===================================================== */

.santo-del-giorno {
    border-left: 4px solid #0d6efd;
    background: #f8f9fb;
    overflow: hidden;
}

.santo-bg {
    display: flex;
    height: 100%;
    min-height: 140px;
}

.santo-image {
    position: relative;
    width: 40%;
    min-width: 140px;
    overflow: hidden;
}

.santo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.santo-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.05) 0%,
        rgba(248,249,251,0.85) 70%,
        rgba(248,249,251,1) 100%
    );
}

.santo-content {
    flex: 1;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.santo-content h5 {
    line-height: 1.25;
}

.santo-content a:hover {
    text-decoration: underline;
}

/* =====================================================
   GUIDA LITURGICA – BOTTONE
   ===================================================== */

.guida-btn-wrapper {
    display: flex;
    align-items: center;
    padding-right: 1.25rem;
}

.guida-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(13,110,253,0.35);
    border-radius: 0.6rem;
    background: transparent;
    color: #0d6efd;
    font-size: 0.8rem;
    line-height: 1.1;
    transition: all .2s ease;
}

.guida-btn i {
    font-size: 1.25rem;
}

.guida-btn:hover {
    background: rgba(13,110,253,0.08);
    transform: translateY(-1px);
}

.guida-btn:focus {
    box-shadow: 0 0 0 0.15rem rgba(13,110,253,0.25);
}

/* =====================================================
   MOBILE – SANTO DEL GIORNO
   ===================================================== */

@media (max-width: 575px) {

    .santo-bg {
        position: relative;
        flex-direction: column;
    }

    .santo-image {
        width: 100%;
        height: 200px;
    }

    .santo-image::after {
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.25) 0%,
            rgba(0,0,0,0.55) 55%,
            rgba(0,0,0,0.7) 100%
        );
    }

    .santo-content {
        position: absolute;
        bottom: 1rem;
        left: 1rem;
        right: 4.5rem;
        padding: 0;
        color: #ffffff;
    }

    .santo-content * {
        color: #ffffff !important;
    }

    .guida-btn-wrapper {
        position: absolute;
        top: 50%;
        right: 0.75rem;
        transform: translateY(-50%);
        padding: 0;
    }

    .guida-btn {
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.7);
        color: #ffffff;
    }

    .guida-btn:hover {
        background: rgba(255,255,255,0.25);
    }
}

/* =====================================================
   ACCESSIBILITÀ – MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ==============================
   HEADER MODERNO AVANZATO
   ============================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    transition: all .35s ease;
    will-change: transform;
}

/* evita animazioni inutili */
.site-header.scrolled .header-hero {
    transition: opacity .25s ease;
}

/* TOP BAR */
.header-top {
    background: linear-gradient(90deg, #0d6efd, #0b5ed7);
    color: #fff;
}

.header-top a {
    color: #fff;
    text-decoration: none;
    opacity: .9;
}

.header-top a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* HERO HEADER */
.header-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.2rem 1rem 1.8rem;
    transition: all .35s ease;
}

.logo-center img {
    height: 120px;
    transition: all .35s ease;
}

/* NAVBAR */
.header-nav {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: .5rem 0;
}

/* LOGO COMPACT */
.logo-compact img {
    height: 0;
    opacity: 0;
    transition: all .35s ease;
}

/* ==============================
   MENU – FIX DEFINITIVO
   ============================== */

/* Collapse deve essere flex */
.header-nav .navbar-collapse {
    display: flex;
    justify-content: center;
}

/* UL = flex row */
.header-nav .navbar-nav {
    display: flex;
    flex-direction: row;
    gap: 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* LI = non list-item */
.header-nav .navbar-nav > li {
    display: flex;
    list-style: none;
}

/* RIMUOVE I BULLET MODERNI */
.header-nav .navbar-nav > li::marker {
    content: "";
}

/* LINK */
.header-nav .nav-link {
    font-weight: 500;
    padding: .45rem .95rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: all .2s ease;
}

.header-nav .nav-link:hover {
    background: rgba(13,110,253,0.08);
}

.header-nav .nav-link.highlight {
    background: rgba(13,110,253,0.12);
    color: #0d6efd;
    font-weight: 600;
}

/* ==============================
   STATO SCROLL
   ============================== */

.site-header.scrolled .header-hero {
    padding: 0;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.site-header.scrolled .logo-compact img {
    height: 55px;
    opacity: 1;
}

.site-header.scrolled {
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
}

/* MENU A DESTRA SOLO DOPO SCROLL */
.site-header.scrolled .header-nav .navbar-collapse {
    justify-content: flex-end;
}

/* ==============================
   MOBILE (BOOTSTRAP PURO)
   ============================== */

@media (max-width: 991px) {

    .header-nav .navbar-collapse {
        display: block;
        text-align: center;
    }

    .header-nav .navbar-nav {
        flex-direction: column;
        gap: .5rem;
    }

    .logo-center img {
        height: 90px;
    }

    .site-header.scrolled .logo-compact img {
        height: 45px;
    }
}

/* =========================================
   ELIMINAZIONE DEFINITIVA PALLINI MENU
   ========================================= */

/* UL navbar */
.header-nav ul,
.header-nav ul.navbar-nav {
    list-style: none !important;
    list-style-type: none !important;
    list-style-position: outside !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* LI navbar */
.header-nav li,
.header-nav li.nav-item {
    list-style: none !important;
    list-style-type: none !important;
    display: inline-flex !important;
}

/* Marker moderni (Chrome / Edge / Firefox) */
.header-nav li::marker,
.header-nav li.nav-item::marker {
    content: none !important;
}

/* Extra sicurezza: reset completo */
.header-nav ul li::before {
    content: none !important;
}


/* ==============================
   QUICK LINKS – CARD MODERNE
   ============================== */

.quick-links {
    padding: 3rem 0 2rem;
    background: transparent;
}

.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.8rem 1rem;
    border-radius: 1.25rem;
    background: #ffffff;
    text-decoration: none;
    color: #1f2937;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all .25s ease;
    height: 100%;
}

.quick-card i {
    font-size: 2rem;
    color: #0d6efd;
}

.quick-card span {
    font-weight: 500;
}

.quick-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(13,110,253,0.25);
}

/* ==============================
   BADGE ACCESSO ADMIN / AREA
   ============================== */

.admin-fab {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 3000;

    display: inline-flex;
    align-items: center;
    gap: 0.5rem;

    padding: 0.65rem 0.9rem;
    border-radius: 999px;

    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;

    box-shadow: 0 10px 30px rgba(13,110,253,0.45);
    transition: transform .2s ease, box-shadow .2s ease;
}

.admin-fab i {
    font-size: 1.1rem;
}

.admin-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(13,110,253,0.55);
    color: #ffffff;
}

/* Utente normale */
.admin-fab.user {
    background: linear-gradient(135deg, #6c757d, #495057);
}


/* PARROCCHIE HOME */

.parrocchie-section {
  background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.parrocchie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.parrocchia-modern-card {
  position: relative;
  height: 320px;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  display: block;
  transform: translateY(30px);
  opacity: 0;
  animation: fadeUp .8s forwards ease;
}

.card-image {
  height: 100%;
  width: 100%;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.2));
  transition: background .4s ease;
}

.card-content {
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: 25px;
  z-index: 2;
  transition: transform .4s ease;
}

.card-content h4 {
  font-weight: 700;
  margin-bottom: 5px;
}

.card-content p {
  font-size: .9rem;
  opacity: .9;
}

/* Hover effect */
.parrocchia-modern-card:hover img {
  transform: scale(1.1);
}

.parrocchia-modern-card:hover .overlay {
  background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.3));
}

.parrocchia-modern-card:hover .card-content {
  transform: translateY(-6px);
}