/* Final responsive and readability fixes */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
iframe {
  max-width: 100%;
}

main,
section,
.container,
.section-shell,
.service-detail,
.service-detail__body,
.article-layout,
.article-body,
.article-sidebar,
.contact-layout,
.about-layout,
.page-hero__inner,
.hero__inner {
  min-width: 0;
}

.service-card,
.service-overview-card,
.project-card,
.article-card,
.video-card,
.bento-card,
.trust-card,
.timeline-card,
.cblock,
.material-card,
.quality-item,
.contact-panel,
.contact-channel,
.sidebar-cta,
.sidebar-links,
.faq-item,
.team-card,
.kpi-card,
.stat-item {
  min-width: 0;
  max-width: 100%;
}

.service-card h3,
.service-card p,
.service-overview-card h3,
.service-overview-card p,
.project-card h3,
.project-card p,
.article-card h3,
.article-card p,
.video-card h3,
.video-card p,
.material-card h4,
.material-card p,
.cblock h3,
.cblock p,
.cblock li,
.sidebar-links a,
.sidebar-cta p,
.timeline-card h3,
.timeline-card p,
.team-card h3,
.team-card p,
.quality-item h4,
.quality-item p,
.contact-panel p,
.contact-channel__val,
.contact-channel__label {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.text-on-light,
.service-card,
.service-overview-card,
.project-card,
.article-card,
.bento-card,
.timeline-card,
.cblock--white,
.cblock--warm,
.cblock--slate,
.material-card,
.contact-form,
.contact-panel,
.team-card,
.kpi-card,
.stat-item {
  color: #0f3d35;
}

.text-on-light p,
.text-on-light li,
.service-card p,
.service-card li,
.service-overview-card p,
.project-card p,
.article-card p,
.bento-card p,
.timeline-card p,
.cblock--white p,
.cblock--white li,
.cblock--warm p,
.cblock--warm li,
.cblock--slate p,
.cblock--slate li,
.material-card p,
.contact-form p,
.contact-panel p,
.team-card p,
.kpi-card span,
.stat-item span,
.article-sidebar p,
.article-sidebar li {
  color: #34524c;
}

.text-on-dark,
.dark-section,
.quality-bg,
.videos-bg,
.bg-text-section,
.trust-strip,
.cta-band-final {
  color: #ffffff;
}

.dark-section p,
.dark-section li,
.quality-bg p,
.quality-bg li,
.videos-bg p,
.videos-bg li,
.bg-text-section p,
.bg-text-section li,
.cta-band-final p,
.trust-strip p {
  color: rgba(255, 255, 255, 0.92);
}

.lead,
.desc,
.muted-text {
  color: #5f6f6b;
}

.page-hero .lead,
.hero .lead,
.videos-bg .desc,
.quality-bg .desc,
.bg-text-section .desc {
  color: rgba(255, 255, 255, 0.9) !important;
}

.services-grid,
.cards-grid,
.bento-grid,
.service-overview-grid,
.section-kpis,
.team-grid,
.articles-grid,
.projects-grid,
.trust-grid,
.quality-grid,
.process-grid,
.info-grid,
.cert-grid,
.materials-grid,
.contact-layout,
.about-layout,
.form-grid,
.footer-top {
  display: grid;
  gap: 22px;
}

.services-grid,
.cards-grid,
.bento-grid,
.service-overview-grid,
.articles-grid,
.projects-grid,
.trust-grid,
.quality-grid,
.process-grid,
.info-grid,
.cert-grid,
.materials-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.videos-grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 20px !important;
}

.video-card--large {
  grid-column: auto !important;
}

