/* =============================================
   HOMEPAGE — PREMIUM DESIGN
   ============================================= */

/* ============================================
   HERO
   ============================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(150deg,
    #001233 0%,
    #00296b 22%,
    #003f88 48%,
    #00509d 62%,
    #003f88 78%,
    #00296b 90%,
    #001030 100%
  );
}

/* Radial gold glow from center */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%,
      rgba(255,213,0,0.12) 0%,
      rgba(253,197,0,0.04) 45%,
      transparent 70%
    ),
    radial-gradient(ellipse 35% 25% at 15% 75%,
      rgba(0,41,107,0.7) 0%,
      transparent 60%
    ),
    radial-gradient(ellipse 35% 25% at 85% 15%,
      rgba(0,63,136,0.5) 0%,
      transparent 60%
    );
  pointer-events: none;
}

/* Canvas mesh */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Bottom gradient fade into stats */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, rgba(7,21,16,0.7));
  pointer-events: none;
}

.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 28px 140px;
  position: relative;
  z-index: 2;
  gap: 0;
}

/* Decorative gold ornament line */
.hero-ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-ornament-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero-ornament-line.right {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-ornament-diamond {
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(201,168,76,0.6);
}

.hero-arabic {
  font-family: var(--font-arabic);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--gold);
  line-height: 1.5;
  margin-bottom: 28px;
  direction: rtl;
  text-align: center;
  text-shadow: 0 0 40px rgba(201,168,76,0.4), 0 2px 8px rgba(0,0,0,0.3);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.35s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.4rem);
  color: var(--white);
  line-height: 1.15;
  max-width: 820px;
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-pale);
}

.hero-sub {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.65s forwards;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 56px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero-btns .btn { padding: 15px 38px; font-size: 0.92rem; }

/* Scroll indicator */
.hero-scroll {
  opacity: 0;
  animation: fadeUp 0.8s ease 1s forwards;
}

.hero-scroll span {
  display: block;
  width: 26px; height: 42px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 13px;
  margin: 0 auto;
  position: relative;
}

.hero-scroll span::after {
  content: '';
  position: absolute;
  top: 7px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 9px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
  animation: scroll-dot 2.2s ease infinite;
}

@keyframes scroll-dot {
  0%   { top: 7px; opacity: 1; }
  100% { top: 24px; opacity: 0; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Stats Bar ---- */
.stats-bar {
  position: relative;
  z-index: 2;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(201,168,76,0.2);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 32px;
  border-right: 1px solid rgba(255,255,255,0.07);
  color: var(--white);
  transition: var(--transition);
}

.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(201,168,76,0.06); }

.stat-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.stat-item:hover .stat-icon-wrap {
  background: rgba(201,168,76,0.18);
  border-color: rgba(201,168,76,0.45);
  box-shadow: 0 0 16px rgba(201,168,76,0.15);
}

.stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-item span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============================================
   PROGRAMS SECTION
   ============================================= */

#programs { background: var(--cream); }

.programs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.program-card {
  position: relative;
  border-radius: var(--radius);
  padding: 44px 40px 40px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26,71,49,0.07);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

/* Gold top border accent */
.program-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--green));
  background-size: 200% 100%;
  transition: background-position 0.6s ease;
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(26,71,49,0.14);
  border-color: rgba(201,168,76,0.2);
}

.program-card:hover::before {
  background-position: 100% 0;
}

/* Corner number */
.program-card-num {
  position: absolute;
  top: 20px; right: 28px;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(26,71,49,0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.program-card-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(26,71,49,0.25);
}

.program-card-icon svg {
  width: 32px; height: 32px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.program-card-badge {
  font-family: var(--font-urdu);
  font-size: 1.15rem;
  color: var(--gold);
  direction: rtl;
  display: inline-block;
}

.program-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1.25;
}

.program-card p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.75;
}

.program-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--sage);
  border-bottom: 1px solid var(--sage);
}

.program-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-main);
}

.program-features li::before {
  content: '';
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='%23C9A84C' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

.program-card .btn { margin-top: auto; align-self: flex-start; }

/* ============================================
   WHY CHOOSE US — DARK SECTION
   ============================================= */

.why-section {
  background: linear-gradient(160deg, #071510 0%, #0d2318 40%, #091b10 100%);
  position: relative;
  overflow: hidden;
}

.why-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: grid-shift 18s linear infinite;
}

@keyframes grid-shift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

.why-section .section-heading h2 { color: var(--white); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
  z-index: 1;
}

.feature-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-box::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  opacity: 0;
  transition: var(--transition);
}

.feature-box:hover {
  background: rgba(201,168,76,0.06);
  border-color: rgba(201,168,76,0.2);
  transform: translateY(-4px);
}

.feature-box:hover::before { opacity: 1; }

.feature-icon-wrap {
  width: 54px; height: 54px;
  border-radius: 12px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: var(--transition);
}
.feature-icon-wrap svg {
  flex-shrink: 0;
  transition: var(--transition);
}
.feature-box:hover .feature-icon-wrap svg {
  stroke: var(--gold-light);
  filter: drop-shadow(0 0 6px rgba(201,168,76,0.4));
}

