/* --- CONFIGURAZIONI GLOBALI, RESET E VARIABILI --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --primary-blue: #e3f2fd; --accent-gold: #b5935a; --text-dark: #2c3e50; --navbar-height: 80px; --transition: color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease; }
html { scroll-behavior: smooth; scrollbar-gutter: stable both-edges; }
body { font-family: 'Montserrat', sans-serif; background-color: #fcfcfc; color: var(--text-dark); overflow-x: hidden; }
.evidenziato-giallo { background: #fdfd96; padding: 2px 6px; border-radius: 4px; }

/* --- CLASSI DEL MENU DI NAVIGAZIONE PRINCIPALE --- */
.nav-container { display: flex; align-items: center; gap: 20px; }
.nav-menu { display: flex; flex-direction: row; list-style: none; margin: 0; padding: 0; align-items: center; -webkit-font-smoothing: antialiased; }
.nav-item { position: relative; padding: 0; margin: 0 4px; display: inline-block; }
.nav-item > a { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; transition: color 0.2s ease, text-shadow 0.2s ease; letter-spacing: 0.5px; display: inline-block; padding: 10px 12px; margin: 0; white-space: nowrap; backface-visibility: hidden; }
.nav-item > a:hover { color: var(--accent-gold); font-weight: 600; background: none; border: none; text-shadow: 0 0 0.1px var(--accent-gold); }
.nav-item > a.active {
    color: var(--text-dark); /* Mantiene il colore del testo normale */
    text-decoration: underline;
    text-decoration-color: var(--accent-gold); /* Colore della riga */
    text-thickness-width: 2px; /* Spessore della riga */
    text-underline-offset: 8px; /* Distanza della riga dal testo */
}

