/* ==========================================================================
   responsive.css — loaded LAST on every page.
   Layout/spacing fixes only. No colour, type family or component changes.
   Breakpoints: 1024 (tablet) · 768 (small tablet / nav switch) · 480 (phone)
   ========================================================================== */

/* ---------- Global safety ---------- */
html, body { overflow-x: clip; }          /* clip ≠ hidden: keeps position:sticky working */
img, video, svg { max-width: 100%; }
img { height: auto; }

/* ---------- Footer (consistent on every page) ---------- */
.footer-logo { width: min(40vw, 175px); height: auto; display: block; }
.footer-column a, .footer-column p { line-height: 1.5; }
.footer-bottom-row p { margin: 0; }

/* Equal visual gap above the footer, whatever the last section is */
.section-banner + .footer-container { margin-top: 25px; }
.contact-form-section + .footer-container { margin-top: 5px; }
.flex-section-content + .footer-container,
.flex-section-large + .footer-container { margin-top: 75px; }
.section-block { max-width: 100%; min-width: 0; }

/* ---------- Comparison table (consumer-electronics-design) ---------- */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  color: #f3f7f4;
}
.compare-table th,
.compare-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f3f7f415;
  vertical-align: top;
}
.compare-table th { font-weight: 600; }
.compare-table td:not(:first-child),
.compare-table th:not(:first-child) { text-align: center; }

/* ==========================================================================
   ≤ 1024px — tablet
   ========================================================================== */
@media screen and (max-width: 1024px) {
  .nav-bar { padding: 0.813rem 2rem; }
  .nav-links { column-gap: 12px; }

  .flex-section-large,
  .section-stats,
  .section-studio,
  .section-beliefs,
  .about-hero-section,
  .works-hero-section,
  .contact-hero-section { padding-left: 50px; padding-right: 50px; }

  .contact-form-section { padding: 50px 50px 50px; gap: 50px; }
  .flex-section-blog-content { padding: 50px 60px; }
  .section-banner { padding: 75px 50px; }
  .footer-container { padding: 50px; }
  .footer-row { gap: 50px; flex-wrap: wrap; }
  .section-banner + .footer-container { margin-top: 50px; }
  .contact-form-section + .footer-container { margin-top: 75px; }

  .cat-banner-cotainer { width: 85%; height: auto; min-height: 450px; padding: 50px 30px; }
  .service-grid { width: 100%; }
  .selected-work-card { width: 100%; }
  .section-process-title-icon { width: 100%; }

  .hero-section-title { width: 100%; font-size: 5.5rem; }

  /* About: absolute-positioned belief cards collide below desktop → wrap */
  .belief-conent-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    min-height: 0;
    padding: 20px 0;
  }
  .belief-conent-container .belief-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    flex: 1 1 280px;
    max-width: 420px;
    min-width: 0;
  }
  .beliefs-grid { grid-template-columns: 1fr 1fr; }

  /* services.html belief cards in grid */
  .service-grid .belief-card { width: 100%; min-width: 0; }

  .work-tag { gap: 40px; }
  .works-list { padding: 75px 50px; }
}

/* ==========================================================================
   ≤ 768px — switch to mobile nav, stack two-column layouts
   ========================================================================== */
@media screen and (max-width: 768px) {
  .nav-bar { display: none; }
  .nav-bar-mobile {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    z-index: 50;
  }
  .mobile-nav-menu { z-index: 49; }

  .about-hero-section,
  .contact-form-section,
  .work-tag,
  .two-col { grid-template-columns: 1fr; }

  .about-hero-visual-col { width: 100%; }
  .about-hero-text-col-right { align-items: center; justify-content: center; }

  .service-hero-tag { grid-template-columns: 1fr; row-gap: 10px; justify-items: center; text-align: center; }
  .sht-header { font-size: 2.25rem; }

  .service-grid { grid-template-columns: 1fr; justify-content: center; }
  .beliefs-grid { grid-template-columns: 1fr; }

  .section-title-row { flex-direction: column; align-items: stretch; gap: 10px; }

  .studio-gallery { flex-direction: column; gap: 25px; }
  .studio-gallery-image { width: 100%; max-width: 420px; }

  .stats-bubbles { gap: 25px; }
  .stat-bubble { width: 160px; height: 160px; }
  .stat-bubble-number { font-size: 2.25rem; }

  .carousel { height: 45vh; }
  .carousel-group img, .carousel-cards { height: 100%; width: auto; }

  blockquote { width: 100%; }

  .footer-row { flex-direction: column; gap: 40px; }
  .footer-container { gap: 50px; }
}

