/* BenBoat — performance-safe visual polish */

/* Homepage — nascondi sezione Contattaci duplicata (+ blocco testimonials vuoto) */
body.home #contact,
body.home #testimonials {
  display: none !important;
}

/* Gallery section wrapper (pagine interne) */
.bb-gallery-section {
  background: #000;
  padding: 0.25rem 0 0.75rem;
}

body:not(.home) #kubio .wp-block-kubio-image-gallery__container:not(.bb-shared-gallery-wrap) {
  display: none !important;
}

/* Gallery — 2 righe, marquee moderno */
.wp-block-kubio-image-gallery__container.bb-gallery-wrap {
  margin: 0 auto !important;
  max-width: 1000px !important;
  overflow: hidden !important;
  padding: 0.5rem 0 0.75rem !important;
}

.bb-gallery-modern {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  overflow: hidden !important;
}

.bb-gallery-row {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
  overflow: hidden !important;
  width: 100% !important;
}

.bb-gallery-row-inner {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 14px !important;
  width: max-content !important;
}

.bb-gallery-row--1 .bb-gallery-row-inner {
  animation: bb-marquee-left 38s linear infinite;
}

.bb-gallery-row--2 .bb-gallery-row-inner {
  animation: bb-marquee-right 44s linear infinite;
}

.bb-gallery-row:hover .bb-gallery-row-inner {
  animation-play-state: paused;
}

.bb-gallery-card {
  flex: 0 0 auto !important;
  position: relative !important;
  width: clamp(130px, 20vw, 190px) !important;
  z-index: 1 !important;
}

.bb-gallery-card a {
  cursor: pointer !important;
  display: block !important;
  line-height: 0 !important;
  pointer-events: auto !important;
  position: relative !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2) !important;
}

.bb-gallery-card img {
  border-radius: 12px !important;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  display: block !important;
  height: 96px !important;
  object-fit: cover !important;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.45s ease !important;
  width: 100% !important;
}

.bb-gallery-card:hover img {
  box-shadow:
    0 14px 30px rgba(0, 86, 179, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-5px) scale(1.04) !important;
}

@keyframes bb-marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes bb-marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (max-width: 640px) {
  .bb-gallery-card {
    width: clamp(150px, 38vw, 190px) !important;
  }

  .bb-gallery-card img {
    height: 96px !important;
  }

  body:not(.home) #bb-shared-gallery .bb-gallery-section,
  body:not(.home) #bb-shared-gallery {
    padding: 0.5rem 0 1rem !important;
  }

  body:not(.home) #bb-shared-gallery .wp-block-kubio-image-gallery__container.bb-gallery-wrap {
    max-width: 100% !important;
    padding: 0.75rem 0 1rem !important;
  }

  body:not(.home) #bb-shared-gallery .bb-gallery-modern {
    gap: 16px !important;
  }

  body:not(.home) #bb-shared-gallery .bb-gallery-row-inner {
    gap: 16px !important;
  }

  body:not(.home) #bb-shared-gallery .bb-gallery-card {
    width: clamp(180px, 52vw, 240px) !important;
  }

  body:not(.home) #bb-shared-gallery .bb-gallery-card img {
    height: clamp(120px, 34vw, 160px) !important;
  }
}

/* Gallery lightbox — rimosso: i click aprono la pagina Momenti Speciali (?v=foto) */
.bb-booking-cancellation {
  background: #f0f7ff;
  border: 1px solid #c5daf0;
  border-radius: 10px;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
}

.bb-booking-cancellation strong {
  color: #0056b3;
}

