/* ==========================================================
   BASE STYLES
   ========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: #0b0c10;
  color: #eee;
  overflow-x: hidden;
}

/* ==========================================================
   HERO SECTION (Upgraded)
   ========================================================== */
.projects-hero {
  position: relative;
  height: 85vh;
  background: url('../assets/images/aboutuspage/servicepage.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1000px;
}

/* Animated dark overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11,12,16,0.85), rgba(17,24,39,0.9));
  background-size: 200% 200%;
  animation: overlayShift 10s ease-in-out infinite alternate;
}

@keyframes overlayShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Subtle diagonal gold pattern */
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 204, 51, 0.08) 0,
    rgba(255, 204, 51, 0.08) 2px,
    transparent 2px,
    transparent 80px
  );
  animation: movePattern 40s linear infinite;
  z-index: 1;
  opacity: 0.2;
}

@keyframes movePattern {
  from { background-position: 0 0; }
  to { background-position: 1000px 1000px; }
}

/* Parallax zoom background */
.projects-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  z-index: 0;
  transform: scale(1.1);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* Hero text content */
.hero-content {
  position: relative;
  text-align: center;
  color: #fff;
  z-index: 3;
  padding: 0 10%;
  animation: fadeUp 1.5s ease forwards;
  opacity: 0;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 800;
  color: #ffcc33;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(255,204,51,0.5);
}

.hero-content h1 span {
  color: #fff;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #ccc;
  font-weight: 400;
  max-width: 750px;
  margin-inline: auto;
  line-height: 1.6;
}

/* ==========================================================
   PROJECTS SECTION
   ========================================================== */
.projects-section {
  padding: clamp(60px, 8vw, 100px) 8%;
  text-align: center;
  background: #0b0c10;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: #ffcc33;
  font-weight: 700;
}

.underline {
  width: 90px;
  height: 4px;
  background: linear-gradient(90deg, #ffcc33, #ff9900);
  margin: 15px auto 25px;
  border-radius: 5px;
  animation: slideBar 2.5s ease-in-out infinite;
}

@keyframes slideBar {
  0%, 100% { width: 90px; }
  50% { width: 140px; }
}

.section-subtitle {
  color: #aaa;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  margin-bottom: clamp(40px, 6vw, 60px);
  max-width: 700px;
  margin-inline: auto;
}

/* ==========================================================
   PROJECT CARDS GRID
   ========================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(20px, 4vw, 40px);
}

.project-card {
  background: #111827;
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  position: relative;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(255, 204, 51, 0.2);
}

.card-img {
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.card-img img {
  width: 100%;
  height: clamp(180px, 25vw, 230px);
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .card-img img {
  transform: scale(1.1);
}

.card-info {
  padding: clamp(15px, 2vw, 20px);
  text-align: left;
}

.card-info h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: #ffcc33;
  margin-bottom: 10px;
  font-weight: 600;
}

.card-info p {
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  color: #ccc;
  line-height: 1.6;
}

/* ==========================================================
   SCROLL ANIMATION (Optional Enhancement)
   ========================================================== */
.project-card {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  background: #111;
  text-align: center;
  padding: clamp(15px, 3vw, 25px);
  color: #888;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  border-top: 1px solid #222;
}

/* ==========================================================
   RESPONSIVE TWEAKS
   ========================================================== */
@media (max-width: 768px) {
  .projects-hero {
    height: 65vh;
  }

  .hero-content {
    padding: 0 5%;
  }

  .projects-section {
    padding: 60px 5%;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    letter-spacing: 1px;
  }

  .projects-grid {
    gap: 20px;
  }
}
