
/* ========================================= */

/*      VARIABILI GLOBALI E FONT             */

/* ========================================= */
:root {
    --primary-color: #D42A2A; /* Rosso Basciano */
    --secondary-color: #FFD700; /* Giallo Basciano */
    --dark-color: #212529; /* Nero morbido */
    --light-color: #f8f9fa; /* (non usato, valuta se rimuovere) */
    --font-family: 'Open Sans', sans-serif;
    --gray-medium: #6c757d;
    --gray-dark: #343a40;
    --border-color: #dee2e6;
    --hover-primary: #b02323;
    --shadow-light: rgb(0 0 0 / 5%);
}

/* ========================================= */

/*      RESET E IMPOSTAZIONI GLOBALI         */

/* ========================================= */
html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
    font-family: var(--font-family);
    background-color: #fff; 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    flex-grow: 1;
}

/* ========================================= */

/*      BOOTSTRAP PERSONALIZZAZIONI           */

/* ========================================= */
.text-primary { color: var(--primary-color) !important; }
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background-color: var(--hover-primary); border-color: #a02020; /* Potresti usare variabile */ }
.pagination .page-item.active .page-link { background-color: var(--primary-color); border-color: var(--primary-color); }
.pagination .page-link { color: var(--primary-color); }
.pagination .page-link:hover { color: var(--hover-primary); }
.list-group-item.active { background-color: var(--primary-color); border-color: var(--primary-color); }
a { color: var(--primary-color); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--hover-primary); text-decoration: underline; }

/* ========================================= */

/*      NAVBAR                                */

/* ========================================= */
.bg-nero-puro {
    background-color: #1a1a1a !important;
    border-top: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    box-shadow: 0 -4px 0 0 var(--secondary-color), 0 4px 0 0 var(--primary-color);
}

.navbar-brand img {
  transition: transform 0.2s ease-in-out, height 0.3s ease-in-out;
}
.navbar-brand:hover img { transform: scale(1.05); }
.navbar-nav .nav-link { font-size: 0.95rem; padding: 0.5rem 0.7rem !important; }
.navbar-nav .btn-sm { padding: 0.2rem 0.5rem; font-size: 0.8rem; }

/* Search field desktop */
@media (width >= 992px) { 
    .search-field-custom { width: 150px; transition: width 0.3s ease-in-out; }
    .search-field-custom:focus { width: 220px; }
}

/* Mobile logo size e navbar-collapse */
@media (width <= 575.98px) {
  .navbar-brand img { height: 90px; }
}

@media (width >= 576px) and (width <= 767.98px) {
  .navbar-brand img { height: 100px; }
}

@media (width >= 768px) and (width <= 991.98px) {
  .navbar-brand img { height: 100px; }
}

@media (width >= 992px) and (width <= 1199.98px) {
  .navbar-brand img { height: 140px; }
}

@media (width >= 1200px) {
  .navbar-brand img { height: 150px; }
}

@media (width <= 991.98px) {
    .navbar-collapse .dropdown-menu { background-color: transparent !important; border: none; padding-left: 1rem; }
    .navbar-collapse .dropdown-item { padding: 0.5rem 1.5rem; color: rgb(255 255 255 / 70%); position: relative; }

    .navbar-collapse .dropdown-item::before {
        content: "↳";
        position: absolute;
        left: 0.5rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--secondary-color);
    }

    .navbar-collapse .dropdown-item:hover {
        color: #fff;
        background-color: transparent;
    }
}

/* ========================================= */

/*      ELEMENTI SPECIFICI                    */

/* ========================================= */
.card-title a { color: var(--dark-color); }
.card-title a:hover { color: var(--primary-color); text-decoration: none; }
.notizia-giorno-card { border: 2px solid var(--primary-color); }
.notizia-giorno-card .card-title { color: var(--primary-color); }
.object-fit-cover { object-fit: cover; }
.footer-bordered { border-top: 2px solid var(--primary-color); box-shadow: inset 0 2px 0 0 var(--secondary-color); }

/* Contenuto Articoli e Pagine */
.contenuto-articolo {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--gray-dark);
}
.contenuto-articolo p { margin-bottom: 1.4rem; }
.contenuto-articolo ul, .contenuto-articolo ol { padding-left: 2rem; margin-bottom: 1.3rem; }
.contenuto-articolo li { margin-bottom: 0.5rem; }

