/*!
 * FCRF_BARDINI – components.css
 * Reusable UI components (cards, buttons overrides, etc.)
 */

/* =====================================
   MENU MOBILE
   ===================================== */

/* Bottone hamburger mobile */
.fcrf-burger-btn {
    border: 0;
    background: transparent;
    padding: 0;
    margin-left: auto;
    margin-right: 16px;
    line-height: 1;
    transform: translateY(-2px);
}


/* Focus visibile sul burger mobile */
.fcrf-burger-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px #111;
  border-radius: 10px;
}

.fcrf-burger-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 22px;
}

.fcrf-burger-icon span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background-color: #000;
}


/* Offcanvas mobile */
.fcrf-mobile-offcanvas {
    background-color: #1f1f1f;
    color: #f5f5f5;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

.fcrf-mobile-nav-wrapper {
    margin-top: 1rem;
}

/* X di chiusura (mobile e mega) */
.fcrf-offcanvas-close {
    font-size: 3.2rem !important;
    line-height: 1;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    color: #ffffff !important;
}

/* Focus visibile sulla X (WCAG 2.4.7) */
.fcrf-offcanvas-close:focus,
.fcrf-offcanvas-close:focus-visible{
  outline: 3px solid #ffffff;
  outline-offset: 4px;
  border-radius: 8px;
}

/* Backdrop per tutti gli offcanvas (mobile + mega) */
.offcanvas-backdrop.show {
    opacity: 0.7 !important;
    background-color: #000 !important;
}

/* --- NAV MOBILE: PRIMO LIVELLO --- */

.fcrf-mobile-nav > .menu-item {
    margin-bottom: .25rem;
}

/* NEW: per le voci con submenu, metto link + toggle sulla stessa riga */
.fcrf-mobile-nav > .menu-item-has-children{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* permette al sub-menu di andare sotto */
}

/* CHANGED: il link non deve più contenere il toggle, quindi lo faccio "block" */
.fcrf-mobile-nav > .menu-item > a {
    display: block; /* CHANGED (prima era flex) */
    padding: .35rem 1.5rem;
    font-size: 1.4rem;
    font-weight: 400;
    color: #f5f5f5;
    text-decoration: none;
}

/* NEW: il link, nelle voci con submenu, prende tutto lo spazio disponibile */
.fcrf-mobile-nav > .menu-item-has-children > a{
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0.5rem; /* un filo di respiro prima del toggle */
}

.fcrf-mobile-nav > .menu-item > a:hover,
.fcrf-mobile-nav > .menu-item > a:focus {
    text-decoration: none;
    color: #ffffff;
}

/* Chevron per le voci con submenu */
.fcrf-mobile-nav .menu-item-has-children {
    position: relative;
}

/* CHANGED: toggle ora è sibling del link, quindi gli do dimensioni e allineamento */
.fcrf-submenu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.4rem;
    width: 44px;          /* NEW */
    height: 44px;         /* NEW */
    display: inline-flex; /* CHANGED (era flex, ok anche flex ma qui è più chiaro) */
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 0;       /* CHANGED: non serve più auto */
}

.fcrf-submenu-toggle i {
    font-size: 1.4rem;
    pointer-events: none;
    transition: transform 0.2s ease;
    transform-origin: center;
    line-height: 1; /* NEW: centra meglio l'icona */
}

.fcrf-submenu-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* CHANGED: allineo il focus al resto del progetto (focus-visible) */
.fcrf-submenu-toggle:focus,
.fcrf-submenu-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 8px;
}

/* --- NAV MOBILE: SECONDO LIVELLO --- */

/* reset pallini */
.fcrf-mobile-nav .sub-menu,
.fcrf-mobile-nav .sub-menu .menu-item {
    list-style: none !important;
    margin-left: 0 !important;
}

