/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* Galleria orizzontale nei progetti: solo la striscia è in bianco e nero. */
body.page-id-485 .il-project-photo-strip {
  width: 100%;
  margin-top: clamp(32px, 5vw, 64px);
}

body.page-id-485 .il-project-gallery-bar,
body.page-id-485 .il-project-gallery-controls {
  display: flex;
  align-items: center;
}

body.page-id-485 .il-project-gallery-bar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

body.page-id-485 .il-project-gallery-label {
  color: #ffd400;
  font-family: 'Mona Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

body.page-id-485 .il-project-gallery-controls { gap: 8px; }

body.page-id-485 .il-project-gallery-arrow.bricks-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  border: 1px solid #ffd400;
  border-radius: 50%;
  background: transparent;
  color: #ffd400;
  font: 20px/1 'Mona Sans', sans-serif;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}

body.page-id-485 .il-project-gallery-arrow.bricks-button:hover,
body.page-id-485 .il-project-gallery-arrow.bricks-button:focus-visible {
  background: #ffd400;
  color: #1b1a17;
}

body.page-id-485 .il-project-gallery-arrow.bricks-button:disabled {
  opacity: .35;
  cursor: default;
}

body.page-id-485 .il-project-gallery-track.bricks-layout-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 12px;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scrollbar-color: #ffd400 #25221e;
  scrollbar-width: thin;
}

body.page-id-485 .il-project-gallery-track.bricks-layout-wrapper > li {
  flex: 0 0 clamp(165px, 18vw, 225px) !important;
  width: clamp(165px, 18vw, 225px) !important;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}

body.page-id-485 .il-project-gallery-track figure,
body.page-id-485 .il-project-gallery-trigger { display: block; width: 100%; height: 100%; }
body.page-id-485 .il-project-gallery-track figure { margin: 0; }
body.page-id-485 .il-project-gallery-trigger {
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: zoom-in;
}

body.page-id-485 .il-project-gallery-track img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  filter: grayscale(1);
  transition: filter .25s ease;
}

body.page-id-485 .il-project-gallery-trigger:hover img,
body.page-id-485 .il-project-gallery-trigger:focus-visible img { filter: grayscale(0); }

body.page-id-485 .il-project-lightbox {
  width: min(94vw, 1200px);
  max-width: none;
  max-height: 94vh;
  padding: 44px 56px 28px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: #13120f;
  color: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.7);
}
body.page-id-485 .il-project-lightbox::backdrop { background: rgba(0,0,0,.88); }
body.page-id-485 .il-project-lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(94vh - 130px);
  margin: auto;
  object-fit: contain;
}
body.page-id-485 .il-project-lightbox-close,
body.page-id-485 .il-project-lightbox-prev,
body.page-id-485 .il-project-lightbox-next {
  position: absolute;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #ffd400;
  border-radius: 50%;
  background: #13120f;
  color: #ffd400;
  font: 21px/1 'Mona Sans', sans-serif;
  cursor: pointer;
}
body.page-id-485 .il-project-lightbox-close { top: 8px; right: 8px; }
body.page-id-485 .il-project-lightbox-prev { top: 50%; left: 10px; }
body.page-id-485 .il-project-lightbox-next { top: 50%; right: 10px; }
body.page-id-485 .il-project-lightbox-counter {
  margin: 12px 0 0;
  color: #ffd400;
  font: 500 12px/1.4 'Mona Sans', sans-serif;
  text-align: center;
}

