/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 40px rgba(220, 38, 38, 0.6); }
}

/* Animation classes */
.hero-animate { animation: fadeInUp 1s ease-out; }
.hero-animate-delay-1 { animation: fadeInUp 1s ease-out 0.3s both; }
.hero-animate-delay-2 { animation: fadeInUp 1s ease-out 0.6s both; }
.animate-slide-left { animation: slideInLeft 0.8s ease-out; }
.animate-slide-right { animation: slideInRight 0.8s ease-out; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

.hover-scale {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.hover-scale:hover {
  transform: translateY(-15px) scale(1.05);
}

/* Gradient background */
.gradient-bg {
  background: linear-gradient(135deg, #1f2937 0%, #374151 25%, #dc2626 75%, #b91c1c 100%);
  position: relative;
}
.gradient-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 600"><defs><pattern id="print-pattern" patternUnits="userSpaceOnUse" width="100" height="100" patternTransform="rotate(45)"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="2" fill="white" opacity="0.15"/><rect x="25" y="25" width="50" height="50" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="1000" height="600" fill="url(%23print-pattern)"/></svg>') repeat;
  opacity: 0.3;
}

/* Video background */
#hero-video {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -20;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
#hero-video.loaded {
  opacity: 1;
}
@media (max-width: 768px) {
  #hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Icons */
.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}
.service-icon:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 15px 35px rgba(220, 38, 38, 0.5);
}

/* Portfolio hover */
.portfolio-hover {
  transition: all 0.4s ease;
  overflow: hidden;
  position: relative;
}
.portfolio-hover:hover {
  transform: scale(1.05) translateY(-10px);
}
.portfolio-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.8), rgba(185, 28, 28, 0.8));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.portfolio-hover:hover::before {
  opacity: 1;
}
.portfolio-hover .portfolio-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.portfolio-hover:hover .portfolio-overlay {
  opacity: 1;
}

/* Text gradient */
.gradient-text {
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Stats card */
.stats-card {
  background: linear-gradient(145deg, #ffffff, #f3f4f6);
  box-shadow: 20px 20px 60px #d1d5db, -20px -20px 60px #ffffff;
  border-radius: 20px;
  transition: all 0.3s ease;
}
.stats-card:hover {
  transform: translateY(-5px) scale(1.02);
}

/* Hero section (desktop default) */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  padding: 0 2rem;
  box-sizing: border-box;
}

/* ✅ Mobile-only layout + extra length */
@media (max-width: 640px) {
  .hero {
    min-height: 120vh; /* Extra vertical space */
    padding: 2rem 1rem 6rem;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .hero-content {
    width: 100%;
    max-width: 500px;
  }

  .hero-content h1 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-animate {
    animation-delay: 0.2s;
  }

  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .stats-card {
    padding: 1rem;
  }

  .footer-bg .grid {
    gap: 2rem;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Accessibility focus */
button:focus,
a:focus {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

/* ✅ Added from inline code */

/* Aliey Font */
.aliey-font {
  font-family: 'Aliey', sans-serif;
}

/* Gallery Section Styles */
.gallery-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.gallery-btn {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid #dc2626;
  color: #dc2626;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.gallery-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: #dc2626;
  transition: left 0.3s ease;
  z-index: -1;
}

.gallery-btn:hover::before,
.gallery-btn.active::before {
  left: 0;
}

.gallery-btn:hover,
.gallery-btn.active {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

.gallery-box {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.gallery-box.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.5s ease;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  height: 300px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(220, 38, 38, 0.8);
  color: white;
  padding: 1rem;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.gallery-item:hover .overlay {
  transform: translateY(0);
}