/* ==========================================================================
   ≤ 480px — phone
   ========================================================================== */
@media screen and (max-width: 480px) {
  /* style.css sets font-size:4rem on .flex-section-large here; it leaks into
     tables, lists and anything without its own size. Reset it. */
  .flex-section-large { font-size: 1rem; padding: 40px 20px; gap: 30px; }

  .section-stats,
  .section-studio,
  .section-beliefs,
  .about-hero-section,
  .works-hero-section,
  .contact-hero-section { padding: 40px 20px; }
  .contact-form-section { padding: 30px 20px 40px; gap: 40px; }
  .flex-section-blog-content { padding: 30px 20px; }
  .works-list { padding: 40px 20px; gap: 30px; }
  .section-banner { padding: 40px 20px; }

  /* Long words in display type were pushing past the viewport */
  h1, h2, h3, h4, p, a, li, td, th { overflow-wrap: break-word; }
  .handwritten-title-large { font-size: clamp(2.5rem, 12vw, 4rem) !important; line-height: 1.05; }
  .hero-section-title { font-size: clamp(2.75rem, 13vw, 4rem) !important; }
  .title-font { font-size: 2.5rem; }
  .hero-section-subtitle { font-size: 1.25rem; }
  .flex-section-large > .hero-section-subtitle { font-size: 1.25rem !important; }
  .section-stats h2, .studio-header h2 { font-size: 2rem !important; }
  .section-studio > p { font-size: 1.1rem !important; }
  .work-tag-title { font-size: 1.6rem; }
  .belief-card { padding: 30px 20px; box-shadow: 8px 8px 0 0 #000000; }
  .belief-card-title { font-size: 1.3rem; }
  .belief-card-body { font-size: 1.3rem; }
  .service-card { padding: 1.25rem; }
  .cta-block { padding: 2rem 1.25rem; margin: 2rem 0; }
  .section-block p, .deliverables-list li { font-size: 1.05rem; }

  /* Breadcrumb / meta rows under page titles */
  .hero-section > div[style*="justify-content:space-between"] { flex-direction: column; gap: 6px; }

  /* CTA banner */
  .cat-banner-cotainer {
    width: 100%;
    min-height: 0;
    padding: 40px 20px;
    gap: 20px;
    box-shadow: 8px 8px 0 0 #000000;
  }
  .cat-banner-cotainer h4 { text-align: center; margin: 0; }

  .selected-work-card { padding: 12px; border-width: 3px; }
  .selected-work-card h2 { font-size: 1.4rem; }

  /* Buttons: comfortable tap targets, never wider than the screen */
  .classic-btn, .classic-btn-dark { padding: 16px 20px; }
  .submit-long-btn { padding: 18px 20px; width: 100%; justify-content: center; }
  .contact-form { padding: 30px 18px; border-width: 6px; }

  .stat-bubble { width: 140px; height: 140px; padding: 14px; }
  .stat-bubble-number { font-size: 2rem; }
  .stat-bubble-label { font-size: 0.75rem; }

  /* Table: scroll inside its own box */
  .compare-table { font-size: 0.875rem; min-width: 480px; }
  .compare-table th, .compare-table td { padding: 0.6rem 0.6rem; }

  /* Footer */
  .footer-container { padding: 40px 20px; margin-top: 75px; gap: 40px; }
  .section-banner + .footer-container,
  .contact-form-section + .footer-container,
  .flex-section-large + .footer-container { margin-top: 35px; }
  .flex-section-content + .footer-container { margin-top: 25px; }
  .section-block { width: 100%; }
  blockquote { margin-left: 0; margin-right: 0; padding: 1em 16px 1em 56px; }
  .footer-row { gap: 30px; align-items: center; justify-content: center; }
  .footer-column { gap: 8px; align-items: center; text-align: center; }
  .footer-bottom-row { gap: 6px; text-align: center; }
}
