/**
 * Public site — responsive & small-screen polish (loads after neon.css)
 */

/* ---- No horizontal scroll; respect notched devices ---- */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* ---- Bootstrap display-4 is huge on phones — fluid headings ---- */
#gallery .display-4,
#gallery-2 .display-4,
#customers .display-4,
#products .display-4,
.contact-title.display-4 {
  font-size: clamp(1.65rem, 4.2vw + 0.85rem, 3.15rem) !important;
  line-height: 1.12 !important;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

section .lead.text-muted,
section .contact-subtitle.lead {
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Navbar: long brand text + mobile menu ---- */
.navbar-full-width .navbar-inner {
  padding-left: max(0.75rem, env(safe-area-inset-left, 0));
  padding-right: max(0.75rem, env(safe-area-inset-right, 0));
}

.navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  max-width: min(100%, calc(100vw - 5.25rem));
  gap: 0.35rem;
}

.navbar .navbar-brand .navbar-brand-icon-img {
  flex-shrink: 0;
}

.navbar .navbar-brand b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

@media (max-width: 767.98px) {
  .navbar-full-width .navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .navbar-full-width .navbar-nav.ml-auto {
    margin-left: 0 !important;
    width: 100%;
    text-align: center;
  }

  .navbar-full-width .navbar-nav .nav-link {
    padding: 0.65rem 0.5rem !important;
  }
}

/* ---- Hero: tagline + CTA spacing ---- */
.welcome-tagline {
  font-size: clamp(0.92rem, 2.6vw, 1.12rem);
  max-width: min(26rem, 100%);
}

.welcome-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

@media (min-width: 576px) {
  .welcome-cta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

@media (max-width: 575.98px) {
  .welcome-cta .btn.ml-2.ml-sm-3 {
    margin-left: 0 !important;
  }
}

@media (max-width: 575.98px), (max-height: 720px) {
  .effects-dots {
    bottom: max(0.5rem, env(safe-area-inset-bottom, 0));
    max-width: calc(100vw - 1.5rem);
    flex-wrap: wrap;
    justify-content: center;
  }
}

.welcome-section-inner {
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0));
}

/* ---- Gallery cards: shorter image on narrow screens ---- */
@media (max-width: 575.98px) {
  .gallery-card img,
  .gallery-card-image-wrap img {
    height: clamp(160px, 42vw, 220px);
  }

  .gallery-card-overlay {
    padding: 1rem 0.9rem;
  }

  .gallery-card-title {
    font-size: 1.05rem;
  }
}

/* ---- Gallery 2: header text wraps, doesn’t crush toggle ---- */
.gallery2-card-header {
  gap: 0.75rem;
  align-items: flex-start;
}

.gallery2-card-header > div:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.gallery2-card-title {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---- Product cards: 2 columns on small tablets ---- */
@media (min-width: 480px) and (max-width: 767.98px) {
  .product-cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 479.98px) {
  .product-cap-card {
    padding: 1.35rem 1.15rem 1.25rem;
  }

  .product-cap-title {
    font-size: 1.12rem;
  }
}

/* ---- Customers marquee: tighter on phones ---- */
@media (max-width: 575.98px) {
  .customer-logo {
    margin: 0 1rem;
  }

  .customer-logo img {
    height: 48px;
  }

  .customer-detail {
    padding: 1.25rem 1.1rem;
  }
}

/* ---- Contact: form + cards breathe on XS ---- */
@media (max-width: 575.98px) {
  .contact-form-card,
  .contact-info-card {
    padding: 1.25rem 1.1rem;
  }

  .contact-map-header {
    padding: 1rem 1.1rem;
  }

  .contact-submit-btn {
    width: 100%;
    text-align: center;
  }
}

/* ---- Footer newsletter: never wider than column ---- */
.footer-newsletter-form {
  max-width: 100%;
}

@media (max-width: 575.98px) {
  .footer-newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-newsletter-input {
    min-width: 0 !important;
    width: 100%;
  }

  .footer-newsletter-btn {
    width: 100%;
  }

  .site-footer .footer-inner {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0));
  }
}

/* ---- About pillars ---- */
@media (max-width: 575.98px) {
  .about-pillar {
    padding: 1.5rem 1.15rem;
  }
}

/* ---- Map iframe container min height on small screens ---- */
@media (max-width: 575.98px) {
  .contact-map-card .contact-map-frame {
    min-height: 200px;
  }
}
