/* ================= HERO ================= */

.hero {
  padding: 100px 20px;
  text-align: center;
  color: #fff;
  position: relative;

  /* better hero behaviour */
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;

  /* background control */
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  animation: fadeDown 1s ease;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  animation: fadeUp 1s ease;
}


/* ================= HERO BACKGROUNDS ================= */

.building-hero {
  background-image:
  linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
  url("../images/building-hero.jpeg");
}

.catering-hero {
  background-image:
  linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
  url("../images/catering-hero.jpeg");
}

.computer-hero {
  background-image:
  linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
  url("../images/ict-hero.jpg");
}

.cosmetology-hero {
  background-image:
  linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
  url("../images/cosmetic-hero.jpg");
}

.electrical-hero {
  background-image:
  linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
  url("../images/electric-hero.jpeg");
}

.fashion-hero {
  background-image:
  linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
  url("../images/fashion-hero.jpg");
}


/* ================= CONTENT ================= */

.dept-content {
  padding: 70px 20px;
}

.dept-content h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2rem;
  color: var(--dark);
}

.dept-content p {
  max-width: 800px;
  margin: 0 auto 40px auto;
  text-align: center;
  color: var(--text);
  line-height: 1.7;
}


/* ================= IMAGE ================= */

.dept-img {
  text-align: center;
  margin-bottom: 50px;
}

.dept-img img {
  width: 100%;
  max-width: 800px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}


/* ================= COURSES ================= */

.courses h3 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.6rem;
}

.course-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

.course-card {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.course-card h4 {
  margin-bottom: 10px;
  color: var(--primary);
}

.course-card p {
  text-align: left;
  margin: 0;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}


/* ================= ANIMATIONS ================= */

@keyframes fadeDown {
  from { 
    opacity: 0; 
    transform: translateY(-20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}


/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

  .hero {
    padding: 70px 15px;
    min-height: 320px;
  }

  .hero h1 {
    font-size: 2rem;
  }

}