/* --- CLASSI DEGLI ELEMENTI SOTTO-MENU (DROPDOWN DESKTOP) --- */
.dropdown { position: absolute; top: 100%; left: 0; background: #ffffff; list-style: none; min-width: 180px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); opacity: 0; visibility: hidden; transform: translateY(2px); transition: opacity 0.2s ease, transform 0.2s ease; border-top: 2px solid var(--accent-gold); padding: 0; margin: 0; z-index: 2500; pointer-events: none; }
.dropdown li a { display: block; padding: 12px 20px; text-decoration: none; color: var(--text-dark); font-size: 0.8rem; transition: var(--transition); }
.dropdown li a:hover { color: var(--accent-gold); background-color: #f9f9f9; }

/* CONTENUTO PRINCIPALE */
main { padding: 60px 5%; max-width: 1360px; margin: 0 auto; }

/* NAVBAR FISSA (ANTI SALTO)  --- */
header { position: fixed; top: 0; left: 0; right: 0; height: var(--navbar-height); background: rgba(255, 255, 255, 0.98); display: flex; justify-content: space-between; align-items: center; padding: 0 40px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); z-index: 2000; width: auto !important; }
.logo img { mix-blend-mode: multiply; filter: contrast(1.05); height: 50px; width: auto; display: block; }

/* CONTENUTO */
.prayer-card { background: #ffffff; border-radius: 8px; padding: 40px; margin-bottom: 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); border-left: 4px solid var(--accent-gold); transition: transform 0.3s ease; }
.prayer-card:hover { transform: translateY(-3px); }
.prayer-card h2 { font-size: 1.6rem; font-weight: 600; color: var(--text-dark); margin-bottom: 20px; letter-spacing: 0.5px; display: flex; align-items: center; gap: 12px; }
.prayer-card h2 i { color: var(--accent-gold); font-size: 1.3rem; }
.prayer-text { font-size: 1.1rem; line-height: 1.8; color: #4a5568; font-style: italic; white-space: pre-line; }

/* CONTENITORE PRIMA FRASE IN EVIDENZA (COMPATTO ED ACCATTIVANTE) */
.featured-quote-box { background: radial-gradient(circle at top right, #2c3e50, #1a252f); color: #ffffff; padding: 30px 40px; border-radius: 12px; box-shadow: 0 15px 35px rgba(26, 37, 47, 0.15); margin-bottom: 40px; text-align: center; position: relative; overflow: hidden; border: 1px solid rgba(181, 147, 90, 0.3); }
.featured-quote-box::before { content: ''; position: absolute; top: -50%; left: -50%; width: 100%; height: 100%; background: radial-gradient(circle, rgba(181, 147, 90, 0.12) 0%, transparent 60%); pointer-events: none; }
.featured-quote-box i.main-quote-icon { font-size: 2.5rem; color: var(--accent-gold); opacity: 0.25; display: block; margin-bottom: 10px; }
.featured-quote-box p.main-quote-text { font-size: 1.6rem; font-style: italic; font-weight: 600; line-height: 1.4; max-width: 850px; margin: 0 auto 15px auto; letter-spacing: -0.3px; color: #f8fafc; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.featured-quote-box .main-quote-author { font-size: 0.8rem; text-transform: uppercase; font-weight: 700; letter-spacing: 2px; color: var(--accent-gold-light); display: inline-block; padding: 4px 15px; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); }

/* SEZIONE TITOLO LE ALTRE TESTIMONIANZE */
.page-title { padding-top: calc(var(--navbar-height) + 25px); padding-bottom: 20px; text-align: center; background-color: #fff; position: relative; }
.page-title h3 { font-size: 1.8rem; color: var(--text-dark); text-transform: uppercase; font-weight: 800; letter-spacing: 1px; }

/* GRIGLIA DELLE CARD (Layout a 2 colonne su Desktop) */
.quotes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 30px; }
.quote-card { background: #ffffff; border-radius: 12px; padding: 40px 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); border-bottom: 4px solid transparent; display: flex; flex-direction: column; justify-content: space-between; transition: var(--transition); position: relative; }
.quote-card:hover { transform: translateY(-8px); box-shadow: 0 20px 35px rgba(44, 62, 80, 0.07); border-bottom-color: var(--accent-gold); }
.quote-card .card-icon-wrapper { width: 45px; height: 45px; background: #f8fafc; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 25px; color: var(--accent-gold); transition: var(--transition); }
.quote-card:hover .card-icon-wrapper { background: var(--primary-blue); }
.quote-text { font-size: 1.05rem; line-height: 1.7; color: #475569; font-style: italic; margin-bottom: 25px; flex-grow: 1; font-weight: 400; }
.quote-author { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; color: #94a3b8; text-align: right; }

/* CARD LARGE (Occupa entrambe le colonne bilanciando il layout) */
.quote-card.large { grid-column: span 2; }

/* HAMBURGER */
.hamburger { display: none; cursor: pointer; background: none; border: none; z-index: 2100; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--text-dark); transition: var(--transition); }

/* CONTENUTI SPECIFICI */
.page-title h1 { font-size: 2.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dark); margin-bottom: 10px; }
.page-title::after { content: ''; display: block; width: 60px; height: 3px; background-color: var(--accent-gold); margin: 20px auto 0; }
.main-container { max-width: 900px; margin: 40px auto; padding: 0 20px; }
.content-block { background: #ffffff; border-radius: 8px; padding: 40px; margin-bottom: 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); }
.content-block p { font-size: 1.05rem; line-height: 1.8; color: #4a5568; margin-bottom: 20px; text-align: justify; }

/* HERO */
.story-hero { margin-top: var(--navbar-height); width: 100%; height: 350px; display: flex; align-items: center; background: white; position: relative; overflow: hidden; }
.hero-image-side { width: 50%; height: 100%; display: flex; align-items: center; position: relative; -webkit-mask-image: linear-gradient(to right, black 60%, transparent 100%); mask-image: linear-gradient(to right, black 60%, transparent 100%); }
.hero-image-side img { width: 100%; height: 80%; object-fit: cover; object-position: center top; display: block; }
.hero-text-side { width: 50%; padding: 0 5%; display: flex; flex-direction: column; justify-content: center; }
.hero-text-side h2 { font-size: 2.2rem; font-weight: 800; color: #1a4a7a; text-transform: uppercase; line-height: 1.1; margin: 0; }
.hero { margin-top: var(--navbar-height); min-height: calc(100vh - var(--navbar-height)); display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center, #ffffff 0%, var(--primary-blue) 100%); padding: 40px 5%; }
.hero-container { display: flex; align-items: center; max-width: 1100px; gap: 60px; flex-wrap: wrap; }
.watercolor-frame { flex: 1; min-width: 280px; display: flex; justify-content: center; }
.watercolor-frame img { width: 100%; max-width: 340px; border-radius: 50% 40% 60% 40% / 40% 50% 40% 60%; mask-image: radial-gradient(circle, black 50%, rgba(0,0,0,0) 85%); -webkit-mask-image: radial-gradient(circle, black 50%, rgba(0,0,0,0) 85%); }
.watercolorstoria-frame { flex: 1; min-width: 300px; display: flex; justify-content: center; }
.watercolorstoria-frame img { width: 60%; max-width: 300px; border-radius: 50% 40% 60% 40% / 40% 50% 40% 60%; mask-image: radial-gradient(circle, black 50%, rgba(0,0,0,0) 85%); -webkit-mask-image: radial-gradient(circle, black 50%, rgba(0,0,0,0) 85%); }
.hero-text { flex: 1.2; min-width: 300px; }
.hero-text h1 { font-size: 2.8rem; margin-bottom: 5px; line-height: 1.2; font-weight: 800; color: var(--text-dark); text-transform: uppercase; }

/* DATE DI NASCITA E DI NASCITA IN CIELO */
.hero-dates { font-size: 0.95rem; font-weight: 600; color: var(--accent-gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 25px; }
.hero-text p { font-style: italic; font-size: 1.05rem; margin-bottom: 30px; color: #4a5568; max-width: 550px; line-height: 1.7; position: relative; padding-left: 15px; border-left: 3px solid var(--accent-gold); }
.btn { display: inline-block; padding: 14px 32px; background: var(--text-dark); color: white; text-decoration: none; border-radius: 50px; font-weight: 600; font-size: 0.9rem; transition: var(--transition); text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn:hover { background: var(--accent-gold); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.15); }


/* STRUTTURA PAGINA E TIPOGRAFIA */
.story-section { margin-bottom: 60px; }
.story-section h3 { font-size: 1.8rem; margin-bottom: 25px; color: var(--text-dark); font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.story-section h3 span { color: var(--accent-gold); }
.story-section p, .text-content p { font-size: 0.95rem; line-height: 1.85; margin-bottom: 24px; text-align: justify; color: var(--text-muted); font-weight: 400; }
.story-section b, .story-section strong, .text-content b, .text-content strong { color: var(--text-dark); font-weight: 600; }
.first-paragraph::first-letter { font-size: 3rem; font-weight: 800; float: left; margin-right: 8px; line-height: 1; color: var(--accent-gold); }
.image-container { margin: 45px 0; text-align: center; }
.image-container img { max-width: 100%; max-height: 480px; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.06); }
.story-block { display: flex; flex-wrap: wrap; gap: 40px; margin-bottom: 60px; align-items: flex-start; }
.text-content { flex: 1 1 50%; }
.image-gallery { flex: 1 1 45%; }
.story-block:nth-child(even) { flex-direction: row-reverse; }
.image-gallery img { background: #fff; padding: 10px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); transform: rotate(-2deg); width: 100%; height: auto; }
@media (max-width: 768px) { .story-block { flex-direction: column; } }


/* STRUTTURA DELLA MODALE TEMPORIZZATA */
.custom-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(44, 62, 80, 0.6); backdrop-filter: blur(4px); justify-content: center; align-items: center; z-index: 3000; opacity: 0; transition: opacity 0.4s ease; }
.custom-modal.show { display: flex; opacity: 1; }
.modal-content { background: #ffffff; padding: 40px; border-radius: 12px; max-width: 500px; width: 90%; box-shadow: 0 15px 40px rgba(0,0,0,0.15); border-top: 4px solid var(--accent-gold); position: relative; transform: translateY(-20px); transition: transform 0.4s ease; text-align: center; }
.custom-modal.show .modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; color: #a0aec0; cursor: pointer; transition: var(--transition); }
.close-modal:hover { color: var(--text-dark); }
.modal-body h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: 15px; color: var(--text-dark); font-weight: 800; letter-spacing: 0.5px; }
.modal-body h3 span { color: var(--accent-gold); }
.modal-body p { font-size: 0.95rem; line-height: 1.6; color: #4a5568; margin-bottom: 25px; font-style: italic; }

/* LIBRI PUBBLICAZIONI */  
.books-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; padding: 20px; max-width: 1200px; margin: 0 auto; }
.book-card { background: #fff; padding: 20px; border-radius: 10px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: transform 0.3s ease; }
.book-card:hover { transform: translateY(-10px); }
.book-card img { max-width: 100%; height: auto; border-radius: 5px; margin-bottom: 15px; }
.book-card h3 { margin: 10px 0; color: #333; }
.book-card p { font-size: 0.95em; color: #666; margin-bottom: 20px; line-height: 1.5; }

/* CITAZIONI */
blockquote { background: #ffffff; padding: 35px 40px; border-left: 4px solid var(--accent-gold); margin: 45px 0; box-shadow: 0 4px 25px rgba(0,0,0,0.02); border-radius: 0 12px 12px 0; position: relative; }
blockquote::before { content: '“'; position: absolute; top: -10px; left: 15px; font-size: 5rem; color: rgba(181, 147, 90, 0.1); font-family: Georgia, serif; }
blockquote strong { display: block; font-style: normal; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1.5px; color: var(--accent-gold); margin-bottom: 15px; font-weight: 800; }
blockquote p { font-style: italic; font-size: 1rem !important; line-height: 1.8; color: var(--text-muted); margin-bottom: 0 !important; text-align: justify !important; }

/* BLOCCO QR CODE VIDEO */
.video-qr-container { background: #ffffff; border: 1px dashed var(--accent-gold); border-radius: 12px; padding: 30px; margin: 50px 0; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.video-qr-container h4 { font-size: 1.2rem; font-weight: 800; text-transform: uppercase; color: #1a4a7a; letter-spacing: 1px; margin-bottom: 5px; }
.qr-instruction { font-size: 0.85rem; color: var(--accent-gold); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 20px; display: block; }
.qr-code-wrapper { margin: 15px auto; display: inline-block; padding: 10px; background: #fff; border: 1px solid #eee; border-radius: 8px; }
.qr-code-wrapper img { width: 140px; height: 140px; display: block; }
.video-link-url { display: inline-block; margin-top: 15px; font-size: 0.9rem; color: var(--accent-gold); text-decoration: none; font-weight: 600; word-break: break-all; transition: var(--transition); }
.video-link-url:hover { color: var(--text-dark); text-decoration: underline; }
.callout-text { font-size: 1.1rem; line-height: 1.7; color: var(--text-dark); font-weight: 600; padding-left: 20px; border-left: 2px solid var(--primary-blue); margin: 30px 0; font-style: italic; text-align: justify; }

/* NUOVO LAYOUT GRIGLIA IMMAGINI FINALE */
.media-download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 40px; }
.media-download-item { background: #ffffff; border: 1px solid #eee; border-radius: 12px; padding: 25px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: var(--transition); display: flex; flex-direction: column; justify-content: space-between; }
.media-download-item:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.05); }
.media-download-item img { width: 100%; height: 280px; object-fit: contain; background-color: #fcfcfc; border-radius: 6px; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.media-download-desc { font-size: 0.95rem; line-height: 1.5; color: var(--accent-gold); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; min-height: 54px; display: flex; align-items: center; justify-content: center; }
.media-btn-group { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.media-btn-group .btn-pdf, .media-btn-group .btn-jpg { padding: 10px 20px; font-size: 0.75rem; justify-content: center; width: 100%; }

/* --- CORNICE E STILE CONTATTI COMPATTATO --- */
.contact-container { border: 2px solid var(--accent-gold); padding: 40px; position: relative; background: #ffffff; margin: 0 auto; max-width: 800px; }
.contact-container::before { content: ""; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px; border: 1px solid var(--accent-gold); pointer-events: none; }
.contact-header { text-align: center; margin-bottom: 30px; }
.contact-header h2 { font-weight: 800; color: var(--text-dark); text-transform: uppercase; margin-bottom: 10px; }
.contact-header p { font-style: italic; color: #666; font-size: 1rem; }
.custom-form .form-row { display: flex; gap: 20px; }
.form-group { margin-bottom: 20px; flex: 1; }
.form-group.full-width { flex: 0 0 100%; }
.custom-form label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.custom-form input, .custom-form select, .custom-form textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-family: 'Montserrat', sans-serif; transition: var(--transition); }
.custom-form input:focus, .custom-form select:focus, .custom-form textarea:focus { border-color: var(--accent-gold); outline: none; box-shadow: 0 0 5px rgba(181, 147, 90, 0.2); }
.btn-gold { display: inline-block; padding: 14px 35px; background: var(--accent-gold); color: #ffffff; border: none; border-radius: 50px; font-weight: 600; text-transform: uppercase; cursor: pointer; transition: var(--transition); width: 100%; }
.btn-gold:hover { background: var(--text-dark); transform: translateY(-2px); }

.privacy-box { display: flex !important; align-items: flex-start !important; gap: 12px !important; width: 100% !important; margin: 15px 0 !important; text-align: left !important; }
.privacy-box input[type="checkbox"] { margin-top: 4px !important; flex-shrink: 0 !important; width: 18px !important; height: 18px !important; }
.privacy-box label { margin: 0 !important; display: block !important; }

/* --- SFONDO E CORNICE CONTATTI --- */
.contact-bg-wrapper { position: relative; background-image: url('img/tua-immagine-sfocata.png'); background-size: cover; background-position: center; padding: 80px 20px; }
.contact-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.85); pointer-events: none; }
.contact-section { position: relative; z-index: 1; }

/* FOOTER */
footer { background-color: #1a252f !important; color: #ffffff; text-align: center; padding: 40px 20px; margin-top: 60px; width: 100%; display: block; }
.footer-email, .footer-contatti, .footer-privacy { color: var(--accent-gold); text-decoration: none; font-weight: 600; font-size: 1.1rem; display: block; margin-bottom: 20px; transition: var(--transition); }
.footer-email:hover, .footer-contatti:hover { color: #fff; }
.footer-copy { color: #7f8c8d; font-size: 0.8rem; margin-top: 10px; }

/* RESPONSIVE RESPONSIVE */
@media (max-width: 992px) {
  .content-block { padding: 25px 20px; }
  .dropdown { position: static; opacity: 1; visibility: visible; display: block; box-shadow: none; padding-left: 15px; }
  .dropdown li a { padding: 10px 0; font-size: 0.95rem; }
  .featured-quote-box { padding: 25px 20px; margin-bottom: 30px; }
  .featured-quote-box p.main-quote-text { font-size: 1.3rem; }
  footer { flex-direction: column; gap: 15px; text-align: center; }
  .gallery-card { padding: 10px 5px; }
  .gallery-hero { height: 80px; text-align: center; justify-content: center; }
  .hamburger { display: block; order: 3; }
  .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .hero-image-side { width: 100%; justify-content: center; }
  .hero-image-side img { max-width: 100%; height: 200px; -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%); mask-image: linear-gradient(to bottom, black 75%, transparent 100%); }
  .hero-section { height: 120px; text-align: center; justify-content: center; }
  .hero-text h2 { font-size: 1.9rem; }
  .hero-text-side { width: 100%; margin-top: 20px; }
  .hero-text-side h2 { font-size: 1.6rem; }
  .lang-flags { border: none; padding-left: 0; order: 2; margin-right: 10px; }
  .lightbox-close { top: 15px; right: 20px; font-size: 35px; }
  main { padding: 50px 5%; }
  .nav-container { gap: 12px; }
  .nav-item { margin-bottom: 25px; padding: 0; }
  .nav-item > a { font-size: 1.2rem; font-weight: 800; display: block; border-bottom: 1px solid #eee; padding-bottom: 5px; }
  .nav-menu { position: fixed; left: -100%; top: 0; flex-direction: column; background-color: #fff; width: 100%; height: 100vh; padding: 100px 10% 40px; transition: 0.4s; overflow-y: auto; }
  .nav-menu.active { left: 0; }
  .prayer-anchors-list { gap: 15px; }
  .prayer-columns { flex-direction: column; gap: 0; }
  .prayer-hero { height: 80px; text-align: center; justify-content: center; }    
  .prayer-column { width: 100%; }    
  .page-title h1 { font-size: 1.8rem; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
  .quote-card.large { grid-column: span 1; }
  .quotes-grid { grid-template-columns: 1fr; gap: 20px; }
  .story-hero { height: auto; padding: 40px 5%; flex-direction: column; text-align: center; }
  .story-section h3 { font-size: 1.5rem; }
  .story-section p { text-align: left; }
}

/* --- BLOCCO DEFINITIVO MOBILE: FIX LAYOUT, COLONNE E RESPONSIVITÀ --- */
@media screen and (max-width: 767px) {
  html, body { width: 100% !important; overflow-x: hidden !important; margin: 0 !important; padding: 0 !important; }
  .container, .prayer-container, .media-download-grid, .media-download-container { display: block !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; padding-left: 10px !important; padding-right: 10px !important; box-sizing: border-box !important; }
  .prayer-columns { display: flex !important; flex-direction: column !important; flex-wrap: wrap !important; width: 100% !important; overflow: visible !important; padding: 0 10px !important; box-sizing: border-box !important; }
  .prayer-column { display: block !important; width: 100% !important; flex: 0 0 100% !important; margin-bottom: 20px !important; visibility: visible !important; }
  h1, .page-title, .original-prayer-header h4 { font-size: 2.0rem !important; line-height: 1.2 !important; word-wrap: break-word !important; text-align: center !important; }
  h1 { font-size: 2.0rem !important; line-height: 1.2 !important; margin: 15px 0 !important; padding: 0 10px !important; text-align: center !important; word-break: break-word !important; }
  h2, h3, h4 { font-size: 1.3rem !important; line-height: 1.3 !important; margin: 10px 0 !important; padding: 0 10px !important; text-align: center !important; word-break: break-word !important; }
  img { max-width: 100% !important; height: auto !important; }
  .contact-container { padding: 25px; }
  .custom-form .form-row { flex-direction: column; gap: 0; }
}

@media screen and (max-width: 992px) {
  .media-download-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
}

/* BACK TO TOP E PULSANTIERA */
#backToTop { position: fixed !important; bottom: 20px; left: 50% !important; transform: translateX(-50%) !important; z-index: 99999 !important; width: 48px; height: 48px; background: #b5935a !important; color: #fff !important; border: 2px solid #b5935a !important; border-radius: 50% !important; cursor: pointer; display: none; align-items: center !important; justify-content: center !important; transition: all 0.4s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.3); padding: 0 !important; outline: none; }
#backToTop:hover { background: #2c3e50 !important; border: 2px solid #2c3e50 !important; color: #ffffff !important; transform: translateX(-50%) translateY(-5px) !important; background-color: var(--accent-gold); }
#backToTop i { color: inherit !important; margin: 0 !important; padding: 0 !important; font-size: 20px !important; line-height: 1 !important; display: block !important; }
.BackToTop { display: none; position: fixed; bottom: 30px; right: 30px; z-index: 99; border: none; outline: none; background-color: var(--text-dark); color: white; cursor: pointer; padding: 15px; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: var(--transition); align-items: center; justify-content: center; }

/* PULSANTI DOWNLOAD */
.pdf-jpg-download-container { text-align: center; margin: 50px 0 20px 0; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.btn-pdf { display: inline-flex; align-items: center; gap: 10px; padding: 14px 35px; background-color: #ffffff; color: var(--accent-gold); border: 2px solid var(--accent-gold); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; text-decoration: none; transition: var(--transition); cursor: pointer; }
.btn-pdf:hover { background-color: var(--accent-gold); color: #ffffff; box-shadow: 0 4px 15px rgba(181, 147, 90, 0.2); }
.btn-jpg { display: inline-flex; align-items: center; gap: 10px; padding: 14px 35px; background-color: #ffffff; color: #2c3e50; border: 2px solid var(--accent-gold); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; text-decoration: none; transition: var(--transition); cursor: pointer; }
.btn-jpg:hover { background-color: var(--accent-gold); color: #2c3e50; box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2); }

/* PULSANTI VIDEO */
.btn-video { display: inline-flex; align-items: center; gap: 10px; padding: 14px 35px; background-color: #ffffff; color: #2c3e50; border: 2px solid var(--accent-gold); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; border-radius: 4px; text-decoration: none; transition: var(--transition); cursor: pointer; }
.btn-video:hover { background-color: var(--accent-gold); color: #2c3e50; box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2); }

/* STRUTTURA COPERTINA VIDEO DI YOUTUBE */
.video-thumbnail-container { position: relative; width: 100%; border-radius: 6px; overflow: hidden; margin-bottom: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.video-thumbnail-container img { width: 100%; height: auto; display: block; object-fit: cover; }
.video-play-btn { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.2); display: flex; align-items: center; justify-content: center; text-decoration: none; transition: var(--transition); }
.video-play-btn i { color: #ffffff; font-size: 3rem; opacity: 0.85; transition: var(--transition); }
.video-thumbnail-container:hover .video-play-btn { background: rgba(0, 0, 0, 0.4); }
.video-thumbnail-container:hover .video-play-btn i { opacity: 1; transform: scale(1.15); }
.video-section h3 { font-size: 2.1rem; color: var(--accent-gold); text-transform: uppercase; margin-bottom: 8px; font-weight: 800; letter-spacing: 0.5px; text-align: center; }
.prayer-subtitle { font-size: 0.9rem; color: #7f8c8d; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; margin-bottom: 40px; text-align: center; line-height: 1.5; }

/* LAYOUT GRIGLIA MULTI-COLONNA */
.video-source-grid { font-size: 0.85rem; color: #4a5568; margin-bottom: 20px; line-height: 1.5; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.video-source-grid strong { color: var(--text-dark); font-weight: 600; }
.video-source-grid em { font-style: italic; color: var(--accent-gold); }
.media-btn-group .btn-video { padding: 12px 20px; font-size: 0.8rem; justify-content: center; width: 100%; }
.libri-source-grid { font-size: 0.85rem; color: #4a5568; margin-bottom: 0px; line-height: 1.5; min-height: 30px; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; padding-left: 20px; padding-right: 20px; text-align: center; box-sizing: border-box; }
.libri-source-grid strong { color: var(--text-dark); font-weight: 600; }
/* HERO SECTION */
.gallery-hero { margin-top: var(--navbar-height); width: 100%; height: 120px; display: flex; align-items: center; background: linear-gradient(to right, var(--primary-blue), #ffffff); padding: 0 5%; }
.hero-text-side h2 { font-size: 2.3rem; font-weight: 800; color: var(--text-dark); text-transform: uppercase; line-height: 1.2; }
.hero-text-side p { font-size: 1rem; color: #4a5568; margin-top: 10px; font-style: italic; }
.prayer-hero { margin-top: var(--navbar-height); width: 100%; height: 5px; display: flex; padding: 0 5%; }
.hero-section { margin-top: var(--navbar-height); width: 100%; height: 160px; display: flex; align-items: center; background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%); padding: 0 5%; position: relative; }
.hero-text h2 { font-size: 2.6rem; font-weight: 800; color: var(--text-dark); text-transform: uppercase; letter-spacing: -0.5px; }
.hero-text h2 span { color: var(--accent-gold); position: relative; }
.hero-text p { font-size: 1.05rem; color: #64748b; margin-top: 8px; font-style: italic; }

/* CONTENUTO GALLERIA */
main { padding: 0px 5%; max-width: 1360px; margin: 0 auto; }
.gallery-card { background: #ffffff; padding: 20px 15px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); margin-bottom: 50px; border-top: 3px solid var(--accent-gold); }
.gallery-section h3, .prayer-section h3 { font-size: 2.1rem; color: var(--accent-gold); text-transform: uppercase; margin-bottom: 8px; font-weight: 800; letter-spacing: 0.5px; text-align: center; }
.gallery-subtitle, .prayer-subtitle { font-size: 0.9rem; color: #7f8c8d; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; margin-bottom: 40px; text-align: center; }

/* DIVISORE ELEGANTE */
.gallery-divider, .prayer-divider { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 40px 0; }
.gallery-divider span, .prayer-divider span { display: block; width: 80px; height: 1px; background: #e2e8f0; }
.gallery-divider .dot, .prayer-divider .dot { width: 6px; height: 6px; background: var(--accent-gold); border-radius: 50%; }
.divider { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 20px 0; }
.divider span { display: block; width: 50px; height: 2px; background: var(--accent-gold); opacity: 0.3; }
.divider .dot { width: 8px; height: 8px; background: var(--accent-gold); border-radius: 50%; transform: rotate(45deg); }

/* NUOVA GRIGLIA FOTOGRAFICA CON INGRANDIMENTO */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; margin-top: 30px; }
.photo-item { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); background: #f9f9f9; cursor: pointer; transition: var(--transition); aspect-ratio: 4 / 3; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.photo-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.12); }
.photo-item:hover img { transform: scale(1.08); }

/* Overlay con icona zoom al passaggio del mouse */
.photo-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(44, 62, 80, 0.4); display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); }
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-overlay i { color: #ffffff; font-size: 1.8rem; transform: scale(0.8); transition: transform 0.3s ease; }
.photo-item:hover .photo-overlay i { transform: scale(1); }

/* STRUTTURA LIGHTBOX (FINESTRA MODALE INGRANDIMENTO) */
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; padding: 20px; }
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox-content { max-width: 90%; max-height: 85vh; object-fit: contain; border-radius: 4px; box-shadow: 0 5px 25px rgba(0,0,0,0.5); transform: scale(0.95); transition: transform 0.4s ease; }
.lightbox.active .lightbox-content { transform: scale(1); }
.lightbox-close { position: absolute; top: 25px; right: 35px; color: #ffffff; font-size: 40px; font-weight: 300; cursor: pointer; transition: var(--transition); user-select: none; }
.lightbox-close:hover { color: var(--accent-gold); transform: scale(1.1); }

/* MENU ANCORAGGI (INDICE RAPIDO) */
.prayer-anchors-nav { background: #fdfaf4; border: 1px solid #e2d2bd; padding: 25px; border-radius: 6px; margin-bottom: 50px; }
.prayer-anchors-title { font-size: 1.2rem; color: var(--text-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; text-align: center; }
.prayer-anchors-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 25px; list-style: none; }
.prayer-anchors-list a { text-decoration: none; color: var(--text-dark); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; transition: var(--transition); padding-bottom: 3px; border-bottom: 1px dashed transparent; }
.prayer-anchors-list a:hover { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }

/* BLOCCO DELLE SINGOLE PREGHIERE */
.prayer-section { padding-top: 20px; margin-bottom: 60px; }
.prayer-text-block { font-size: 0.95rem; line-height: 1.8; color: #34495e; margin-bottom: 25px; text-align: justify; }
.prayer-list { list-style-type: none; margin-bottom: 25px; }
.prayer-list li { font-size: 0.95rem; line-height: 1.8; color: #34495e; margin-bottom: 15px; text-align: justify; padding-left: 20px; text-indent: -20px; }
.prayer-highlight { background-color: #fdfaf4; border-left: 3px solid var(--accent-gold); padding: 25px; margin: 30px 0; font-style: italic; font-size: 1rem; color: #2c3e50; }
.liturgical-center { text-align: center; font-weight: 600; color: var(--accent-gold); font-size: 1rem; margin: 35px 0; letter-spacing: 0.5px; text-transform: uppercase; }
.prayer-title-gold { color: var(--accent-gold); display: block; margin-bottom: 10px; font-weight: 700; text-transform: uppercase; font-size: 1rem; letter-spacing: 0.5px; }

/* STRUTTURA PREGHIERA IMMAGINE (A DUE COLONNE) */
.original-prayer-container { margin-top: 30px; }
.original-prayer-header { text-align: center; margin-bottom: 40px; }
.original-prayer-header h4 { font-size: 2.2rem; color: var(--text-dark); font-weight: 800; margin-bottom: 5px; }
.original-prayer-header .dates { font-size: 1.1rem; color: var(--text-dark); font-weight: 600; margin-bottom: 25px; }
.original-prayer-header .quote { font-style: italic; font-size: 1.05rem; color: var(--text-muted); line-height: 1.6; max-width: 600px; margin: 0 auto 30px auto; }
.original-prayer-header .main-title { font-size: 1.1rem; font-weight: 800; color: var(--text-dark); letter-spacing: 0.5px; text-transform: uppercase; border-bottom: 2px solid var(--accent-gold); display: inline-block; padding-bottom: 5px; }
.prayer-columns { display: flex; gap: 5%; justify-content: space-between; margin-top: 30px; }
.prayer-column { width: 47.5%; }
.prayer-item-line { font-size: 0.95rem; line-height: 1.7; color: var(--text-dark); margin-bottom: 12px; text-align: left; font-weight: 600; }
.prayer-item-line strong { font-weight: 700; color: var(--text-dark); }
.prayer-item-line .indent-block { display: block; padding-left: 15px; }

    /* --- GESTIONE ANCORAGGI PREGHIERE --- */
    #novena-david,
    #preghiera-david-scritto,
    #novena-david-portoghese {
        scroll-margin-top: calc(var(--navbar-height) + 10px);
    }