/* Mobile — contrasto pulsanti Kubio/BenBoat (Kubio perde sfondi su viewport stretti) */
@media (max-width: 768px) {
  .bb-reviews-section .bb-btn-review {
    background: #ffffff !important;
    border: 2px solid #1a73e8 !important;
    color: #1a73e8 !important;
    -webkit-text-fill-color: #1a73e8;
  }

  .bb-reviews-section .bb-btn-outline {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
  }

  .wpcf7 input[type="submit"],
  .wpcf7 button[type="submit"] {
    background: #0056b3 !important;
    border: 2px solid #004494 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
  }

  #kubio a.wp-block-kubio-button__link.style-Dud6AOZG0Hc-link,
  #kubio a.wp-block-kubio-button__link.style-b-uxOUoRON-link {
    background-color: #ffc107 !important;
    border: 2px solid #f59e0b !important;
    color: #0b1f3a !important;
    text-decoration: none !important;
  }

  #kubio a.wp-block-kubio-button__link.style-Dud6AOZG0Hc-link .wp-block-kubio-button__text,
  #kubio a.wp-block-kubio-button__link.style-b-uxOUoRON-link .wp-block-kubio-button__text {
    color: #0b1f3a !important;
    -webkit-text-fill-color: #0b1f3a;
  }

  #kubio a.wp-block-kubio-button__link.style-K7j4z2_k_-link,
  #kubio a.wp-block-kubio-button__link.style-6Kh_Swrtyo-link,
  #kubio a.wp-block-kubio-button__link.style-pB2L6YaN3C-link,
  #kubio a.wp-block-kubio-button__link.style-JOP_yHZ13Q-link,
  #kubio a.wp-block-kubio-button__link.style-R23ev9eIxG-link {
    background-color: #0056b3 !important;
    border: 2px solid #004494 !important;
    color: #ffffff !important;
    text-decoration: none !important;
  }

  #kubio a.wp-block-kubio-button__link.style-K7j4z2_k_-link .wp-block-kubio-button__text,
  #kubio a.wp-block-kubio-button__link.style-6Kh_Swrtyo-link .wp-block-kubio-button__text,
  #kubio a.wp-block-kubio-button__link.style-pB2L6YaN3C-link .wp-block-kubio-button__text,
  #kubio a.wp-block-kubio-button__link.style-JOP_yHZ13Q-link .wp-block-kubio-button__text,
  #kubio a.wp-block-kubio-button__link.style-R23ev9eIxG-link .wp-block-kubio-button__text {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
  }

  /* Outline — hero/footer: bordo bianco su scuro, blu su chiaro */
  #kubio a.wp-block-kubio-button__link.style-_nlTwH-h1-link {
    background-color: transparent !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    text-decoration: none !important;
  }

  #kubio a.wp-block-kubio-button__link.style-_nlTwH-h1-link .wp-block-kubio-button__text {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
  }

  #kubio .style-TPmvhMDL7-align a.wp-block-kubio-button__link.style-_nlTwH-h1-link,
  #kubio .style-TPmvhMDL7-align a.wp-block-kubio-button__link.style-_nlTwH-h1-link .wp-block-kubio-button__text {
    border-color: #ffffff !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
  }

  /* Hamburger menu — tre linee blu visibili (Kubio offscreen, non .kubio-menu-mobile-toggle) */
  #kubio .wp-block-kubio-menu-offscreen__iconWrapper.kubio-offscreen-icon-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    min-height: 44px;
    min-width: 44px;
    padding: 8px !important;
  }

  #kubio .wp-block-kubio-menu-offscreen__icon,
  #kubio .wp-block-kubio-menu-offscreen__icon svg,
  #kubio .wp-block-kubio-menu-offscreen__icon svg path {
    fill: #0056b3 !important;
    color: #0056b3 !important;
  }

  #kubio .wp-block-kubio-menu-offscreen__iconWrapper:hover .wp-block-kubio-menu-offscreen__icon svg path,
  #kubio .wp-block-kubio-menu-offscreen__icon:hover svg path {
    fill: #003d7a !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-gallery-row--1 .bb-gallery-row-inner,
  .bb-gallery-row--2 .bb-gallery-row-inner {
    animation: none !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .bb-gallery-modern {
    gap: 10px !important;
  }
}