.feature-box:hover .feature-icon-wrap {
  background: rgba(201,168,76,0.18);
  border-color: rgba(201,168,76,0.4);
  box-shadow: 0 4px 20px rgba(201,168,76,0.2);
}

.feature-box h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.3;
}

.feature-box p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
}

/* ============================================
   TESTIMONIALS
   ============================================= */

#testimonials { background: var(--cream); }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(26,71,49,0.07);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(201,168,76,0.2);
}

/* Large decorative quote */
.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: -10px; right: 24px;
  font-family: var(--font-display);
  font-size: 8rem;
  color: rgba(201,168,76,0.1);
  line-height: 1;
  pointer-events: none;
}

.stars {
  display: flex;
  gap: 3px;
}

.stars span {
  color: var(--gold);
  font-size: 0.9rem;
}

.testimonial-urdu {
  font-family: var(--font-urdu);
  font-size: 1rem;
  direction: rtl;
  color: var(--navy);
  line-height: 2.1;
  border: none;
  padding: 0;
  font-style: normal;
  position: relative;
  z-index: 1;
}

.testimonial-en {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.7;
  padding-top: 12px;
  border-top: 1px solid var(--sage);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}

.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26,71,49,0.25);
  letter-spacing: 0.05em;
}

.testimonial-author strong {
  display: block;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 2px;
}

.testimonial-author span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================
   ADMISSION CTA BANNER
   ============================================= */

.cta-banner {
  background: linear-gradient(135deg, #0a1a0d 0%, var(--green-deep) 40%, #0a1a0d 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-shift 10s linear infinite;
}

/* Gold glow top center */
.cta-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cta-banner-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;
}

.cta-urdu {
  font-family: var(--font-urdu);
  font-size: 1.4rem;
  color: var(--gold);
  direction: rtl;
  text-align: right;
  display: block;
  margin-bottom: 10px;
}

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.2;
}

.cta-banner p {
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
}

.cta-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cta-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ============================================
   GALLERY PREVIEW
   ============================================= */

#gallery-preview { background: var(--cream); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 220px 220px;
  gap: 14px;
  margin-bottom: 36px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,21,16,0.8) 0%, transparent 50%);
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.gallery-item:hover::after { opacity: 1; }

.gallery-item.gallery-tall  { grid-row: span 2; }
.gallery-item.gallery-wide  { grid-column: span 2; }

.gallery-label {
  position: relative;
  z-index: 2;
  padding: 16px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  opacity: 0;
  transform: translateY(8px);
  transition: var(--transition);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gallery-item:hover .gallery-label {
  opacity: 1;
  transform: translateY(0);
}

/* Gallery placeholder content */
.gallery-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

.gallery-placeholder .icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.gallery-cta { text-align: center; }

/* ============================================
   REVEAL (stagger for grids)
   ============================================= */

.features-grid .feature-box:nth-child(1) { transition-delay: 0s; }
.features-grid .feature-box:nth-child(2) { transition-delay: 0.07s; }
.features-grid .feature-box:nth-child(3) { transition-delay: 0.14s; }
.features-grid .feature-box:nth-child(4) { transition-delay: 0.21s; }
.features-grid .feature-box:nth-child(5) { transition-delay: 0.28s; }
.features-grid .feature-box:nth-child(6) { transition-delay: 0.35s; }

.programs-grid .program-card:nth-child(1) { transition-delay: 0s; }
.programs-grid .program-card:nth-child(2) { transition-delay: 0.12s; }

.testimonials-grid .testimonial-card:nth-child(1) { transition-delay: 0s; }
.testimonials-grid .testimonial-card:nth-child(2) { transition-delay: 0.1s; }
.testimonials-grid .testimonial-card:nth-child(3) { transition-delay: 0.2s; }

/* ============================================
   RESPONSIVE — HOMEPAGE
   ============================================= */

@media (max-width: 1024px) {
  .features-grid       { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid   { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .stats-grid          { grid-template-columns: repeat(2, 1fr); }
  .stat-item           { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); padding: 20px; }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-bottom: none; }

  .programs-grid       { grid-template-columns: 1fr; }
  .features-grid       { grid-template-columns: 1fr; }
  .testimonials-grid   { grid-template-columns: 1fr; }

  .cta-banner-inner    { grid-template-columns: 1fr; text-align: center; }
  .cta-urdu            { text-align: center; }
  .cta-btn-wrap        { align-items: center; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }
  .gallery-item.gallery-tall,
  .gallery-item.gallery-wide {
    grid-row: span 1;
    grid-column: span 1;
  }
  .gallery-grid .gallery-item { height: 160px; }
}

@media (max-width: 480px) {
  .hero-title   { font-size: 2rem; }
  .hero-btns    { flex-direction: column; align-items: center; }
  .hero-btns .btn { width: 100%; max-width: 280px; justify-content: center; }
  .stats-grid   { grid-template-columns: 1fr; }
  .stat-item    { border-bottom: 1px solid rgba(255,255,255,0.07) !important; }
}
