/**
 * WebHub Piattaforme - Shared Common CSS
 */

/* WebHub Master Topbar */
.top-promo-bar,
.top-bar,
.announcement-bar {
  background: #0f172a !important;
  padding: 8px 0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 99999 !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.webhub-topbar-wrapper {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0 4% !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.webhub-topbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.topbar-badge {
  background: rgba(247, 159, 52, 0.15) !important;
  color: #F79F34 !important;
  border: 1px solid rgba(247, 159, 52, 0.4) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
}

.topbar-btn {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

.topbar-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.topbar-btn-accent {
  background: linear-gradient(135deg, #F79F34 0%, #e68a1d 100%) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(247, 159, 52, 0.3) !important;
}

.topbar-btn-accent:hover {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%) !important;
}

.topbar-title {
  color: #cbd5e1 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  margin-left: 4px !important;
}

.webhub-topbar-right {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin-left: auto !important;
}

.topbar-email-link {
  color: #cbd5e1 !important;
  font-size: 11px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

/* Language Switcher in Master Topbar */
.topbar-lang-switcher {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
}

.topbar-lang-btn {
  color: #cbd5e1 !important;
  text-decoration: none !important;
  padding: 2px 4px !important;
  border-radius: 4px !important;
  transition: color 0.15s ease, background-color 0.15s ease !important;
}

.topbar-lang-btn:hover {
  color: #ffffff !important;
}

.topbar-lang-btn.active {
  color: #f97316 !important;
  background: rgba(249, 115, 22, 0.12) !important;
}

.topbar-lang-sep {
  color: #475569 !important;
  padding: 0 1px !important;
}

.topbar-email-link:hover {
  color: #ffffff !important;
}

.topbar-wa-btn {
  background: #25D366 !important;
  color: #ffffff !important;
  padding: 4px 12px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
  white-space: nowrap !important;
  transition: transform 0.2s ease !important;
}

.topbar-wa-btn:hover {
  transform: scale(1.03) !important;
  color: #ffffff !important;
}

@media (max-width: 768px) {
  /* !important needed: the base rule above forces display with !important. */
  .topbar-title {
    display: none !important;
  }
}

/* ==========================================================================
   SHARED PRICING TABLES DESIGN SYSTEM
   ========================================================================== */
.pricing-section-wrap {
  padding: 85px 0;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.pricing-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px 26px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.pricing-card.popular {
  border: 2px solid #F79F34;
  box-shadow: 0 10px 30px rgba(247, 159, 52, 0.12);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #F79F34 0%, #ea580c 100%);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: 0 3px 10px rgba(247, 159, 52, 0.35);
  white-space: nowrap;
}

.price-val {
  font-size: 2.2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  margin: 14px 0 6px;
  letter-spacing: -0.5px;
}

.price-val-period {
  font-size: 0.88rem;
  font-weight: 400;
  color: #64748b;
  margin-left: 4px;
}

.price-code-badge {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-pricing-primary {
  background: linear-gradient(135deg, #F79F34 0%, #ea580c 100%) !important;
  color: #0f172a !important;
  border: none !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  padding: 11px 20px !important;
  box-shadow: 0 4px 14px rgba(247, 159, 52, 0.3) !important;
  text-decoration: none !important;
  display: block;
  width: 100%;
  text-align: center;
}

.btn-pricing-outline {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  font-weight: 600 !important;
  border-radius: 50px !important;
  padding: 10px 20px !important;
  text-decoration: none !important;
  display: block;
  width: 100%;
  text-align: center;
  transition: all 0.2s ease !important;
}

.btn-pricing-outline:hover {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}


/* ==========================================================================
   SHARED PLATFORM LANDINGS CLEAN UTILITIES
   ========================================================================== */
.wh-plat-faq-q {
  color: #0f172a !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  display: block !important;
}

.wh-plat-lead {
  font-size: 1.0rem !important;
  line-height: 1.6 !important;
}

.wh-plat-overlay {
  background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.85) 100%) !important;
}

.wh-plat-icon-green {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
}

.wh-plat-icon-blue {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: rgba(14, 165, 233, 0.1) !important;
  color: #0ea5e9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
}

.wh-plat-icon-orange {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: rgba(245, 158, 11, 0.1) !important;
  color: #f59e0b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  flex-shrink: 0 !important;
}

.wh-plat-input {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  padding: 0.75rem 1rem !important;
  border-radius: 10px !important;
  font-size: 0.95rem !important;
}

.wh-plat-label {
  display: block !important;
  font-size: 0.83rem !important;
  font-weight: 500 !important;
  color: #334155 !important;
  margin-bottom: 0.35rem !important;
}

.wh-plat-card-title {
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  margin-bottom: 8px !important;
}

/* Official WebHub Universal Footer */
.webhub-footer-custom {
  background-color: #242830 !important;
  padding-top: 60px;
  color: #cbd5e0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.webhub-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(203, 213, 224, 0.4);
  border-radius: 50%;
  color: #ffffff !important;
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.webhub-social-btn:hover {
  background-color: #f97316;
  border-color: #f97316;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.webhub-footer-links a {
  color: #cbd5e0 !important;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

.webhub-footer-links a:hover {
  color: #f97316 !important;
  padding-left: 4px;
}

/* =========================================================
   WebHub Piattaforme - Template Grid & Responsive Showcase
   ========================================================= */
#template {
  width: 100%;
  padding: 5rem 2rem;
  background: #f8fafc;
}

#template .templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 991px) {
  #template .templates-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
}

@media (max-width: 576px) {
  #template .templates-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  #template {
    padding: 3.5rem 1.25rem !important;
  }
}

.template-only-card {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06);
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  text-decoration: none;
  background: #ffffff;
}

.template-only-card:hover {
  transform: translateY(-6px);
  border-color: #f59e0b;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.template-only-card img {
  width: 100%;
  display: block;
  height: 350px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Cover delle piattaforme (screenshot di pagina intera): mostra sempre la parte alta, con top bar e logo */
.template-only-card img[src*="-piattaforma-"] {
  object-position: top center;
}

.template-only-card:hover img {
  transform: scale(1.03);
}

.section-title {
  font-weight: 600 !important;
  letter-spacing: -0.5px !important;
}
.section-tag {
  font-weight: 600 !important;
  letter-spacing: 1px !important;
}
.photo-hero-title {
  font-weight: 600 !important;
}


/* Mobile: Bootstrap's .g-5 gutter (3rem) is wider than the container padding and pushes
   every section ~12px past the screen edge; the top bar must also be allowed to shrink. */
@media (max-width: 575.98px) {
  .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; }
  .webhub-topbar-wrapper { flex-wrap: wrap !important; }
  .webhub-topbar-left { min-width: 0 !important; max-width: 100%; }
  .webhub-topbar-right { flex-wrap: wrap !important; max-width: 100%; }
}

/* Mobile: the master topbar keeps only email + WhatsApp on one line. The templates differ in
   markup, so everything that neither is nor contains one of those two links gets hidden. */
@media (max-width: 767.98px) {
  :is(.webhub-topbar-wrapper, .top-bar) :not(a[href^="mailto:"], a[href*="wa.me"], a[href^="mailto:"] *, a[href*="wa.me"] *):not(:has(a[href^="mailto:"], a[href*="wa.me"])) {
    display: none !important;
  }
  :is(.webhub-topbar-wrapper, .top-bar) :has(a[href^="mailto:"], a[href*="wa.me"]),
  .webhub-topbar-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  :is(.webhub-topbar-wrapper, .top-bar) :has(a[href^="mailto:"], a[href*="wa.me"]) {
    padding: 0 !important;
  }
  :is(.webhub-topbar-wrapper, .top-bar) a:is([href^="mailto:"], [href*="wa.me"]) {
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  /* Hamburger: the brand (logo + platform name) filled the row and pushed the toggler onto
     a new line, aligned left. Let the brand shrink so the toggler stays beside it. */
  .navbar > .container > :is(.navbar-brand, .navbar-brand-logo),
  .nav-container > .logo-wrapper,
  :is(.navbar, .navbar-webhub) > .nav-brand {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 72px) !important;
    margin-right: 8px !important;
    white-space: normal !important;
  }
  .navbar > .container > :is(.navbar-brand, .navbar-brand-logo) *,
  .nav-container > .logo-wrapper *,
  :is(.navbar, .navbar-webhub) > .nav-brand * {
    min-width: 0;
  }
  .navbar-toggler, .mobile-nav-toggle, .nav-toggle {
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
}

/* Mobile: Bootstrap badges are nowrap, so long section labels ran past the screen edge. */
@media (max-width: 767.98px) {
  .badge {
    white-space: normal !important;
    max-width: 100%;
    line-height: 1.4;
  }
}

/* Mobile: topbar (email + WhatsApp) and navbar stay pinned while scrolling.
   - overflow-x: hidden on html/body turns body into a scroll container and silently breaks
     position: sticky; clip hides the overflow the same way without that side effect.
   - The topbar gets a fixed height so the navbar can stick right below it instead of
     sliding underneath it. */
@media (max-width: 767.98px) {
  html, body {
    overflow-x: clip !important;
  }
  .top-promo-bar,
  .top-bar,
  .announcement-bar {
    position: sticky !important;
    top: 0 !important;
    height: 42px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
  }
  .navbar.sticky-top,
  nav#mainNav,
  body > header:has(.mobile-nav-toggle) {
    position: sticky !important;
    top: 42px !important;
    z-index: 1020 !important;
  }
}