.video-card,
.video-card video,
.video-card iframe {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.video-card {
  padding: 16px;
}

.video-card video {
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 18px;
}

.video-caption {
  padding-top: 12px;
}

.video-caption p,
.video-caption strong {
  display: block;
  line-height: 1.8;
}

.project-card img,
.article-card__img img,
.service-overview-card img,
.about-photos__main img,
.about-photos__sub img,
.gallery-masonry img,
.gitem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-masonry {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  columns: auto !important;
}

.service-detail__body > div[style*="grid-template-columns:1fr 1fr"],
.service-detail__body > div[style*="grid-template-columns:1fr 1fr;"],
.service-detail__body > div[style*="grid-template-columns:1fr 1fr;gap"],
.service-detail__body > div[style*="display:grid;grid-template-columns:1fr 1fr"],
.service-detail__body .materials-grid[style],
.projects-filter,
.announcement-bar .container {
  min-width: 0;
}

.service-detail__body > div[style*="grid-template-columns:1fr 1fr"],
.service-detail__body > div[style*="display:grid;grid-template-columns:1fr 1fr"] {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
}

.service-detail__body .materials-grid[style] {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.projects-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.projects-filter .filter-btn {
  white-space: normal;
}

.gallery-masonry .gitem {
  margin-bottom: 0 !important;
}

.article-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.article-sidebar {
  min-width: 0;
}

.compare-table,
.thickness-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td,
.thickness-table th,
.thickness-table td {
  white-space: normal;
  line-height: 1.7;
}

.cblock div[style*="overflow-x:auto"],
.service-detail div[style*="overflow-x:auto"] {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.compare-table,
.thickness-table {
  min-width: 720px;
}

.timeline {
  gap: 20px;
}

.timeline-card {
  background: #ffffff;
  color: #0f3d35;
  box-shadow: 0 10px 24px rgba(2, 29, 29, 0.08);
  padding: 22px;
}

.timeline-card span {
  opacity: 1;
  color: #0b7b66;
}

.wa-float {
  bottom: 18px !important;
  left: 18px !important;
}

main {
  padding-bottom: 0;
}

footer,
.site-footer,
.cta-band-final,
.cta-banner,
.contact-form,
.contact-panel {
  position: relative;
  z-index: 1;
}

@media (max-width: 1024px) {
  .article-layout,
  .contact-layout,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .gallery-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-grid,
  .cards-grid,
  .bento-grid,
  .service-overview-grid,
  .articles-grid,
  .projects-grid,
  .trust-grid,
  .quality-grid,
  .process-grid,
  .info-grid,
  .cert-grid,
  .materials-grid,
  .section-kpis,
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .videos-grid,
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .services-grid,
  .cards-grid,
  .bento-grid,
  .service-overview-grid,
  .articles-grid,
  .projects-grid,
  .trust-grid,
  .quality-grid,
  .process-grid,
  .info-grid,
  .cert-grid,
  .materials-grid,
  .section-kpis,
  .team-grid,
  .about-layout,
  .contact-layout,
  .form-grid,
  .footer-top {
    grid-template-columns: 1fr !important;
  }

  .videos-grid,
  .video-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-masonry {
    grid-template-columns: 1fr;
  }

  .service-detail__body > div[style*="grid-template-columns:1fr 1fr"],
  .service-detail__body > div[style*="display:grid;grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .service-detail__body .materials-grid[style] {
    grid-template-columns: 1fr !important;
  }

  .compare-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    min-width: 0;
  }

  .thickness-table {
    min-width: 0 !important;
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: none;
    background: transparent;
  }

  .thickness-table thead {
    display: none;
  }

  .thickness-table tbody,
  .thickness-table tr,
  .thickness-table td {
    display: block;
    width: 100%;
  }

  .thickness-table tbody {
    display: grid;
    gap: 14px;
  }

  .thickness-table tr {
    border: 1px solid rgba(11, 123, 102, 0.14);
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 61, 53, 0.08);
  }

  .thickness-table td {
    min-width: 0;
    padding: 12px 14px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: start !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    border-bottom: 1px solid rgba(11, 123, 102, 0.08);
    background: #ffffff !important;
    font-size: 0.95rem;
  }

  .thickness-table td:last-child {
    border-bottom: 0;
  }

  .thickness-table td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    max-width: 42%;
    color: #0f5b4f;
    font-weight: 800;
    line-height: 1.5;
  }

  .thickness-table td > * {
    margin-inline-start: auto;
    text-align: end;
  }

  .timeline {
    padding-right: 0;
  }

  .timeline::before,
  .timeline-item::before {
    display: none;
  }

  .timeline-item {
    padding-right: 0 !important;
  }

  .timeline-card {
    padding: 18px;
  }

  .wa-float {
    width: 50px !important;
    height: 50px !important;
    bottom: 14px !important;
    left: 14px !important;
  }

  .contact-channels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  main,
  .site-footer {
    padding-bottom: 74px;
  }

  section[style*="position:sticky"] {
    top: 64px !important;
  }
}

@media (max-width: 480px) {
  .container,
  .container--narrow {
    width: min(100% - 24px, 1240px);
  }

  .service-card,
  .service-overview-card,
  .project-card,
  .article-card,
  .video-card,
  .bento-card,
  .trust-card,
  .timeline-card,
  .cblock,
  .material-card,
  .quality-item,
  .contact-form,
  .contact-panel,
  .team-card,
  .kpi-card,
  .stat-item {
    padding: 16px !important;
  }

  .hero__actions,
  .cta-banner__actions,
  .cta-band-final__inner,
  .hero__chips,
  .projects-filter {
    gap: 10px;
  }

  .announcement-bar .container {
    justify-content: center;
  }

  .announcement-bar__links {
    justify-content: center;
  }

  .video-card {
    padding: 12px;
  }

  .video-caption p,
  .article-card p,
  .service-card p,
  .timeline-card p,
  .cblock p,
  .cblock li {
    font-size: 0.92rem;
  }
}