@media (max-width: 600px) {
  body.page-id-485 .il-project-gallery-track.bricks-layout-wrapper > li {
    flex-basis: 152px !important;
    width: 152px !important;
  }
  body.page-id-485 .il-project-lightbox { width: 100vw; padding: 48px 42px 20px; }
  body.page-id-485 .il-project-lightbox-image { max-height: calc(94vh - 118px); }
  body.page-id-485 .il-project-lightbox-prev { left: 4px; }
  body.page-id-485 .il-project-lightbox-next { right: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  body.page-id-485 .il-project-gallery-track img,
  body.page-id-485 .il-project-gallery-arrow.bricks-button { transition: none; }
}

/* IL video: unobtrusive controls over the picture, shared by Home and projects. */
body:is(.page-id-420,.page-id-485) .il-video-player {
  position: relative;
  overflow: hidden;
  background: #050505;
}
body:is(.page-id-420,.page-id-485) .il-video-player video { display: block; }
body:is(.page-id-420,.page-id-485) .il-video-ui {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 38px 18px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  color: #fff;
  font-family: 'Mona Sans', sans-serif;
  transition: opacity .25s ease;
}
body:is(.page-id-420,.page-id-485) .il-video-icon {
  display: inline-grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #ffd400;
  border-radius: 50%;
  background: rgba(10,10,10,.56);
  color: #ffd400;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
body:is(.page-id-420,.page-id-485) .il-video-icon.is-primary,
body:is(.page-id-420,.page-id-485) .il-video-icon:hover,
body:is(.page-id-420,.page-id-485) .il-video-icon:focus-visible {
  background: #ffd400;
  color: #15130f;
}
body:is(.page-id-420,.page-id-485) .il-video-icon:hover { transform: translateY(-2px); }
body:is(.page-id-420,.page-id-485) .il-video-icon svg { display: block; width: 20px; height: 20px; }
body:is(.page-id-420,.page-id-485) .il-video-ui :is(button,input):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
body:is(.page-id-420,.page-id-485) .il-video-seek {
  appearance: none;
  flex: 1 1 auto;
  width: 100%;
  min-width: 28px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
body:is(.page-id-420,.page-id-485) .il-video-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffd400 var(--il-video-progress, 0%), rgba(255,255,255,.52) var(--il-video-progress, 0%));
}
body:is(.page-id-420,.page-id-485) .il-video-seek::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: #ffd400;
}
body:is(.page-id-420,.page-id-485) .il-video-seek::-moz-range-track { height: 3px; background: rgba(255,255,255,.52); }
body:is(.page-id-420,.page-id-485) .il-video-seek::-moz-range-progress { height: 3px; background: #ffd400; }
body:is(.page-id-420,.page-id-485) .il-video-seek::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: #ffd400; }
body:is(.page-id-420,.page-id-485) .il-video-time,
body.page-id-420 #reel-time {
  flex: 0 0 auto;
  color: #fff;
  font: 500 12px/1 'Mona Sans', sans-serif;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (hover: hover) and (pointer: fine) {
  body.page-id-485 .il-video-player[data-il-paused="false"] .il-video-ui { opacity: 0; }
  body.page-id-485 .il-video-player[data-il-paused="false"]:is(:hover,:focus-within) .il-video-ui { opacity: 1; }
}
body.page-id-485 .il-video-player:fullscreen {
  display: flex;
  align-items: center;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  background: #000;
}
body.page-id-485 .il-video-player:fullscreen video { width: 100%; max-height: 100vh; object-fit: contain; }

/* Home retains its approved video dimensions and existing seek/autoplay logic. */
body.page-id-420 #reel-controls.il-video-ui {
  right: 0;
  bottom: 0;
  left: 0;
  gap: 10px;
  padding: 38px 18px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
}
body.page-id-420 #reel-controls.il-video-ui::before { display: none; }
body.page-id-420 #reel-toggle.il-video-icon,
body.page-id-420 #reel-fullscreen.il-video-icon { padding: 0; font-size: 0; }
body.page-id-420 #reel-toggle.il-video-icon.is-primary { background: #ffd400; color: #15130f; }
body.page-id-420 #reel-toggle.il-video-icon::before {
  content: '';
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}
body.page-id-420 #video-reveal[data-reel-paused="false"] #reel-toggle.il-video-icon::before {
  width: 13px;
  height: 15px;
  margin-left: 0;
  border: 0;
  background: linear-gradient(90deg, currentColor 0 4px, transparent 4px 9px, currentColor 9px 13px);
}
body.page-id-420 #reel-seek.il-video-seek::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, #ffd400 var(--reel-progress, 0%), rgba(255,255,255,.52) var(--reel-progress, 0%));
}
@media (hover: hover) and (pointer: fine) {
  /* Mouse controls fade on entry/exit, including when paused or click-focused. */
  body.page-id-420 #video-reveal[data-reel-ready] #reel-controls.il-video-ui {
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
  }
  body.page-id-420 #video-reveal[data-reel-ready]:hover #reel-controls.il-video-ui,
  body.page-id-420 #video-reveal[data-reel-ready] #reel-controls.il-video-ui:has(:focus-visible) {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (max-width: 478px) {
  body:is(.page-id-420,.page-id-485) .il-video-ui,
  body.page-id-420 #reel-controls.il-video-ui { gap: 5px; padding: 26px 8px 8px; }
  body:is(.page-id-420,.page-id-485) .il-video-time,
  body.page-id-420 #reel-time { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  body:is(.page-id-420,.page-id-485) .il-video-ui,
  body:is(.page-id-420,.page-id-485) .il-video-icon { transition: none; }
}

