/* ============================================
   TeachCraft Media — Responsive Breakpoints
   100% Mobile & Multi-Device Compatibility
   ============================================ */

/* Global Reset for Overflow & Responsive Elements */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

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

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

/* Base Responsive Typography Rules */
.hero__title,
.section-title,
h1, h2, h3 {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: manual;
}

/* Laptop & Large Tablets (Max 1100px) */
@media (max-width: 1100px) {
  .hero__content {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .solutions__grid,
  .services__grid,
  .lms__grid,
  .why__grid,
  .work__grid,
  .tech__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .outcomes__grid,
  .industries__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1.25fr;
    gap: 2.5rem;
  }
}

/* Medium Tablets & Mobile Landscape (Max 850px) */
@media (max-width: 850px) {
  :root {
    --nav-height: 70px;
  }

  .navbar__nav,
  .navbar__actions .navbar__cta,
  .navbar__actions .btn {
    display: none;
  }

  .navbar__toggle {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 1.5rem);
    padding-bottom: 3.5rem;
  }

  .hero__content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero__copy {
    max-width: 100%;
  }

  .hero__visual {
    max-width: 100%;
    width: 100%;
    margin-inline: auto;
  }

  .hero__float-card {
    display: none !important;
  }

  .problem__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .methodology-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
  }

  .methodology-arrow {
    display: none;
  }

  .solutions__grid,
  .services__grid,
  .lms__grid,
  .why__grid,
  .work__grid,
  .tech__grid,
  .outcomes__grid,
  .industries__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .flow-diagram {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.75rem 1.25rem;
  }

  .flow-node {
    width: 100%;
  }

  .flow-connector {
    height: 30px;
    width: 100%;
    margin-block: 0.25rem;
  }

  .flow-line {
    width: 2px;
    height: 100%;
    margin-inline: auto;
  }

  .flow-pulse {
    width: 100%;
    height: 20px;
    top: -20px;
    left: 0;
    animation: flowPulseVertical 1.2s infinite linear;
  }

  @keyframes flowPulseVertical {
    0% { top: -20px; }
    100% { top: 100%; }
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .automation__features {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Mobile Devices (Max 600px) */
@media (max-width: 600px) {
  :root {
    --nav-height: 64px;
    --section-padding: 3rem;
  }

  .container {
    padding-inline: 1.25rem;
    width: 100%;
    max-width: 100%;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 1.25rem);
    padding-bottom: 3rem;
  }

  .hero__title {
    font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  .section-title {
    font-size: clamp(1.5rem, 5.5vw, 2rem) !important;
    line-height: 1.25;
  }

  .hero__text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__visual-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .hero__visual-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .hero__visual-body {
    padding: 1rem 0.85rem;
    font-size: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .code-line {
    white-space: pre-wrap;
    word-break: break-word;
  }

  .hero__visual-metrics {
    grid-template-columns: repeat(3, 1fr);
    padding: 0.65rem 0.5rem;
    gap: 0.35rem;
  }

  .hero__metric-item {
    padding: 0.4rem 0.25rem;
  }

  .hero__metric-label {
    font-size: 0.6rem;
  }

  .hero__metric-value {
    font-size: 0.72rem;
  }

  .custom-dev__box {
    padding: 1.75rem 1.25rem;
  }

  .custom-dev__title {
    font-size: 1.5rem;
  }

  .custom-dev__grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .custom-dev__pill {
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact__form {
    padding: 1.5rem 1.25rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .process__track {
    left: 20px;
  }

  .process__marker {
    width: 44px;
    height: 44px;
    font-size: 0.95rem;
  }

  .process__step {
    gap: 1rem;
    padding: 1.25rem;
  }

  .cta__actions {
    flex-direction: column;
    width: 100%;
  }

  .cta__actions .btn {
    width: 100%;
  }

  .modal__container {
    width: 95%;
    padding: 1.5rem 1.25rem;
    margin: 1rem;
  }
}

/* Small Mobile Screens (Max 430px - Samsung A51, iPhone SE, Pixel) */
@media (max-width: 430px) {
  .container {
    padding-inline: 1rem;
  }

  .hero__title {
    font-size: clamp(1.45rem, 6.5vw, 1.85rem) !important;
    line-height: 1.25;
  }

  .section-title {
    font-size: clamp(1.35rem, 6vw, 1.75rem) !important;
  }

  .hero__badge {
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
  }

  .hero__visual-header {
    padding: 0.6rem 0.75rem;
  }

  .hero__visual-title {
    font-size: 0.68rem;
  }

  .hero__visual-metrics {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .hero__metric-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.75rem;
  }

  .hero__metric-label {
    margin-bottom: 0;
  }

  .navbar__logo-text {
    font-size: 1rem;
  }

  .navbar__logo img {
    width: 32px;
    height: 32px;
  }

  .service-card,
  .solution-card,
  .outcome-card,
  .industry-card,
  .why-card,
  .tech-card,
  .lms-card {
    padding: 1.25rem;
  }
}
