/* ========== Global Styles ========== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #222;
  background: #f9f9f9;
}

section h1, section h2, section h3, section p,
.card h3, .card p {
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

/* ========== Header ========== */
header {
  background: #111;
  color: #fff;
  padding: 2rem;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
}

header p {
  font-size: 1.2rem;
}

/* ========== Hero Section ========== */
.hero {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url("../assets/images/hero-bg.jpg") no-repeat center center;
  background-size: cover;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* scroll-down (fixed, fades out on scroll) */
.scroll-down {
  position: fixed;               /* fixed so it stays bottom-center regardless of hero height */
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: #fff;
  opacity: 1;
  z-index: 999;
  text-decoration: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: auto;
  /* keep bounce but only while visible (removed when .hidden applied) */
  animation: bounce 1.5s infinite;
}

/* keep the exact keyframes you already had */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* hidden state (fades and drops slightly; disables clicks) */
.scroll-down.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
  animation: none; /* stop bounce when hidden */
}

.hero-text {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 0.3s;
  background: rgba(0, 0, 0, 0.6);
  padding: 2rem 3rem;
  border-radius: 12px;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  max-width: 90%;
  box-sizing: border-box;
}

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


.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.hero-text .cta {
  display: inline-block;
  background: #f79420;
  color: #fff;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.hero-text .cta:hover {
  background: #ff9900;
}

/* ========== Sections ========== */
section {
  width: 100%;
  margin: 3rem auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

/* ========== Grid / Cards ========== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card img {
  width: 100%;
  height: auto;
  display: block;
}

.card-content {
  padding: 1rem;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Hover overlay for project details */
.card-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17,17,17,0.95);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

.card:hover .card-hover {
  opacity: 1;
}

/* ========== Call-to-Action ========== */
.cta {
  width: 100%;
  max-width: 1200px;
  margin: 3rem auto;
  text-align: center;
  padding: 0 2rem;
  box-sizing: border-box;
}

.cta a {
  display: inline-block;
  background: #f79420;
  color: #fff;
  padding: 0.8rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.cta a:hover {
  background: #ff9900;
}

/* ========== Footer ========== */
footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  margin-top: 4rem;
  font-size: 0.9rem;
}

/* ========== Mobile Optimization ========== */
@media (max-width: 1200px) {
  section, .cta {
    padding: 0 1.5rem;
  }
}

@media (max-width: 900px) {
  section, .cta {
    padding: 0 1rem;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 60vh;
  }

  .hero-text {
    padding: 1rem 1.2rem;
    max-width: 95%;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-text .cta {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .grid {
    gap: 1.5rem;
  }
}

@media (max-width: 500px) {
  .card-hover {
    opacity: 1;
    height: unset;
    position: relative;
    background: #222;
    padding: 1rem;
    margin-top: -1rem;
    border-radius: 0 0 12px 12px;
  }

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

  .cta a {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  footer {
    font-size: 0.8rem;
    padding: 1rem;
  }
}

