/* ══════════════════════════════════════════════════════════════
   IMAGE RESPONSIVE CSS - ALL HOME PAGE IMAGES
   Ensures all images display properly on mobile, tablet, and desktop
   ══════════════════════════════════════════════════════════════ */

/* ── GENERAL IMAGE RULES ──────────────────────────────────── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── CASE STUDY IMAGES ──────────────────────────────────────── */
.case-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
  border-radius: 12px 12px 0 0;
}

.case-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.case-card:hover .case-img img {
  transform: scale(1.05);
}

/* Case study images - responsive */
@media (max-width: 1200px) {
  .case-img {
    height: 200px;
  }
}

@media (max-width: 920px) {
  .case-img {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .case-img {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .case-img {
    height: 140px;
  }
}

/* ── UI/UX PREVIEW IMAGES ──────────────────────────────────── */
.uiux-preview {
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 20px;
}

.uiux-preview-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.uiux-img {
  position: absolute;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s ease;
}

/* UI/UX images - responsive */
@media (max-width: 1200px) {
  .uiux-preview {
    height: 220px;
  }
  
  .uiux-img-1 {
    width: 60%;
    height: 70%;
  }
  
  .uiux-img-2 {
    width: 40%;
    height: 50%;
  }
  
  .uiux-img-3 {
    width: 30%;
    height: 35%;
  }
}

@media (max-width: 920px) {
  .uiux-preview {
    height: 180px;
  }
  
  .uiux-img-1 {
    width: 55%;
    height: 65%;
  }
  
  .uiux-img-2 {
    width: 38%;
    height: 48%;
  }
  
  .uiux-img-3 {
    width: 28%;
    height: 32%;
  }
}

@media (max-width: 768px) {
  .uiux-preview {
    height: 150px;
  }
  
  .uiux-img {
    max-width: 120px;
    max-height: 120px;
  }
  
  .uiux-img-1 {
    width: 50%;
    height: 60%;
  }
  
  .uiux-img-2 {
    width: 35%;
    height: 45%;
  }
  
  .uiux-img-3 {
    width: 25%;
    height: 30%;
    display: none; /* Hide third image on small tablets */
  }
}

@media (max-width: 480px) {
  .uiux-preview {
    height: 120px;
  }
  
  .uiux-img {
    max-width: 100px;
    max-height: 100px;
  }
  
  .uiux-img-1 {
    width: 60%;
    height: 70%;
    top: 10%;
    left: 5%;
  }
  
  .uiux-img-2 {
    width: 45%;
    height: 55%;
    bottom: 10%;
    right: 5%;
  }
  
  .uiux-img-3 {
    display: none;
  }
}

/* ── PARTNER/INDUSTRY LEADER LOGOS ──────────────────────────── */
.partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.partner-card img {
  width: auto;
  height: 48px;
  max-width: 100%;
  object-fit: contain;
  filter: brightness(1.1);
  transition: filter 0.3s ease;
}

.partner-card:hover img {
  filter: brightness(1.3);
}

/* Partner logos - responsive */
@media (max-width: 1200px) {
  .partner-card img {
    height: 44px;
  }
}

@media (max-width: 920px) {
  .partner-card {
    padding: 18px 14px;
  }
  
  .partner-card img {
    height: 40px;
  }
}

@media (max-width: 768px) {
  .partner-card {
    padding: 16px 12px;
  }
  
  .partner-card img {
    height: 36px;
  }
}

@media (max-width: 480px) {
  .partner-card {
    padding: 14px 10px;
    gap: 8px;
  }
  
  .partner-card img {
    height: 32px;
  }
  
  .partner-card span {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .partner-card {
    padding: 12px 8px;
  }
  
  .partner-card img {
    height: 28px;
  }
  
  .partner-card span {
    font-size: 9px;
  }
}

/* ── CLIENT MARQUEE LOGOS ──────────────────────────────────── */
.marquee-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 14px 16px;
  border-radius: 10px;
  background: rgba(16, 28, 52, 0.65);
  border: 1px solid rgba(42, 125, 241, 0.12);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.marquee-item img {
  width: 110px;
  height: 54px;
  object-fit: contain;
  filter: brightness(1.1);
  border-radius: 6px;
}

.marquee-item:hover img {
  filter: brightness(1.25);
}

/* Client marquee logos - responsive */
@media (max-width: 1200px) {
  .marquee-item {
    width: 140px;
  }
  
  .marquee-item img {
    width: 100px;
    height: 50px;
  }
}

@media (max-width: 920px) {
  .marquee-item {
    width: 130px;
  }
  
  .marquee-item img {
    width: 90px;
    height: 48px;
  }
}

@media (max-width: 768px) {
  .marquee-item {
    width: 120px;
    padding: 16px 12px 14px;
  }
  
  .marquee-item img {
    width: 80px;
    height: 44px;
  }
  
  .marquee-item span {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .marquee-item {
    width: 100px;
    padding: 14px 10px 12px;
    gap: 10px;
  }
  
  .marquee-item img {
    width: 60px;
    height: 38px;
  }
  
  .marquee-item span {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .marquee-item {
    width: 90px;
    padding: 12px 8px 10px;
  }
  
  .marquee-item img {
    width: 50px;
    height: 32px;
  }
  
  .marquee-item span {
    font-size: 9px;
  }
}

/* ── LOGO (NAVBAR) ──────────────────────────────────── */
.logo {
  width: 56px;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* Logo - responsive */
@media (max-width: 920px) {
  .logo {
    width: 50px;
  }
}

@media (max-width: 768px) {
  .logo {
    width: 46px;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 42px;
  }
}

@media (max-width: 360px) {
  .logo {
    width: 38px;
  }
}

/* ── SERVICE CARD IMAGES ──────────────────────────────────── */
.svc-card-art {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 16px;
}

.svc-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.svc-card2:hover .svc-card-art img {
  transform: scale(1.08);
}

/* Service card images - responsive */
@media (max-width: 920px) {
  .svc-card-art {
    height: 140px;
  }
}

@media (max-width: 768px) {
  .svc-card-art {
    height: 120px;
  }
}

@media (max-width: 480px) {
  .svc-card-art {
    height: 100px;
  }
}

/* ── FLOATING TECH ICONS ──────────────────────────────────── */
.floating-icon {
  position: absolute;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  padding: 8px;
}

.floating-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Floating icons - responsive */
@media (max-width: 1200px) {
  .floating-icon {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 920px) {
  .floating-icon {
    display: none; /* Hide on mobile */
  }
}

/* ── HERO BACKGROUND IMAGE ──────────────────────────────────── */
.hero-wrap {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Hero background - responsive */
@media (max-width: 920px) {
  .hero-wrap {
    background-position: center center;
    background-size: cover;
  }
}

@media (max-width: 480px) {
  .hero-wrap {
    background-position: 60% center;
  }
}

/* ── CLIENT STRIP FADE GRADIENTS ──────────────────────────────── */
.client-strip-track-wrap::before,
.client-strip-track-wrap::after {
  width: 110px;
}

@media (max-width: 768px) {
  .client-strip-track-wrap::before,
  .client-strip-track-wrap::after {
    width: 80px;
  }
}

@media (max-width: 480px) {
  .client-strip-track-wrap::before,
  .client-strip-track-wrap::after {
    width: 60px;
  }
}

/* ── CLIENTS MARQUEE FADE GRADIENTS ──────────────────────────────── */
.clients-marquee::before,
.clients-marquee::after {
  width: 100px;
}

@media (max-width: 768px) {
  .clients-marquee::before,
  .clients-marquee::after {
    width: 70px;
  }
}

@media (max-width: 480px) {
  .clients-marquee::before,
  .clients-marquee::after {
    width: 50px;
  }
}

/* ── ENSURE ALL IMAGES LOAD PROPERLY ──────────────────────────── */
img[loading="lazy"] {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Prevent layout shift while images load */
.case-img,
.partner-card,
.marquee-item,
.svc-card-art,
.uiux-preview {
  position: relative;
}

.case-img::before,
.partner-card::before,
.marquee-item::before,
.svc-card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.02);
  animation: shimmer 1.5s infinite;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* ── PRINT STYLES FOR IMAGES ──────────────────────────────────── */
@media print {
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  .hero-wrap {
    background: none !important;
  }
  
  .floating-icon,
  .code-card,
  .float-stat-card {
    display: none !important;
  }
}

/* ── DARK MODE SUPPORT (if added later) ──────────────────────────── */
@media (prefers-color-scheme: dark) {
  .partner-card img,
  .marquee-item img {
    filter: brightness(1.1) contrast(1.05);
  }
}

/* ── HIGH RESOLUTION DISPLAYS ──────────────────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ── ACCESSIBILITY - REDUCED MOTION ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .case-img img,
  .svc-card-art img,
  .uiux-img,
  .partner-card img,
  .marquee-item img {
    transition: none !important;
    animation: none !important;
  }
  
  .marquee-track {
    animation: none !important;
  }
}


/* ══════════════════════════════════════════════════════════════
   PROJECTS SECTION - HORIZONTAL SCROLL FIX
   ══════════════════════════════════════════════════════════════ */

/* Prevent horizontal overflow on all screen sizes */
.sec-cases {
  overflow-x: hidden !important;
  max-width: 100vw;
  position: relative;
}

.cases-stage {
  overflow-x: hidden !important;
  max-width: 100%;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
  .sec-cases {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .cases-nav {
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 10px;
  }
  
  .cases-pills {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .cases-pills::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .sec-cases {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  .cases-stage {
    padding: 0;
    margin: 0 auto;
  }
  
  /* Ensure cards stay within viewport */
  .case-card.pos-center {
    max-width: calc(100vw - 40px);
  }
  
  .case-card.pos-left {
    left: 30%;
  }
  
  .case-card.pos-right {
    left: 70%;
  }
}

@media (max-width: 380px) {
  .case-card.pos-center {
    max-width: calc(100vw - 30px);
    width: 90vw;
  }
  
  .case-pill {
    font-size: 9px;
    padding: 5px 10px;
  }
  
  .case-arr {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL OVERFLOW PREVENTION
   ══════════════════════════════════════════════════════════════ */

/* Prevent all sections from causing horizontal scroll */
section,
.sec,
.container {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Ensure all containers stay within viewport */
@media (max-width: 768px) {
  * {
    max-width: 100%;
  }
  
  img,
  video,
  iframe {
    max-width: 100% !important;
    height: auto !important;
  }
}