/* Shared mobile header: logo, menu toggle and full-screen navigation. */
#il-mobile-menu-toggle { display: none; }
@media (max-width: 991px) {
  #brxe-31qfbn {
    --il-mobile-menu-gutter: calc(max(20px, 5vw) + 15px);
    padding: 16px 20px 0;
  }
  #brand-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 12px 14px !important;
  }
  #brxe-pu6m1a { position: relative; z-index: 4; flex: 0 0 auto; }
  #il-mobile-menu-toggle {
    display: block;
    position: relative;
    z-index: 4;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: #ffd400;
    color: #15130f;
    font-size: 0;
    cursor: pointer;
  }
  #il-mobile-menu-toggle::before,
  #il-mobile-menu-toggle::after {
    content: '';
    position: absolute;
    left: 12px;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: top .25s ease, transform .25s ease, box-shadow .25s ease;
  }
  #il-mobile-menu-toggle::before { top: 16px; box-shadow: 0 5px currentColor; }
  #il-mobile-menu-toggle::after { top: 26px; }
  #il-mobile-menu-toggle:focus-visible,
  #hero-index a:focus-visible,
  #index-contact:focus-visible { outline: 2px solid #ffd400; outline-offset: 4px; }
  .il-mobile-menu-ready #hero-index {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    width: 100% !important;
    height: 100dvh;
    overflow-y: auto;
    padding: 116px var(--il-mobile-menu-gutter) 110px;
    background: #ffd400;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  }
  .il-mobile-menu-ready #hero-index a {
    display: block;
    width: 100%;
    padding: 13px 0;
    border-bottom: 1px solid rgba(0,0,0,.23);
    color: #111;
    font-size: clamp(20px, 5.2vw, 27px);
    line-height: 1.25;
  }
  .il-mobile-menu-ready #index-contact { display: none; }
  .il-mobile-menu-open { overflow: hidden; }
  .il-mobile-menu-open #brand-row {
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .il-mobile-menu-open #hero-index {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .il-mobile-menu-open #logo-il { filter: none !important; }
  .il-mobile-menu-open #il-mobile-menu-toggle { background: #111; color: #ffd400; }
  .il-mobile-menu-open #hero-index a:focus-visible,
  .il-mobile-menu-open #index-contact:focus-visible { outline-color: #111; }
  .il-mobile-menu-open #index-contact {
    position: fixed;
    right: var(--il-mobile-menu-gutter);
    bottom: 24px;
    left: var(--il-mobile-menu-gutter);
    z-index: 3;
    display: flex;
    width: auto;
    min-height: 50px;
    background: #111 !important;
    color: #ffd400 !important;
  }
  .il-mobile-menu-open #index-contact:hover { background: #111 !important; color: #ffd400 !important; }
  .il-mobile-menu-open #il-mobile-menu-toggle::before { top: 21px; box-shadow: none; transform: rotate(45deg); }
  .il-mobile-menu-open #il-mobile-menu-toggle::after { top: 21px; transform: rotate(-45deg); }
}
@media (prefers-reduced-motion: reduce) {
  #hero-index, #il-mobile-menu-toggle::before, #il-mobile-menu-toggle::after { transition: none !important; }
}

@media (max-width: 991px) {
  #brxe-ftback { display: none !important; }
}

/* Let the Home headline wrap as one sentence on phones. */
@media (max-width: 767px) {
  body.page-id-420 #hero-title {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    column-gap: .23em !important;
    row-gap: 0 !important;
  }
  body.page-id-420 #hero-title > .brxe-div { display: contents !important; }
}
@media (max-width: 360px) {
  body.page-id-420 #hero-title { font-size: 32px !important; }
}

/* Keep the Home copy and slider controls inside short phone viewports. */
@media (max-width: 991px) and (orientation: landscape) and (max-height: 500px) {
  body.page-id-420 #inizio { padding-bottom: 75px; }
  body.page-id-420 #hero-copy { padding-top: 0; }
  body.page-id-420 #hero-eyebrow { margin-bottom: 12px; padding-top: 6px; padding-bottom: 6px; }
  body.page-id-420 #hero-title {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    column-gap: .23em !important;
    row-gap: 0 !important;
    margin-bottom: 12px;
    font-size: clamp(24px, 3.8vw, 30px) !important;
    line-height: 1.08;
  }
  body.page-id-420 #hero-title > .brxe-div { display: contents !important; }
  body.page-id-420 #hero-cta { padding: 10px 16px; font-size: 14px; }
}
@media (max-width: 478px) and (orientation: portrait) and (max-height: 540px) {
  body.page-id-420 #hero-title { font-size: 30px !important; }
  body.page-id-420 #hero-eyebrow { margin-bottom: 16px; }
}
@media (max-width: 340px) {
  body.page-id-420 #hero-cta { padding-left: 18px; padding-right: 18px; }
}

/* Keep the shared footer's legal details left and the Junction credit right on desktop. */
@media (min-width: 992px) {
  #brxe-ftbot0 { grid-template-columns: minmax(0, 1fr) auto !important; }
  #brxe-flgwr0 { grid-column: 1 !important; justify-self: start !important; justify-content: flex-start !important; }
  #brxe-rflegt { text-align: left !important; }
  #brxe-tcrd00 { grid-column: 2 !important; justify-self: end !important; }
}
