/* Responsive layout adjustments */
@media (max-width: 1199.98px) {
  .stats-band {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(odd) {
    border-left: 0;
  }

  .stat-item:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .timeline {
    grid-template-columns: repeat(3, 1fr);
  }

  .timeline::before,
  .timeline::after {
    display: none;
  }

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

@media (max-width: 991.98px) {
  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .navbar-collapse {
    grid-column: 1 / -1;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--glass-bg);
  }

  .navbar-toggler {
    display: inline-grid;
  }

  .nav-center {
    align-items: center;
  }

  .section-padding {
    padding-top: 118px;
  }

  .hero-section {
    text-align: center;
  }

  .hero-row {
    min-height: 0;
  }

  .hero-visual {
    position: relative;
    inset: auto;
    z-index: 0;
    width: 100%;
    margin-top: 24px;
  }

  .hero-visual::before,
  .hero-visual::after {
    display: none;
  }

  .hero-visual img {
    height: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  html[data-theme="light"] .hero-visual img {
    mix-blend-mode: multiply;
  }

  .hero-title-line {
    white-space: normal !important;
  }

  .hero-text,
  .hero-actions {
    justify-content: center;
    margin-right: auto;
    margin-left: auto;
  }

  .cta-banner,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 28px;
  }

  .cta-banner .cta-visual {
    width: calc(100% + 56px);
    height: auto;
    min-height: 0;
    margin: 22px -28px -28px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 100%);
  }

  .section-title-row {
    text-align: center;
  }
}

@media (max-width: 767.98px) {
  .section-block {
    padding: 28px 0;
  }

  .brand-logo-svg {
    width: 168px;
    height: 50px;
  }

  .footer-brand .brand-logo-svg {
    width: 168px;
    height: 50px;
  }

  .hero-section h1 {
    font-size: 2.05rem;
    line-height: 1.16;
  }

  .stats-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .stat-item {
    min-height: 142px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .stat-item:first-child {
    border-top: 0;
  }

  .timeline-item {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--glass-bg);
  }

  .cta-banner,
  .contact-panel,
  .stats-band {
    padding: 24px;
  }

  .slider-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .portfolio-swiper .swiper-wrapper,
  .testimonial-swiper .swiper-wrapper {
    grid-template-columns: 1fr;
  }

  .portfolio-prev,
  .portfolio-next {
    display: none;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {

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

  .container {
    width: calc(100% - 44px);
    max-width: calc(100% - 44px);
    padding-right: 0;
    padding-left: 0;
  }

  .row {
    margin-right: 0;
    margin-left: 0;
  }

  .row>* {
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .brand-logo-svg {
    width: 148px;
    height: 44px;
  }

  .footer-brand .brand-logo-svg {
    width: 148px;
    height: 44px;
  }

  .nav-shell {
    gap: 8px;
  }

  .nav-actions {
    gap: 6px;
  }

  .navbar-toggler,
  .theme-toggle {
    /* width: 38px; */
    height: 38px;
  }

  .hero-section h1 {
    max-width: 320px;
    margin-right: auto;
    margin-left: auto;
    font-size: 1.74rem;
    overflow-wrap: anywhere;
  }

  .hero-section,
  .hero-section .container,
  .hero-row,
  .hero-visual,
  .services-grid {
    max-width: 100%;
    overflow: hidden;
  }

  .hero-text,
  .glass-card p,
  .section-sub {
    width: 100%;
    max-width: 320px;
    margin-right: auto;
    margin-left: auto;
    overflow-wrap: anywhere;
  }

  .section-title h2 {
    max-width: 320px;
    margin-right: auto;
    margin-left: auto;
  }

  .hero-title-line {
    white-space: normal !important;
  }

  .hero-visual img {
    min-height: 0;
  }

  .hero-actions .btn {
    width: 100%;
  }

  #services .section-title h2::after {
    width: 24px;
    margin-left: 6px;
  }

  .project-shot {
    height: 180px;
  }

  .filter-pills button {
    font-size: 0.72rem;
    padding: 6px 12px;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .portfolio-swiper .swiper-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .testimonial-swiper .swiper-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}