/* Modern Hero Section */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  overflow: hidden;
  padding-top: 80px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(30, 64, 175, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.2) 0%, transparent 50%);
  z-index: 1;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  animation: float 8s ease-in-out infinite;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.15), transparent);
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.15), transparent);
  bottom: 20%;
  left: 15%;
  animation-delay: 2s;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15), transparent);
  top: 50%;
  right: 25%;
  animation-delay: 4s;
}

.shape-4 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.1), transparent);
  top: 20%;
  left: 20%;
  animation-delay: 1s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  33% {
    transform: translateY(-30px) rotate(120deg) scale(1.1);
  }
  66% {
    transform: translateY(15px) rotate(240deg) scale(0.9);
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-text {
  max-width: 600px;
}

.hero-title {
  font-family: "Orbitron", monospace;
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.title-line {
  display: block;
  color: var(--white);
  animation: slideInLeft 1s ease-out forwards;
  opacity: 0;
  transform: translateX(-50px);
}

.title-line:nth-child(1) {
  animation-delay: 0.2s;
}
.title-line:nth-child(2) {
  animation-delay: 0.4s;
}
.title-line:nth-child(3) {
  animation-delay: 0.6s;
}

.title-line.highlight {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-subtitle {
  font-size: 1.4rem;
  color: #cbd5e1;
  margin-bottom: 2.5rem;
  font-weight: 400;
  line-height: 1.6;
  animation: fadeInUp 1s ease-out 0.8s forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  animation: fadeInUp 1s ease-out 1s forwards;
  opacity: 0;
  transform: translateY(30px);
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-graphic {
  position: relative;
  width: 400px;
  height: 400px;
  animation: rotateGear 30s linear infinite;
}

.gear-outer,
.gear-inner,
.gear-center {
  position: absolute;
  border-radius: 50%;
  border: 3px solid;
}

.gear-outer {
  width: 100%;
  height: 100%;
  border-image: var(--gradient-primary) 1;
  box-shadow: inset 0 0 50px rgba(30, 64, 175, 0.3), 0 0 100px rgba(30, 64, 175, 0.2);
}

.gear-inner {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  border-image: var(--gradient-secondary) 1;
  animation: rotateGear 20s linear infinite reverse;
  box-shadow: inset 0 0 30px rgba(220, 38, 38, 0.3);
}

.gear-center {
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  border-image: linear-gradient(135deg, #f59e0b, #dc2626) 1;
  animation: rotateGear 15s linear infinite;
  box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.4);
}

@keyframes rotateGear {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Modern Products Preview */
.products-preview {
  padding: 8rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
}

.products-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
}

/* Custom grid for 2 cards in first row, 3 in second row */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 2rem;
  margin-top: 4rem;
}

.product-card {
  height: 450px;
  perspective: 1000px;
  cursor: pointer;
  transition: var(--transition);
}

/* Positioning cards for custom layout */
.product-card:nth-child(1),
.product-card:nth-child(2) {
  grid-row: 1;
}
.product-card:nth-child(3),
.product-card:nth-child(4),
.product-card:nth-child(5) {
  grid-row: 2;
}
.product-card:nth-child(3) {
  grid-column: 1;
}
.product-card:nth-child(4) {
  grid-column: 2;
}
.product-card:nth-child(5) {
  grid-column: 1 / span 2;
}

.product-card:hover {
  transform: translateY(-10px);
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.product-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(30, 64, 175, 0.1);
}

.card-front {
  background: var(--white);
  color: var(--text-primary);
}

.card-back {
  background: var(--gradient-primary);
  color: var(--white);
  transform: rotateY(180deg);
}

.product-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  color: var(--white);
  animation: pulse 3s ease-in-out infinite;
  box-shadow: var(--shadow-lg);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.product-card h3 {
  font-family: "Orbitron", monospace;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.product-card p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.card-back ul {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
  width: 100%;
}

.card-back li {
  padding: 0.75rem 0;
  position: relative;
  padding-left: 2rem;
  font-size: 1rem;
  opacity: 0.95;
}

.card-back li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4ade80;
  font-weight: bold;
  font-size: 1.2rem;
}

.card-btn {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  backdrop-filter: blur(10px);
}

.card-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Responsive styles for products grid and cards */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
  }
  .product-card {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 2rem;
  }
  .product-card {
    height: auto;
    min-height: 350px;
  }
  /* Remove custom grid-row/grid-column for mobile */
  .product-card:nth-child(1),
  .product-card:nth-child(2),
  .product-card:nth-child(3),
  .product-card:nth-child(4),
  .product-card:nth-child(5) {
    grid-row: auto;
    grid-column: auto;
  }
}

/* Remove flip animation in phone view */
@media (max-width: 480px) {
  .products-grid {
    gap: 1.2rem;
  }
  .product-card {
    min-height: 280px;
  }
  .card-inner {
    padding: 1rem;
    transform: none !important;
    transition: none !important;
  }
  .product-card:hover .card-inner {
    transform: none !important;
  }
  .card-front,
  .card-back {
    position: static;
    width: 100%;
    height: auto;
    backface-visibility: visible;
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(30, 64, 175, 0.1);
  }
  .card-back {
    transform: none !important;
    display: none;
  }
  .product-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  .product-card h3 {
    font-size: 1.1rem;
  }
  .product-card p {
    font-size: 0.95rem;
  }
}

/* OUR CLIENT SECTION */
.auto-scroll-gallery {
    width: 100%;
    background: #dce3eb;
    padding: 32px 0 24px 0;
    overflow: hidden;
}

.auto-scroll-gallery .container {
    max-width: 100%;
    padding: 0 0px;
}

.gallery-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.gallery-track {
    display: flex;
    align-items: center;
    gap: 32px;
    animation: scrollGallery linear infinite;
    will-change: transform;
    width: max-content;
}

.gallery-track img {
    height: 160px;
    width: auto;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    background: #fff;
    object-fit: contain;
    transition: transform 0.3s;
    padding: 8px; /* logos breathe more */
}

.gallery-track img:hover {
    transform: scale(1.06);
}

@keyframes scrollGallery {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Tablets */
@media (max-width: 900px) {
    .gallery-track img { height: 120px; padding: 6px; }
    .gallery-track { gap: 24px; }
}

/* Phones */
/* Phones */
@media (max-width: 600px) {
    .gallery-track img {
        height: 80px;       /* slightly smaller for balance */
        padding: 2px;       /* minimal padding */
        border-radius: 6px; /* clean corners */
        box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    }
    .gallery-track { gap: 8px; }  /* 🔥 smaller gap */
    .auto-scroll-gallery { padding: 4px 0 10px 0; } /* less top-bottom padding */
}


/* Enhanced About Section */
.about {
  padding: 8rem 0;
  background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.about::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-primary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text .section-title {
  color: var(--white);
  text-align: left;
  margin-bottom: 2rem;
  font-size: 3.5rem;
}

.about-text .section-title::after {
  left: 0;
  transform: none;
}

.about-description {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #cbd5e1;
  margin-bottom: 3rem;
}

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

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-family: "Orbitron", monospace;
  font-size: 3.5rem;
  font-weight: 900;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cube-container {
  perspective: 1200px;
}

.cube {
  width: 250px;
  height: 250px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 25s linear infinite;
}

.face {
  position: absolute;
  width: 250px;
  height: 250px;
  background: rgba(30, 64, 175, 0.8);
  border: 2px solid rgba(220, 38, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", monospace;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
}

.front {
  transform: rotateY(0deg) translateZ(125px);
}
.back {
  transform: rotateY(180deg) translateZ(125px);
}
.right {
  transform: rotateY(90deg) translateZ(125px);
}
.left {
  transform: rotateY(-90deg) translateZ(125px);
}
.top {
  transform: rotateX(90deg) translateZ(125px);
}
.bottom {
  transform: rotateX(-90deg) translateZ(125px);
}

@keyframes rotateCube {
  from {
    transform: rotateX(0deg) rotateY(0deg);
  }
  to {
    transform: rotateX(360deg) rotateY(360deg);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content {
    gap: 3rem;
    padding: 0 1.5rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .about-content {
    gap: 3rem;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding-top: 80px;
    min-height: 90vh;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 4rem;
    padding: 96px 1rem;
  }

  .hero-title {
    font-size: 2.8rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-graphic {
    width: 280px;
    height: 280px;
  }

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

  .product-card {
    height: auto;
    min-height: 400px;
  }

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

  .about-text .section-title {
    text-align: center;
    font-size: 2.5rem;
  }

  .about-text .section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 300px;
    margin: 0 auto;
  }

  .cube {
    width: 200px;
    height: 200px;
  }

  .face {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 70px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-graphic {
    width: 220px;
    height: 220px;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-text .section-title {
    font-size: 1.8rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .product-card {
    min-height: 350px;
  }

  .card-inner {
    padding: 1.5rem;
  }

  .product-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .cube {
    width: 150px;
    height: 150px;
  }

  .face {
    width: 150px;
    height: 150px;
    font-size: 0.9rem;
  }
}

/* Fix for very small screens */
@media (max-width: 320px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .hero-graphic {
    width: 180px;
    height: 180px;
  }

  .container {
    padding: 0 12px;
  }
}
