/* ═══════════════════════════════════════════════════════════
   HOME PAGE - TLDC-LGU System
   Styles for hero, programs, process, and announcements sections
   ═══════════════════════════════════════════════════════════ */

/* ── HERO SECTION ── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(108deg,
      rgba(224, 87, 0, 0.88) 0%,
      rgba(20, 30, 40, 0.72) 42%,
      rgba(27, 94, 32, 0.80) 100%
    ),
    url('../../images/events/home-bg.jpg') center/cover no-repeat;
}

/* Grain texture overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 110px 0 70px;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-full);
  padding: 0.32rem 1rem;
  color: white;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.4rem;
  animation: fadeUp 0.6s ease both;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-light);
  animation: pulseDot 2s infinite;
}

/* Hero headline */
.hero-h1 {
  font-family: var(--font-primary);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: white;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.2rem;
  animation: fadeUp 0.65s 0.1s ease both;
}

.hero-h1 span {
  color: var(--orange-light);
  text-shadow: 0 0 40px rgba(255, 152, 0, 0.5);
}

/* Hero subheadline */
.hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.87);
  max-width: 520px;
  line-height: 1.75;
  margin: 0 auto 2rem;
  animation: fadeUp 0.65s 0.18s ease both;
}

/* Hero CTA buttons */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.65s 0.28s ease both;
}

.btn-cta-primary {
  background: var(--orange);
  color: white;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.85rem 2.1rem;
  border-radius: var(--radius-lg);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 6px 22px rgba(245, 124, 0, 0.55);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  text-decoration: none;
  animation: pulseCta 2.8s 1.8s ease infinite;
}

.btn-cta-primary:hover {
  background: var(--orange-dark);
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(245, 124, 0, 0.65);
  color: white;
}

.btn-cta-secondary {
  background: rgba(255, 255, 255, 0.13);
  color: white;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.83rem 2rem;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  backdrop-filter: blur(6px);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
}

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: white;
  transform: translateY(-2px);
  color: white;
}

/* Scroll hint */
.scroll-cue {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounceDown 2.2s infinite;
  z-index: 3;
}

/* ── SECTION HELPERS ── */
.section-pill {
  display: inline-block;
  background: rgba(245, 124, 0, 0.1);
  color: var(--orange-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.28rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.7rem;
}

.section-title {
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.section-sub {
  color: var(--text-mid);
  font-size: 0.97rem;
}

/* ── PROGRAMS SECTION ── */
#programs {
  background: var(--gray-bg);
  padding: 96px 0;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 2.5rem;
  justify-content: center;
}

.ftab {
  padding: 0.32rem 1rem;
  border-radius: var(--radius-full);
  border: 1.5px solid #dee2e6;
  background: white;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-primary);
  color: var(--text-mid);
}

.ftab.active,
.ftab:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}

.course-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--card-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  height: 100%;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover);
}

.cat-badge {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.62rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 0.8rem;
}