.contenuto-articolo h1, .contenuto-articolo h2, .contenuto-articolo h3, .contenuto-articolo h4, .contenuto-articolo h5 {
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

/* In /assets/css/style.css */

/* ========================================= */

/*      STILE BREADCRUMB AGGIORNATO          */

/* ========================================= */
.breadcrumb {
    background-color: transparent;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: nowrap; /* Impedisce di andare a capo */
    overflow: hidden;  /* Nasconde ciò che esce */
}

.breadcrumb-item {
    white-space: nowrap; /* Impedisce al testo di andare a capo */
    display: flex;
    align-items: center;
}

/* Stile per i link cliccabili (es. Home, Categoria) */
.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Stile per l'ultimo elemento (quello attivo) */
.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
    
    /* Regole per troncare il testo */
    overflow: hidden;
    text-overflow: ellipsis; /* Aggiunge i puntini "..." */
    max-width: 200px; /* Larghezza massima prima di troncare (puoi aggiustarla) */
}

/* Stile per il separatore ">" */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    padding: 0 0.5rem;
}

/* Su schermi molto piccoli, riduciamo ancora di più la larghezza massima */
@media (width <= 576px) {
    .breadcrumb-item.active {
        max-width: 120px;
    }
}


/* ========================================= */

/*      SIDEBAR                               */

/* ========================================= */
.sidebar-widget {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem var(--shadow-light);
    margin-bottom: 1.5rem;
}

.sidebar-widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.sidebar-widget-title i {
    color: var(--primary-color);
    margin-right: 0.85rem;
    font-size: 1.2rem;
}

.sidebar-widget-body {
    padding: 1rem;
}

.sidebar-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.sidebar .sidebar-list li a { padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.sidebar .sidebar-list li a:hover { background: transparent; transform: none; text-decoration: underline; }



.sidebar-list li a {
    display: block;
    padding: 0.3rem 0.25rem;
    color: #495057;
    text-decoration: none;
    border-bottom: 2px solid #f1f1f1;
    transition: all 0.2s ease-in-out;
}

.sidebar-list li:last-child a {
    border-bottom: none;
}

.sidebar-list li a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.newsletter-widget {
    background-color: #495057;
    border-color: #495057;
}

.newsletter-widget .sidebar-widget-title,
.newsletter-widget .sidebar-widget-body {
    border-color: rgb(255 255 255 / 10%);
}

.newsletter-widget .sidebar-widget-body {
    padding: 1.5rem;
}

/* ========================================= */

/*      BANNER E PULSANTI FLUTTUANTI          */

/* ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-color);
    color: #fff;
    padding: 15px 0;
    z-index: 1050;
    box-shadow: 0 -2px 10px rgb(0 0 0 / 20%);
    display: none;
}
.cookie-banner.show { display: block; }
.cookie-text { font-size: 0.9rem; margin-right: 20px; }
.cookie-link { color: var(--secondary-color); text-decoration: underline; }
.cookie-link:hover { color: #fff; }

/* Back to top unico e corretto */
#back-to-top {
    position: fixed;
    bottom: 50px;
    right: 25px;
    display: none;
    z-index: 1000;
    border-radius: 50%;
    padding: 0.5rem 0.85rem;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgb(0 0 0 / 20%);
    transition: all 0.3s ease-in-out;
}

#back-to-top:hover {
    transform: translateY(-5px);
}

/* ========================================= */

/*      STILI PAGINA NUMERI UTILI            */

/* ========================================= */
.service-card .card-title { font-size: 1.2rem; color: var(--dark-color); }
.service-card .list-group-item { border: none; padding-left: 0; padding-right: 0; }
.service-card .list-group-item i { width: 25px; color: var(--primary-color); }
.phone-number { font-weight: bold; font-size: 1.1rem; }

/* ========================================= */

/*      STILE WIDGET GOOGLE TRANSLATE        */

/* ========================================= */
.goog-te-gadget-simple {
    background-color: transparent !important;
    border: 1px solid rgb(255 255 255 / 40%) !important;
    border-radius: 5px !important;
    padding: 4px 6px !important;
    cursor: pointer;
}

.goog-te-gadget-simple .goog-te-menu-value span {
    color: #fff !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}
.goog-te-gadget-icon { display: none !important; }
.goog-te-menu-frame { box-shadow: 0 4px 12px rgb(0 0 0 / 40%) !important; }

/* ========================================= */

/*      STILI PER TICKER NOTIZIE (Plugin JS) */

/* ========================================= */
.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 100%;
    margin: 0;
}

.js-ticker {
    display: inline-block;
    white-space: nowrap;
    position: relative; /* Fondamentale per l'animazione */
}

.js-ticker li {
    display: inline-block;
    padding-right: 3rem;
}

.news-ticker-container {
  margin-top: 0;   /* o la stessa misura usata tra header e row */
  margin-bottom: 1rem; /* se vuoi anche sotto */

}

