/* Shared responsive overrides for all pages and reusable components */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .hero-container,
  .heroabout-container,
  .herohome-container,
  .hero-section {
    min-height: 70vh;
    height: auto !important;
  }

  .hero-section::before,
  .hero-container::before {
    background-attachment: scroll !important;
  }

  .hero-content-inner-wrapper,
  .herohome-content-inner-wrapper {
    right: auto !important;
    bottom: auto !important;
    padding: 0 1.5rem !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .hero-content,
  .herohome-content,
  .heroabout-content {
    max-width: 100% !important;
    text-align: center !important;
  }

  .about-us-inner-wrapper,
  .contact-section,
  .contact-content-wrapper,
  .map-grid,
  .footer-content,
  .footer-bottom,
  .vision-content-wrapper,
  .contact-form .form-row,
  .cta-buttons,
  .vision-buttons-row,
  .portfolio-buttons,
  .services-grid,
  .portfolio-grid,
  .insights-cards-container,
  .client-spotlights-slider-wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }

  .contact-form .form-row,
  .about-us-inner-wrapper,
  .vision-content-wrapper,
  .footer-content,
  .footer-bottom,
  .cta-buttons,
  .vision-buttons-row,
  .portfolio-buttons,
  .map-grid {
    flex-direction: column !important;
    align-items: stretch;
  }

  .contact-section,
  .services-grid,
  .portfolio-grid,
  .insights-cards-container,
  .map-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .client-spotlights-slider-wrapper {
    height: auto !important;
    aspect-ratio: 1 / 1;
  }

  .spotlights-track {
    gap: 1rem !important;
  }

  .spotlight-slide,
  .service-card,
  .portfolio-item,
  .Insightblog-card,
  .contact-form-card,
  .contact-info-social-wrapper,
  .map-container {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 768px) {
  section,
  .section-padding,
  .content-wrapper,
  .main-content-wrapper {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .header {
    padding: 0.875rem 1rem !important;
  }

  .mobile-menu-btn {
    display: block !important;
  }

  .nav-menu {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transform: translateY(-8px);
    transition: max-height 0.28s ease, opacity 0.28s ease,
      transform 0.28s ease, visibility 0.28s ease;
    background: #2d2640;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 999;
  }

  .nav-menu.active {
    max-height: 85vh;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-item,
  .contact-btn {
    display: block;
    width: 100% !important;
    padding: 0.95rem 1.25rem !important;
    margin: 0 !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 !important;
  }

  .contact-btn {
    margin-top: 0.5rem !important;
    background: rgba(139, 74, 132, 0.22);
  }

  .logo-text {
    font-size: 1rem !important;
    line-height: 1.2;
  }

  .logo-icon,
  .logo-icon img {
    width: 38px !important;
    height: 38px !important;
  }

  .hero-container,
  .heroabout-container,
  .herohome-container,
  .hero-section {
    min-height: 64vh;
    padding-top: 90px !important;
    padding-bottom: 2.5rem !important;
  }

  .herohome-title span,
  .heroabout-title,
  .hero-title {
    font-size: clamp(1.95rem, 9.2vw, 3rem) !important;
    line-height: 1.12 !important;
  }

  .herohome-subtitle,
  .heroabout-subtitle,
  .hero-subtitle {
    font-size: clamp(1rem, 4.4vw, 1.25rem) !important;
    line-height: 1.5;
    max-width: 100% !important;
  }

  .herohome-buttons,
  .vision-buttons-row,
  .cta-buttons,
  .portfolio-buttons {
    width: 100%;
    gap: 0.75rem !important;
    justify-content: center !important;
  }

  .herohome-button,
  .vision-button,
  .vision-specific-button,
  .portfolio-btn,
  .cta-button,
  .cta-btn,
  .project-cta-block__btn,
  .read-article-button {
    width: min(100%, 340px) !important;
    max-width: 100% !important;
    justify-content: center;
  }

  .section-title,
  .section-heading,
  .partners-title,
  .vision-title {
    font-size: clamp(1.7rem, 7vw, 2.2rem) !important;
    line-height: 1.2;
  }

  .team-carousel-section,
  .client-spotlights-section,
  .core-values-section,
  .build-amazing-section,
  .portfolio-section,
  .latest-insights-section,
  .services-cards-section,
  .about-us-sectionhome,
  .contact-section {
    padding-top: 2.75rem !important;
    padding-bottom: 2.75rem !important;
  }

  .contact-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 1rem !important;
  }

  .contact-form-card,
  .contact-info-social-wrapper,
  .contact-info-social-wrapper .info-card,
  .contact-info-social-wrapper .social-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .contact-form-card {
    order: 1 !important;
  }

  .contact-info-social-wrapper {
    order: 2 !important;
    gap: 1rem !important;
  }

  .contact-section.anim-ready .contact-form-card,
  .contact-section.anim-ready .info-card,
  .contact-section.anim-ready .social-card {
    opacity: 1 !important;
    transform: none !important;
  }

  .contact-form .form-row {
    flex-direction: column !important;
    gap: 0.9rem !important;
  }

  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    width: 100% !important;
  }

  .contact-section .social-icons {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }

  .contact-section .social-icons a {
    width: 48px !important;
    height: 48px !important;
    grid-column: auto !important;
  }

  .contact-section .social-icons a img {
    width: 40px !important;
    height: 40px !important;
  }

  .carousel-container,
  .main-card,
  .vision-section,
  .spotlight-slide,
  .testimonial-card,
  .service-card,
  .portfolio-item,
  .infinite-slider img {
    height: auto !important;
  }

  .partners-section {
    overflow: hidden !important;
  }

  .partners-stage {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 360px !important;
    height: 280px !important;
    margin: 0 auto !important;
  }

  .partner-item,
  .partner-item.position-left,
  .partner-item.position-center,
  .partner-item.position-right {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: min(56vw, 220px) !important;
    height: min(56vw, 220px) !important;
    min-width: 140px;
    aspect-ratio: auto;
    z-index: 1;
  }

  .partner-item.position-left {
    transform: translate(calc(-50% - 36vw), -50%) scale(0.5) !important;
    opacity: 0.85 !important;
  }

  .partner-item.position-center {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1 !important;
    z-index: 2 !important;
  }

  .partner-item.position-right {
    transform: translate(calc(-50% + 36vw), -50%) scale(0.5) !important;
    opacity: 0.85 !important;
  }

  .partner-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
  }

  .next-spotlight-button {
    width: 44px !important;
    height: 44px !important;
    right: 8px !important;
    background-size: 28px !important;
  }

  footer {
    padding: 3rem 0 1.75rem !important;
  }

  .footer-content {
    text-align: center !important;
    align-items: center !important;
    gap: 1.5rem !important;
  }

  .footer-column,
  .footer-column-company-details {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .footer-logo,
  .social-icons,
  .footer-social-icons,
  .footer-column ul,
  .footer-column p,
  .contact-info p,
  .footer-location-row {
    justify-content: center !important;
    text-align: center !important;
  }

  .contact-info p.footer-location-group {
    width: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .footer-location-row {
    width: 100% !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .footer-location-row .footer-location-icon {
    margin-top: 0 !important;
  }

  .footer-location-row a,
  .footer-location-row span {
    text-align: center !important;
  }

  .footer-bottom {
    text-align: center !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }

  .footer-bottom .legal-links,
  .legal-links {
    justify-content: center !important;
    gap: 0.9rem !important;
    margin: 0 !important;
  }

  .footer-bottom .legal-links a,
  .legal-links a {
    margin: 0 !important;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .team-carousel-wrapper {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .team-carousel-container {
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .team-carousel-member {
    width: calc((100% - 0.75rem) / 2) !important;
    min-width: 138px;
    max-width: 170px;
    scroll-snap-align: start;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.75rem !important;
  }

  .hero-container,
  .heroabout-container,
  .herohome-container,
  .hero-section {
    min-height: 58vh;
  }

  .herohome-title span,
  .heroabout-title,
  .hero-title {
    font-size: clamp(1.65rem, 10vw, 2.3rem) !important;
  }

  .section-title,
  .section-heading,
  .partners-title,
  .vision-title {
    font-size: clamp(1.45rem, 8.4vw, 1.95rem) !important;
  }

  .partners-stage {
    max-width: 300px !important;
    height: 240px !important;
  }

  .partner-item,
  .partner-item.position-left,
  .partner-item.position-center,
  .partner-item.position-right {
    width: min(58vw, 190px) !important;
    height: min(58vw, 190px) !important;
    min-width: 120px;
  }

  .partner-item.position-left {
    transform: translate(calc(-50% - 35vw), -50%) scale(0.46) !important;
  }

  .partner-item.position-right {
    transform: translate(calc(-50% + 35vw), -50%) scale(0.46) !important;
  }

  .footer-logo-text {
    white-space: normal !important;
    font-size: 1.05rem !important;
  }

  .contact-section .social-icons {
    gap: 0.55rem !important;
  }

  .contact-section .social-icons a {
    width: 44px !important;
    height: 44px !important;
  }

  .contact-section .social-icons a img {
    width: 36px !important;
    height: 36px !important;
  }

  .social-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .social-icon img {
    width: 32px !important;
    height: 32px !important;
  }
}