/* General photo polish — subtle only */
#kubio .wp-block-image img,
#kubio .kubio-card img {
  border-radius: 12px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#kubio .wp-block-image img:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* Payment — badge testuali brand, leggibili */
.payment-icons {
  align-items: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-top: 14px !important;
}

.payment-icons > div {
  display: none !important;
}

.bb-pay {
  align-items: center !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22) !important;
  display: inline-flex !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 800 !important;
  height: 34px !important;
  justify-content: center !important;
  letter-spacing: 0.06em !important;
  line-height: 1 !important;
  padding: 0 12px !important;
  white-space: nowrap !important;
}

.bb-pay--visa {
  background: #1a1f71 !important;
  color: #fff !important;
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  min-width: 62px !important;
}

.bb-pay--mc {
  background: #fff !important;
  color: #231f20 !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  gap: 5px !important;
  letter-spacing: 0 !important;
  padding: 0 10px !important;
  text-transform: lowercase !important;
}

.bb-pay--mc .bb-pay-mc-dots {
  background:
    radial-gradient(circle at 35% 50%, #eb001b 0 46%, transparent 47%),
    radial-gradient(circle at 65% 50%, #f79e1b 0 46%, transparent 47%) !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  height: 18px !important;
  width: 28px !important;
}

.bb-pay--amex {
  background: #016fd0 !important;
  color: #fff !important;
  font-size: 11px !important;
  letter-spacing: 0.04em !important;
}

.bb-pay--maestro {
  background: #fff !important;
  color: #231f20 !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  gap: 5px !important;
  letter-spacing: 0 !important;
  padding: 0 10px !important;
  text-transform: lowercase !important;
}

.bb-pay--maestro .bb-pay-maestro-dots {
  background:
    radial-gradient(circle at 35% 50%, #eb001b 0 46%, transparent 47%),
    radial-gradient(circle at 65% 50%, #0099df 0 46%, transparent 47%) !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  height: 18px !important;
  width: 28px !important;
}

/* Google reviews section */
.bb-reviews-section {
  background: linear-gradient(180deg, #f0f7ff 0%, #e8f2fb 100%);
  padding: 3.5rem 1.25rem;
  margin: 0;
}

.bb-reviews-inner {
  margin: 0 auto;
  max-width: 900px;
  text-align: center;
}

.bb-reviews-google-badge {
  align-items: center;
  color: #5a6570;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 600;
  gap: 0.4rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.bb-reviews-header h2 {
  color: #0056b3;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.bb-reviews-header p {
  color: #4a5568;
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 auto 1.75rem;
  max-width: 620px;
}

.bb-reviews-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.bb-btn {
  align-items: center;
  border-radius: 12px;
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 700;
  gap: 0.5rem;
  justify-content: center;
  line-height: 1.3;
  min-height: 54px;
  padding: 0.9rem 1.75rem;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bb-btn:hover {
  transform: translateY(-2px);
}

.bb-btn-review {
  background: #fff;
  border: 2px solid #dadce0;
  box-shadow: 0 6px 24px rgba(0, 86, 179, 0.2);
  color: #1a73e8 !important;
}

.bb-btn-review:hover {
  border-color: #4285f4;
  box-shadow: 0 10px 32px rgba(66, 133, 244, 0.28);
  color: #1558b0 !important;
}

.bb-reviews-section .bb-btn-outline {
  background: #0056b3 !important;
  border: 2px solid #0056b3 !important;
  box-shadow: 0 6px 24px rgba(0, 86, 179, 0.35);
  color: #fff !important;
}

.bb-reviews-section .bb-btn-outline:hover {
  background: #004494 !important;
  border-color: #004494 !important;
  color: #fff !important;
}

@media (max-width: 600px) {
  .bb-reviews-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .bb-btn {
    width: 100%;
  }
}