/* Category badge colors */
.cat-Business { background: #fff8e1; color: #f57f17; }
.cat-Technology { background: #e3f2fd; color: #1565c0; }
.cat-Construction { background: #fce4ec; color: #c62828; }
.cat-Hospitality { background: #f3e5f5; color: #6a1b9a; }
.cat-Transport { background: #e0f7fa; color: #006064; }
.cat-Electrical { background: #fff9c4; color: #f9a825; }
.cat-Heavy-Equipment { background: #efebe9; color: #4e342e; }
.cat-Agriculture { background: #e8f5e9; color: #2e7d32; }
.cat-Industrial { background: #ede7f6; color: #4527a0; }
.cat-Education { background: #e1f5fe; color: #0277bd; }

.course-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.course-name {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--navy);
  line-height: 1.35;
  min-height: 2.7rem;
}

.course-hrs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-mid);
  font-size: 0.8rem;
  margin-top: 0.45rem;
}

.btn-apply {
  width: 100%;
  margin-top: 1rem;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.83rem;
  padding: 0.58rem;
  border-radius: var(--radius-md);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.btn-apply:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  color: white;
}

/* ── PROCESS SECTION ── */
#process {
  background: white;
  padding: 96px 0;
}

.step-card {
  position: relative;
  background: white;
  border-radius: var(--radius-xl);
  border: 1.5px solid #eee;
  padding: 1.9rem 1.4rem;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  height: 100%;
}

.step-card:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 28px rgba(245, 124, 0, 0.13);
  transform: translateY(-4px);
}

.step-icon {
  width: 66px;
  height: 66px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.7rem auto 1rem;
  font-size: 1.65rem;
  color: var(--orange-dark);
}

.step-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--navy);
  margin-bottom: 0.45rem;
}

.step-desc {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ── ANNOUNCEMENTS SECTION ── */
#announcements {
  background: white;
  padding: 80px 0;
}

.ann-card {
  background: white;
  border-radius: 14px;
  border-left: 4px solid var(--orange);
  padding: 1.3rem 1.5rem;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.ann-card:hover {
  transform: translateX(4px);
  box-shadow: var(--card-hover);
}

.ann-date {
  font-size: 0.74rem;
  color: var(--orange-dark);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.ann-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
}

.ann-body {
  font-size: 0.83rem;
  color: var(--text-mid);
  margin-top: 0.3rem;
  line-height: 1.6;
}

/* ── COURSE MODAL ── */
.modal-header {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
}

.modal-title {
  font-family: var(--font-primary);
  font-weight: 700;
}

.btn-close {
  filter: brightness(0) invert(1);
}

#allCoursesModal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseDot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 152, 0, 0);
  }
}

@keyframes pulseCta {
  0%, 100% {
    box-shadow: 0 6px 22px rgba(245, 124, 0, 0.55);
  }
  50% {
    box-shadow: 0 6px 34px rgba(245, 124, 0, 0.78);
  }
}

@keyframes bounceDown {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hero-inner {
    padding: 90px 0 50px;
  }
  
  #programs,
  #process {
    padding: 64px 0;
  }
  
  #announcements {
    padding: 56px 0;
  }

  /* Show only 3 course cards on mobile */
  #courseGrid .course-item:nth-child(n+4) {
    display: none;
  }
}

/* ── GALLERY SECTION ── */
#gallery {
  background: var(--gray-bg);
  padding: 96px 0 120px;
  overflow: hidden;
}

/* 3D scene container */
.gallery-scene {
  position: relative;
  width: 100%;
  height: 340px;
  perspective: 1200px;
  margin-top: 2rem;
}

.gallery-carousel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  animation: galleryRotate 28s infinite linear;
  --tz: 420px;
}

.gallery-face {
  position: absolute;
  width: 320px;
  height: 180px;
  left: -160px;
  top: -90px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  overflow: hidden;
}

/* Subtle dark overlay so faces don't look washed out */
.gallery-face::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.18);
  border-radius: var(--radius-lg);
  transition: background .3s;
}

@keyframes galleryRotate {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(-360deg); }
}

/* Responsive — shrink on smaller screens */
@media (max-width: 768px) {
  .gallery-scene { height: 260px; }
  .gallery-carousel { --tz: 300px; }
  .gallery-face { width: 240px; height: 135px; left: -120px; top: -67px; }
  #gallery { padding: 64px 0 90px; }
}

@media (max-width: 480px) {
  .gallery-scene { height: 200px; }
  .gallery-carousel { --tz: 220px; }
  .gallery-face { width: 180px; height: 101px; left: -90px; top: -50px; }
}

/* ── COURSE DETAIL MODAL ── */
.cd-section-label {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-light);
  margin-bottom: .75rem;
}

.cd-hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .75rem;
  margin-bottom: .5rem;
}

.cd-hour-card {
  background: var(--gray-bg);
  border-radius: var(--radius-md);
  padding: .85rem .75rem;
  text-align: center;
}

.cd-hour-val {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--orange-dark);
  line-height: 1;
}

.cd-hour-label {
  font-size: .72rem;
  color: var(--text-light);
  margin-top: .25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cd-hour-card--total {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
}
.cd-hour-card--total .cd-hour-val,
.cd-hour-card--total .cd-hour-label { color: #fff; }

.cd-reqs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.cd-reqs li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .88rem;
  color: var(--text-mid);
  line-height: 1.55;
}

.cd-reqs li::before {
  content: '\F26E';
  font-family: 'bootstrap-icons';
  color: var(--green);
  font-size: .9rem;
  flex-shrink: 0;
  margin-top: .1rem;
}
