/* ============================================================
   ARVIN ACME — RESPONSIVE ZOOM & SPACING FIX PATCH
   Add this at the BOTTOM of assets/css/styles.css
   (or include as a separate <link> after styles.css)
   ============================================================ */

/* ── FIX: Prevent unwanted whitespace at zoom-out / small viewports ── */

/* Ensure html & body never exceed viewport and never have bare whitespace */
html {
  min-width: 320px;
}

body {
  min-width: 320px;
  width: 100%;
}

/* Container: consistent side padding at ALL widths, prevents blown-out layouts */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
  box-sizing: border-box;
}

/* ── FIX: Page hero sections — no bare side gaps ── */
.page-hero {
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.page-hero-inner {
  padding-left: clamp(1rem, 4vw, 2rem);
  padding-right: clamp(1rem, 4vw, 2rem);
}

/* ── FIX: Hero section — full width, no side overflow or blank space ── */
.hero {
  width: 100%;
  min-height: 92vh;
}

/* ── FIX: Section padding responsive — removes big blank areas at zoom out ── */
.section {
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

/* ── FIX: Footer sections full-width ── */
footer,
.footer,
.footer-top,
.footer-bottom {
  width: 100%;
}

/* ── FIX: Grids don't overflow at unusual zoom levels ── */
.services-grid,
.projects-grid,
.portfolio-grid {
  width: 100%;
  min-width: 0;
}

/* ── FIX: CTA section — no side gaps ── */
.cta,
.cta-section {
  width: 100%;
  overflow: hidden;
}

/* ── FIX: Contact map / form layout ── */
.map-wrap {
  width: 100%;
  overflow: hidden;
}

/* ── MEDIUM-ZOOM breakpoint (between 1024 and 1260px) ── */
/* Prevents grids from overflowing when zoomed in slightly */
@media (max-width: 1280px) {
  :root {
    --container: 100%;
  }
  .hero-content {
    gap: 2.5rem;
  }
  .about-grid {
    gap: 3rem;
  }
}

/* ── TABLET landscape fix ── */
@media (max-width: 1100px) {
  .pillars-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid,
  .projects-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    display: none;
  }
}

/* ── TABLET portrait ── */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    padding: 2.5rem 0;
  }
  .hero-visual {
    display: none;
  }
  .about-grid,
  .mv-grid,
  .contact-grid,
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  /* Fix page hero padding on tablet */
  .page-hero {
    padding-top: 4rem;
    padding-bottom: 3rem;
  }
}

/* ── MOBILE: 768px and below ── */
@media (max-width: 768px) {
  .container {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
  .nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .hero {
    min-height: 80vh;
  }
  .hero-content {
    padding: 2rem 0;
    grid-template-columns: 1fr;
  }
  .hero-metrics {
    gap: 1.25rem;
  }
  .hero-badge {
    display: none; /* badges overflow on mobile */
  }
  .about-grid {
    gap: 2rem;
  }
  .about-img-main img {
    height: 260px;
  }
  .about-year-tag {
    display: none;
  }
  .svc-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .svc-img img {
    height: 220px;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillars-row {
    grid-template-columns: 1fr 1fr;
    border-radius: var(--radius-sm);
  }
  .pillar {
    border-right: none;
    border-bottom: 1px solid var(--obsidian-5);
  }
  .pillar:nth-child(odd) {
    border-right: 1px solid var(--obsidian-5);
  }
  .pillar:last-child,
  .pillar:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
  }
  .services-grid,
  .projects-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .blog-featured {
    grid-template-columns: 1fr;
  }
  .blog-feat-img img {
    min-height: 180px;
  }
  .blog-card-inner {
    flex-direction: column;
  }
  .blog-card img {
    width: 100%;
    height: 150px;
  }
  .cta-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .cta-actions {
    justify-content: center;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .job-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .timeline {
    border-left-width: 1px;
  }
  .mv-grid {
    grid-template-columns: 1fr;
  }
  .about-grid > div:first-child,
  .about-grid > div.reveal-left {
    display: none;
  }
  /* Page hero mobile */
  .page-hero {
    padding-top: 3.5rem;
    padding-bottom: 2.5rem;
  }
  .page-hero-inner h1 {
    font-size: clamp(2rem, 7vw, 3rem);
  }
  /* Fix contact form box padding */
  .contact-form-box {
    padding: 1.5rem 1.25rem;
  }
  /* Fix blog layout */
  .blog-sidebar {
    display: none;
  }
}

/* ── MOBILE SMALL: 480px and below ── */
@media (max-width: 480px) {
  .container {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  .hero-title {
    font-size: clamp(1.9rem, 6vw, 2.2rem);
  }
  .section-title {
    font-size: clamp(1.6rem, 5vw, 1.8rem);
  }
  .pillars-row {
    grid-template-columns: 1fr;
  }
  .pillar {
    border-right: none;
  }
  .pillar:nth-child(odd) {
    border-right: none;
  }
  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  /* Services page detail images */
  .svc-img img {
    height: 180px;
  }
  /* Nav CTA full width */
  .nav-cta {
    display: none;
  }
}

/* ── VERY LARGE screens / zoom out prevention ── */
/* Prevents blank white side columns when zoomed far out */
@media (min-width: 1800px) {
  :root {
    --container: 1400px;
  }
}

/* ── Print ── */
@media print {
  .header,
  .hamburger,
  .mobile-menu,
  .hero-badge,
  .cta,
  footer {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