/* stato base: nascosto, con transizione */
.fcrf-mobile-nav .sub-menu {
    padding-left: 2rem !important;
    margin-top: .2rem;
    margin-bottom: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity .25s ease, max-height .25s ease;

    /* NEW: con li in flex, il sub-menu deve occupare tutta la riga sotto */
    flex-basis: 100%;
    width: 100%;
}

/* menu aperto */
.fcrf-mobile-nav .menu-item.is-open > .sub-menu {
    opacity: 1;
    max-height: 500px; /* valore abbastanza alto per tutti i casi */
}

.fcrf-mobile-nav .sub-menu .menu-item > a {
    display: block;
    padding: .2rem 0;
    font-size: 1.2rem;
    color: #f5f5f5;
    text-decoration: none !important;
}

.fcrf-mobile-nav .sub-menu .menu-item > a:hover,
.fcrf-mobile-nav .sub-menu .menu-item > a:focus {
    text-decoration: underline;
}


/* ===============================
   SEARCH FORM – stile pillola
   =============================== */

/* wrapper */
.fcrf-search-field-wrapper,
.fcrf-desktop-search-field-wrapper {
  position: relative;
}

/* input */
.fcrf-search-field-wrapper .search-field,
.fcrf-desktop-search-field-wrapper .search-field {
  width: 100%;
  border-radius: 999px;
  padding: 0.75rem 1rem 0.75rem 3rem; /* spazio a sinistra per la lente */
  border: 0;
  background-color: #e0e0e0;
  color: #000;
}

/* placeholder */
.fcrf-search-field-wrapper .search-field::placeholder,
.fcrf-desktop-search-field-wrapper .search-field::placeholder {
  color: #7a7a7a;
}

/* bottone lente */
.fcrf-search-field-wrapper .search-submit,
.fcrf-desktop-search-field-wrapper .search-submit {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 0;
  color: #000;
  cursor: pointer;
}

/* icona */
.fcrf-search-field-wrapper .search-submit i,
.fcrf-desktop-search-field-wrapper .search-submit i {
  font-size: 1.2rem;
}

/* focus accessibile */
.fcrf-search-field-wrapper .search-field:focus,
.fcrf-desktop-search-field-wrapper .search-field:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}



.fcrf-mobile-logo {
    padding-bottom: 2.5rem;
}

/* Hamburger bianco su header trasparente / navbar dark */
.navbar.navbar-dark .fcrf-burger-icon span,
body.header-trasp-active .fcrf-burger-icon span {
    background-color: #ffffff !important;
}

/* Riduce lo spazio sotto la voce di primo livello quando il submenu è aperto */
.fcrf-mobile-nav > .menu-item-has-children.is-open {
  margin-bottom: 0;
}

/* Spazio controllato SOLO sopra il sub-menu */
.fcrf-mobile-nav .menu-item.is-open > .sub-menu {
  margin-top: 0.25rem;   /* era .2rem, qui lo rendiamo più “attaccato” */
  margin-bottom: 0.5rem; /* era .75rem, un po’ troppo visivo */
}

/* =====================================
   MEGA MENU DESKTOP
   ===================================== */

/* Bottone mega-menu: icona + testo in verticale */
.fcrf-mega-btn {
  padding: 0;
  border: 0;
  background: transparent;
}

/* Wrapper icona + label */
.fcrf-mega-toggle-inner {
   display: flex;
    flex-direction: column;   /* icona sopra, testo sotto */
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
}

/* Icona hamburger del mega-menu */
.fcrf-mega-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fcrf-mega-icon span {
    width: 25px;
    height: 3px;
    background-color: currentColor;
    border-radius: 4px;
}

/* Label "Menu" sotto l’icona */
.fcrf-mega-label {
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
    color: currentColor;
    line-height: 1;
}

/* Versione bianca per header trasparente */
body.header-trasp-active .fcrf-mega-btn,
body.header-trasp-active .fcrf-mega-btn .fcrf-mega-icon span,
body.header-trasp-active .fcrf-mega-label {
    color: #fff !important;
}

