:root {
  --bmm-green: #274f41;
  --bmm-green-dark: #1a352b;
  --bmm-pink: #ddb6c6;
  --bmm-pink-dark: #c98ea5;
  --bmm-text: #000;
  --bmm-bg: #ffffff;
}

html, body {
  overflow-x: hidden; /* rete di sicurezza contro elementi full-width che sforano */
}

body {
  color: var(--bmm-text);
  font-size: 1.1rem;
}

a {
  color: var(--bmm-green);
  transition: color 0.15s ease-in-out;
}
a:hover,
a:focus {
  color: var(--bmm-pink-dark);
}

h3 {
  color: var(--bmm-pink);
}

h3 a {
    color: var(--bmm-pink);
  font-style: normal;
}

@font-face {
    font-family: 'Retro Cookies';
    src: url('/themes/custom/blockmymind/fonts/Retro-Cookies.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.bmmcookie {
    font-family: 'Retro Cookies', cursive;
    font-weight: normal;
    font-style: normal;
}

/* Focus da tastiera visibile ovunque (accessibilità) */
a:focus-visible,
button:focus-visible,
.navbar-toggler:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--bmm-pink);
  outline-offset: 2px;
}

/* ==========================================================================
   BRAND / LOGO
   ========================================================================== */

.navbar-brand img {
  max-height: 60px;
}

.path-frontpage .navbar-brand {
  visibility: hidden;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.navbar .region-wrapper-header.full-width {
  width: auto;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  left: auto;
  right: auto;
}
.navbar .region-wrapper-header.full-width > .container {
  width: auto;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  margin: 0;
}

/* La navbar deve stare sempre sopra al resto (hero incluso, che ha z-index:1) */
.navbar {
  position: relative;
  z-index: 1030;
  background-color: var(--bmm-bg);
}

.navbar > .container {
  align-items: center;
}

/* Allinea tutte le voci del menu sulla stessa linea verticale.
   "Home" (senza freccina dropdown accanto) tende a scendere di qualche
   pixel rispetto alle voci con .dropdown-toggle: uniformiamo altezza,
   line-height e allineamento con flex invece di lasciarlo al default. */

#navbar-main .navbar-nav {
    align-items: center;
    border-bottom: 1px solid var(--bmm-pink-dark);
}

/* Linee personalizzate bmm menu 

.navbar-nav .nav-link.active::before,
.navbar-nav .nav-link.active::after {
    content: "";
    position: absolute;
    display: block;
}

.navbar-nav .nav-link.active::before {
    width: 17px;
    height: 5px;
    background: url('/themes/custom/blockmymind/images/menu-top.svg') center/contain no-repeat;
    bottom: calc(100% - 1px);
    right: -3px;
}

.navbar-nav .nav-link.active::after {
    width: 15px;
    height: 12px;
    background: url('/themes/custom/blockmymind/images/menu-bottom.svg') center/contain no-repeat;
    top: calc(100% - 2px);
    left: -13px;
}*/

/* Icona hamburger ridefinita: il default a volte diventa invisibile
   quando la navbar è chiara o trasparente */
.navbar-toggler {
  border-color: var(--bmm-green);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23274f41' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
  z-index: 1030;
}

@media (max-width: 1199px) {
  .navbar-collapse {
    background-color: var(--bmm-bg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 1rem 1rem;
    margin-top: 0.5rem;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  .navbar-nav {
    width: 100%;
  }

  /* touch target più larghi (min ~44px consigliati) */
  .navbar-nav .nav-link {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(39, 79, 65, 0.1);
  }
  .navbar-nav .nav-item:last-child > .nav-link {
    border-bottom: none;
  }

  /* Sottomenu (Associazione, Evento): niente posizionamento assoluto su
     mobile, altrimenti finiscono clippati dall'overflow del pannello
     o fuori schermo. Diventano un blocco inline sotto la voce padre. */
  .navbar-nav .dropdown-menu {
    position: static;
    float: none;
    width: 100%;
    border: none;
    box-shadow: none;
    padding-left: 1rem;
    background-color: rgba(39, 79, 65, 0.04);
  }
}

/* Voce di menu attiva, coerente col brand (già presente nel markup: .active/.is-active) */

.navbar-nav .nav-link {
    color: var(--bmm-text);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.is-active {
  color: var(--bmm-pink-dark);
  font-weight: 600;
}

.dropdown-item.active,
.dropdown-item:active {
    color: var(--bmm-pink-dark);
  background-color: #fff;
}

.dropdown-menu .is-active,
.dropdown-menu .is-active {
    color: var(--bmm-pink-dark) !important;
    font-weight: 600;
}


/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  width: 100vw;
  min-height: 95vh;
  min-height: 95dvh; /* corregge il salto dato dalla barra indirizzi su mobile */
  margin-left: calc(50% - 50vw);
  background-image: url('/sites/default/files/hero-home.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.35) 100%);
  z-index: 0;
}

.hero-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.hero-logo img {
  max-width: 500px;
  height: auto;
}

@media (max-width: 575px) {
  .hero {
    min-height: 70vh;
    min-height: 70dvh;
  }
  .hero-logo img {
    max-width: 260px;
  }
}

/* ==========================================================================
   MAIN WRAPPER
   ========================================================================== */
.layout-main-wrapper {
  margin-top: 40px;
  margin-bottom: 50px;
}



/* ==========================================================================
   BOTTONI (coerenza col brand)
   ========================================================================== */
.btn-iscrizione {
  display: inline-block;
  position: relative;
  text-align: center;
  text-transform: uppercase;
  padding: 16px 30px;
  background: var(--bmm-green);
  color: var(--bmm-pink);
  font-weight: bold;
  font-size: 1.5rem;
  border-radius: 30px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  z-index: 0;
  cursor: pointer;
  margin-top: 0.5em; 
}

.btn-primary {
  background-color: var(--bmm-green);
  border-color: var(--bmm-green);
  border-radius: 
  color: var(--bmm-pink);
  font-weight: 600;
  font-size: 1.3rem;
  border-radius: 30px;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-iscrizione:hover,
.btn-iscrizione:focus{
  background-color: var(--bmm-green-dark);
  border-color: var(--bmm-green-dark);
  color: var(--bmm-pink);
}

.btn-secondary,
.btn-outline-secondary {
  color: var(--bmm-green);
  border-color: var(--bmm-pink);
}
.btn-secondary:hover,
.btn-outline-secondary:hover {
  background-color: var(--bmm-pink);
  color: var(--bmm-green-dark);
  border-color: var(--bmm-pink);
}



/* ==========================================================================
   FOOTER
   ========================================================================== */
.featured-bottom {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background-color: var(--bmm-pink);
  padding: 3rem 0;
}


.site-footer {
  background-color: var(--bmm-green);
  color: #fff;
}
.site-footer a {
  color: #fff;
}
.site-footer a:hover,
.site-footer a:focus {
  color: var(--bmm-pink);
}
.site-footer h2 {
  color: var(--bmm-pink);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer .block {
    border: 0 !important;
    box-shadow: none !important;
}

.site-footer h2 {
    border-bottom: none !important;
}
``