.news-ticker-container a {
    color: #000; /* nero */
    text-decoration: underline; /* sottolineatura */
    transition: color 0.3s ease;
}

.news-ticker-container a:hover,
.news-ticker-container a:focus,
.news-ticker-container a:active {
    color: #f00; /* rosso */
    text-decoration: none; /* sottolineatura solo in hover */
}

/* Keyframes pulsate (non usato, valuta se rimuovere) */
@keyframes pulsate {
  0%, 100% {
    background: linear-gradient(90deg, #fff176, #f44336);
  }

  50% {
    background: linear-gradient(90deg, #fff176, #d32f2f);
  }
}

.btn-pwa-install:disabled {
    background: var(--gray-medium); /* Colore grigio quando disabilitato */
    cursor: not-allowed; /* Cursore "non permesso" */
    box-shadow: none;
    transform: none;
}

.btn-basciano {
    background: linear-gradient(45deg, #d42a2a, #fbc02d);
    color: #212529;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgb(212 42 42 / 40%);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
    font-family: Nunito, sans-serif;
    text-transform: uppercase;
  }

  .btn-basciano:hover {
    background: linear-gradient(45deg, #fbc02d, #d42a2a);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgb(251 192 13 / 60%);
  }

  .btn-basciano:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(255 193 7 / 70%);
  }
  
  
  .btn-irresistibile {
    background: linear-gradient(45deg, #d42a2a, #fbc02d);
    color: #212529;
    font-weight: 700;
    padding: 0.85rem 2.5rem;
    border: none;
    border-radius: 30px;
    box-shadow: 0 6px 15px rgb(212 42 42 / 50%);
    cursor: pointer;
    font-family: Nunito, sans-serif, Arial, sans-serif;
    text-transform: uppercase;
    font-size: 1.1rem;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    user-select: none;
  }

  .btn-irresistibile:hover,
  .btn-irresistibile:focus {
    background: linear-gradient(45deg, #fbc02d, #d42a2a);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgb(251 192 13 / 70%);
    outline: none;
  }

  .btn-irresistibile:active {
    transform: scale(0.98);
    box-shadow: 0 4px 10px rgb(212 42 42 / 60%);
  }
  
 /* Stili responsive per la tabella */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

table th, table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid #ccc;
  font-size: 1rem;
}

@media (width <= 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }

  table thead {
    display: none;
  }

  table tr {
    margin-bottom: 1rem;
    border-bottom: 2px solid #ddd;
  }

  table td {
    position: relative;
    padding-left: 50%;
    font-size: 1rem;
  }

  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 45%;
    padding-left: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
  }
}

.paragraph {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
  
  
  .video-container {
      position: relative;
      padding-bottom: 56.25%; /* 16:9 */
      height: 0;
      overflow: hidden;
      max-width: 100%;
      background: #000;
    }

    .video-container iframe,
    .video-container video {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    
    .reading-time {
  font-size: 0.95em;
  color: #757575;
  margin-bottom: 1em;
}

.sidebar-widget {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

.sidebar-widget iframe {
  width: 100%;
  height: 150px;
  aspect-ratio: 382 / 192; /* oppure rapporto corretto */
  display: block;
  border: 0;
}

 #moscerino {
      position: absolute;
      width: 5px;
      height: 2px;
      background-color: black;
      border-radius: 50% / 40%;
      z-index: 9999;
      pointer-events: auto;
      transform-origin: center;}
      
 .card {
  border-radius: 0.75rem;
  box-shadow:
    0 4px 12px rgb(0 0 0 / 10%),
    0 0 0 rgb(255 255 0 / 0%),
    0 0 0 rgb(255 0 0 / 0%);
  transition: 
    transform 0.3s ease, 
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 40px rgb(0 0 0 / 35%),         /* Ombra nera profonda */
    0 0 24px 4px rgb(255 255 0 / 100%),       /* Glow giallo fortissimo */
    0 0 48px 8px rgb(255 0 0 / 90%);       /* Glow rosso molto vivido */
}




.news-ticker-container {
  border-bottom: 3px solid #ffc107; /* accento giallo */
}

.ticker-link:hover {
  color: #ffca28;
  text-decoration: none;
}

.reading-time {
  font-style: italic;
  color: #666;
  font-size: 0.9rem;
}

audio {
  border-radius: 10px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
}

.custom-cursor {
  width: 10px;
  height: 10px;
  position: fixed;
  pointer-events: none;
  background: yellow;
  clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
  z-index: 9999;
  filter: drop-shadow(0 0 2px orange);
}

.custom-cursor.click {
  transform: translate(-50%, -50%) scale(1.5);
  transition: transform 0.1s ease;
}