/* --- Offcanvas mega-menu (pannello dx) --- */

.fcrf-desktop-mega-offcanvas {
    background-color: #121212;
    color: #fff;
}

/* larghezza “equilibrata” */
#fcrfDesktopMegaOffcanvas.offcanvas-end {
    width: 45vw !important;
    max-width: 560px !important;
}


/* padding orizzontale interno */
.fcrf-desktop-mega-offcanvas .offcanvas-body {
    padding-left: 50px !important;
    padding-right: 50px !important;
}

/* --- Struttura lista mega-menu --- */

/* ul principale */
.fcrf-desktop-mega {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* reset li */
.fcrf-desktop-mega .menu-item {
    margin: 0;
    padding: 0;
    border: none;
}

/* sub-menu */
.fcrf-desktop-mega .sub-menu {
    list-style: none !important;
    margin: 8px 0 0;
    padding: 0;
}

/* Prima riga livello 1 con linea */
.fcrf-desktop-mega > .menu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    padding: 12px 0 18px;
}

/* Nessuna linea sui figli */
.fcrf-desktop-mega .sub-menu > .menu-item {
    border: none;
    padding: 4px 0;
}

/* Link primo livello */
.fcrf-desktop-mega a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.1rem;
}

.fcrf-desktop-mega a:hover {
    opacity: 0.85;
}

/* Link secondo livello: più piccoli e indentati */
.fcrf-desktop-mega .sub-menu > .menu-item > a {
    font-size: 1rem;
    padding-left: 28px;
    opacity: 0.95;
}

/* --- Pulsante + / − per aprire i sottomenu --- */

/* li con figli: spazio per l’icona */
.fcrf-desktop-mega-offcanvas .menu-item-has-children {
    position: relative;
    padding-right: 40px;
}

/* link di primo livello cliccabile */
.fcrf-desktop-mega-offcanvas .menu-item-has-children > a {
    display: inline-block;
    width: auto;
    cursor: pointer;
}

/* bottone +/− */
.fcrf-desktop-mega-offcanvas .fcrf-desktop-submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
}

/* animazione icona */
.fcrf-desktop-mega-offcanvas .fcrf-desktop-submenu-toggle i {
    transition: transform 0.25s ease;
    transform-origin: center;
}

/* ruota il + di 45° quando aperto (classe is-open aggiunta via JS) */
.fcrf-desktop-mega-offcanvas .menu-item.is-open > .fcrf-desktop-submenu-toggle i {
    transform: rotate(45deg);
}

/* Focus visibile sul bottone mega-menu (hamburger desktop/tablet) */
.fcrf-mega-btn:focus,
.fcrf-mega-btn:focus-visible{
  outline: 3px solid #111;
  outline-offset: 4px;
  border-radius: 8px;
}


/* =====================================
   BBACK TO TOP
   ===================================== */


.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  z-index: 1000;
  padding: 10px 15px;
  font-size: 20px;
  border-radius: 10px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}


/* =====================================
   BOTTONI
   ===================================== */

.btn-primary {
    background: #841D1E;
    border: none;
}

.btn-primary:hover {
    background: #430506;
}



/* =====================================
   PAGINAZIONE
   ===================================== */

.pagination {
  margin-bottom:30px;
  margin-top:30px;
  justify-content: center;
}

.pagination-blog {
  margin-bottom:30px;
  margin-top:30px;
}

.page-numbers {
  display:inline-block;
  padding:5px 15px;
  background: #fff;
  border: 1px solid #222;
}

.pagination-blog a {
  text-decoration: none !important;
}




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

.card-evidenza {
  border:1px solid #222;
  border-radius:0px;
}

.footer-categoria {
  background: #fff;
  border-top: none;
  padding-top: 0px;
  border-radius: 0px !important;

}

.footer-categoria a {
  color: #333;
  font-size: 16px;
}

.card-mostre {
  border: 0px !important;
}


/* CARD HOME
-------------------------------------*/

.card-primo-piano {
  position:relative;
  background-color: #fff;
  margin-top:-60px;
  margin-right: 30px;
  border: 0px !important;
  z-index:1;
}

.card-home h5 {
  font-size: 1.2rem !important;
  line-height: 1.4rem !important;
}

.img-primo-piano {
  border-radius: 0px !important;
}

.card-home {
  padding-top: 0px !important;
  border: 0px !important;
}

@media (max-width:767px) {
.card-home {
    padding-top:20px !important;
    }
}



/* CARD MOSTRE
-------------------------------------*/

.card-img-overlay {
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
}

.card-img {border-radius: 0px !important;}


/* =====================================
   WIDGET
   ===================================== */


/* Widgets Sidebar
-------------------------------------*/


.widget_search {padding:10px;}
.widget_search .screen-reader-text {display:block;}
.widget_search #s {
  width: 70%;
float: left;
border-radius: 6px 0px 0px 6px;
border: 1px solid #bbbb;
}

.widget li {
  list-style-type: none;
  margin-bottom:10px;
  line-height:1.4em;
}


.widg_tit {
  position:relative;
  overflow: hidden;
}

.widg_tit_footer {
  position:relative;
  overflow: hidden;
}

  @media (max-width:767px) {
    .widg_tit_footer {
      text-align:center;
      }
    }


.titolo-widget {
  display: block;
  text-transform: uppercase;
  font-size: 1.0rem;
  font-weight: bold;
}

.trattino-titolo {
    display: block;
    border-top-width: 2px;
    border-top-style: solid;
    overflow: hidden;
    margin-top: 0.5em;
    width: 50px;
    border-color:#333;
  }


.footer .widget_search {padding: 0px 10px 0px 10px;}

.widget select {
  width:100%;
}

.widget-sidebar {
  padding: 0px 20px 20px 20px;
  margin-bottom: 20px;
}


/* Widgets Sidebar Footer
-------------------------------------*/

.titolo-widget-footer {
  font-weight: 600;
}

.trattino-titolo-footer {
    display: block;
    border-top-width: 2px;
    border-top-style: solid;
    overflow: hidden;
    margin-top: 0.7em;
    width: 18px;
    border-color: #749719;
  }



/* =====================================
   PULSANTI CONDIVISIONE SOCIAL
   ===================================== */


/* Contenitore share */
.fcrf-share {
    gap: 1rem;
}

/* Label "Condividi:" */
.fcrf-share-label {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #5a5a5f;
}

/* Gruppo di bottoni */
.fcrf-share-group .btn-share {
    /* dimensione quadrata */
    width: 52px;
    height: 52px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f2f1f6; /* stesso colore del background */
    color: #4a4a4f;

    font-size: 1.3rem;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease,
        color 0.2s ease;
}

/* Hover / focus */
.fcrf-share-group .btn-share:hover,
.fcrf-share-group .btn-share:focus {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #202020;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* Stato active (click) */
.fcrf-share-group .btn-share:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

/* Versione mobile: un filo meno spaziosa */
@media (max-width: 575.98px) {
    .fcrf-share {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .fcrf-share-group .btn-share {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        font-size: 1.1rem;
    }
}





/* =====================================
   REGOLA FORM-CONTROL
   ===================================== */


.form-control::placeholder,
.form-select::placeholder,
textarea::placeholder {
  color: #999;
  opacity: 1;
}


/* =====================================
   COMMENTI
   ===================================== */

#comments {margin-bottom:40px;}
.comments {padding-top:40px;}
.comments textarea {width:100%;}
.comments label {min-width:80px;}
.comment .reply {
  border-bottom: 1px solid #ccc;
  margin-bottom:30px;
  padding-bottom:10px;
}
.comments ul,
.comments ol {list-style-type:none;}
.comment-author img {border-radius: 999px;}


 