/* ============================================================
   SECTIONS.CSS — Al-Abbas Vocational Preparatory School
   Page Section Layouts & Specific Section Styles
   Premium $7000 Quality — Royal Navy & Gold Theme
   ============================================================ */

/* ─────────────────────────────────────────────
   SECTION — Hero
   ───────────────────────────────────────────── */
.section-hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--navy-950);
}

#canvas-container {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  overflow: hidden;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: var(--z-canvas);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: var(--z-particles);
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: var(--z-overlay);
  text-align: center;
  max-width: var(--container-narrow);
  padding: var(--space-xl) var(--container-padding);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

/* ─── Hero Badge ─── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-lg);
  border: 1px solid rgba(200, 168, 78, 0.3);
  border-radius: var(--radius-full);
  background: rgba(200, 168, 78, 0.06);
  color: var(--gold-400);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  animation: fadeInDown 1s var(--ease-in-out-premium) both;
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
}

.hero-badge-icon {
  font-size: var(--fs-sm);
}

/* ─── Hero Title ─── */
.hero-title {
  font-size: var(--fs-display);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s var(--ease-in-out-premium) 0.2s both;
  max-width: 900px;
}

/* ─── Hero Subtitle ─── */
.hero-subtitle {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--lh-relaxed);
  animation: fadeInUp 1s var(--ease-in-out-premium) 0.4s both;
}

/* ─── Hero CTA Group ─── */
.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  animation: fadeInUp 1s var(--ease-in-out-premium) 0.6s both;
  margin-top: var(--space-md);
}

/* ─── Hero Islamic Decoration ─── */
.hero-decoration {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: var(--z-overlay);
  pointer-events: none;
  background:
    /* Repeating Islamic star pattern at bottom */
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 28px,
      rgba(200, 168, 78, 0.08) 28px,
      rgba(200, 168, 78, 0.08) 30px
    );
  mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
  -webkit-mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
}

/* ─────────────────────────────────────────────
   SECTION — About
   ───────────────────────────────────────────── */
.section-about {
  background: var(--navy-800);
  padding: var(--section-padding-y) 0;
  position: relative;
  overflow: hidden;
}

/* Subtle Islamic pattern overlay on about section */
.section-about::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 58px,
      rgba(200, 168, 78, 0.02) 58px,
      rgba(200, 168, 78, 0.02) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px,
      transparent 58px,
      rgba(200, 168, 78, 0.02) 58px,
      rgba(200, 168, 78, 0.02) 60px
    );
  pointer-events: none;
  z-index: 0;
}

.section-about > .container {
  position: relative;
  z-index: 1;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.about-text p {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.highlight-item {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur-light);
  -webkit-backdrop-filter: var(--glass-blur-light);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  transition: all var(--transition-smooth);
}

.highlight-item:hover {
  border-color: var(--glass-border);
  transform: translateY(-2px);
}

@supports not (backdrop-filter: blur(12px)) {
  .highlight-item {
    background: rgba(10, 22, 40, 0.85);
  }
}

.highlight-icon {
  font-size: var(--fs-xl);
  color: var(--gold-400);
  flex-shrink: 0;
  margin-top: 2px;
}

.highlight-text h4 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2xs);
}

.highlight-text p {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: var(--lh-normal);
}

/* ─── About Image Frame ─── */
.about-image-frame {
  border: 3px solid var(--gold-600);
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.about-image-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  background: var(--gradient-gold);
  z-index: -1;
  opacity: 0.3;
  filter: blur(15px);
}

.about-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─────────────────────────────────────────────
   STATS GRID
   ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-3xl);
  border-top: 1px solid rgba(200, 168, 78, 0.2);
  position: relative;
}

/* Decorative element above stats */
.stats-grid::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: var(--gradient-gold);
}

/* ─────────────────────────────────────────────
   SECTION — Departments
   ───────────────────────────────────────────── */
.section-departments {
  background: var(--navy-900);
  padding: var(--section-padding-y) 0;
  position: relative;
  overflow: hidden;
}

/* Islamic lattice pattern background */
.section-departments::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Diagonal cross pattern */
    repeating-linear-gradient(
      45deg,
      transparent 0px,
      transparent 39px,
      rgba(200, 168, 78, 0.015) 39px,
      rgba(200, 168, 78, 0.015) 40px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent 0px,
      transparent 39px,
      rgba(200, 168, 78, 0.015) 39px,
      rgba(200, 168, 78, 0.015) 40px
    );
  pointer-events: none;
  z-index: 0;
}

.section-departments > .container {
  position: relative;
  z-index: 1;
}

.departments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

/* ─────────────────────────────────────────────
   SECTION — Gallery
   ───────────────────────────────────────────── */
.section-gallery {
  background: var(--navy-800);
  padding: var(--section-padding-y) 0;
  position: relative;
  overflow: hidden;
}

.section-gallery::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-section-divider);
}

.section-gallery > .container {
  position: relative;
  z-index: 1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* Alternate gallery layouts for visual variety */
.gallery-grid .gallery-item:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery-grid .gallery-item:nth-child(4) {
  grid-column: span 2;
}

/* ─────────────────────────────────────────────
   SECTION — Location
   ───────────────────────────────────────────── */
.section-location {
  background: var(--navy-900);
  padding: var(--section-padding-y) 0;
  position: relative;
  overflow: hidden;
}

.section-location::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-section-divider);
}

.section-location > .container {
  position: relative;
  z-index: 1;
}

.location-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.map-container {
  border: 2px solid var(--gold-600);
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.map-container::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  background: var(--gradient-gold);
  z-index: -1;
  opacity: 0.2;
  filter: blur(12px);
}

.map-frame iframe {
  width: 100%;
  height: 450px;
  display: block;
  border: none;
}

.location-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ─────────────────────────────────────────────
   SECTION — Contact
   ───────────────────────────────────────────── */
.section-contact {
  background: var(--navy-800);
  padding: var(--section-padding-y) 0;
  position: relative;
  overflow: hidden;
}

/* Islamic arch pattern decoration */
.section-contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-section-divider);
}

.section-contact::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 50%, rgba(200, 168, 78, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 90% 50%, rgba(200, 168, 78, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.section-contact > .container {
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-form-wrapper {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.contact-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-gold);
  opacity: 0.5;
}

@supports not (backdrop-filter: blur(20px)) {
  .contact-form-wrapper {
    background: rgba(10, 22, 40, 0.92);
  }
}

#contact-form {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
#main-footer {
  background: var(--navy-950);
  border-top: 1px solid rgba(200, 168, 78, 0.2);
  padding: var(--space-3xl) 0 var(--space-xl);
  position: relative;
  overflow: hidden;
}

/* Decorative gold line at footer top */
#main-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-section-divider);
}

/* Subtle pattern */
#main-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(200, 168, 78, 0.02) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(200, 168, 78, 0.02) 0%, transparent 40%);
  pointer-events: none;
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

/* ─── Footer Brand ─── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-logo-icon {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(200, 168, 78, 0.3));
}

.footer-logo-text {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--gold-400);
}

.footer-description {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: var(--lh-relaxed);
  max-width: 350px;
}

/* ─── Footer Links ─── */
.footer-heading {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--gold-400);
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  position: relative;
  padding-bottom: var(--space-sm);
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-link-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer-link-item a {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  transition: all var(--transition-base);
  position: relative;
}

.footer-link-item a::before {
  content: '›';
  color: var(--gold-600);
  margin-right: var(--space-xs);
  transition: transform var(--transition-base);
  display: inline-block;
}

.footer-link-item a:hover {
  color: var(--gold-400);
  padding-left: var(--space-xs);
}

.footer-link-item a:hover::before {
  transform: translateX(3px);
  color: var(--gold-400);
}

/* ─── Footer Social ─── */
.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.footer-social-link {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-circle);
  border: 1px solid rgba(200, 168, 78, 0.2);
  background: rgba(200, 168, 78, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-500);
  font-size: var(--fs-md);
  transition: all var(--transition-smooth);
}

.footer-social-link:hover {
  background: var(--gradient-gold);
  color: var(--navy-900);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
}

/* ─── Footer Bottom ─── */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(200, 168, 78, 0.1);
  gap: var(--space-md);
}

.footer-copyright {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-bottom-links a {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.footer-bottom-links a:hover {
  color: var(--gold-400);
}

/* ─────────────────────────────────────────────
   SECTION DIVIDERS — Islamic Geometric
   ───────────────────────────────────────────── */
.section-divider {
  width: 100%;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--gradient-section-divider);
}

.section-divider-icon {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  background: var(--navy-900);
  border: 2px solid var(--gold-600);
  border-radius: var(--radius-sm);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-divider-icon::before {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--gradient-gold);
  border-radius: 2px;
  transform: rotate(0deg);
}

/* ─────────────────────────────────────────────
   RESPONSIVE — Mobile (<768px)
   ───────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Hero */
  .section-hero {
    min-height: 100svh;
  }

  .hero-content {
    padding: var(--space-lg);
    gap: var(--space-md);
  }

  .hero-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: var(--fs-base);
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 6px var(--space-md);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  .about-image-frame {
    order: -1;
    aspect-ratio: 16 / 9;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
  }

  /* Departments */
  .departments-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .gallery-grid .gallery-item:nth-child(1) {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 16 / 9;
  }

  .gallery-grid .gallery-item:nth-child(4) {
    grid-column: span 1;
  }

  /* Location */
  .location-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .map-frame iframe {
    height: 300px;
  }

  .location-details {
    order: -1;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: var(--space-xl);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-description {
    max-width: 100%;
    text-align: center;
  }

  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links {
    align-items: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE — Tablet (768-1199px)
   ───────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1199px) {
  /* Hero */
  .hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }

  /* Departments */
  .departments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .gallery-grid .gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 21 / 9;
  }

  .gallery-grid .gallery-item:nth-child(4) {
    grid-column: span 1;
  }

  /* Location */
  .location-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: var(--space-xl);
  }

  .map-frame iframe {
    height: 380px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-2xl);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-xl);
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE — Large Desktop (1400+)
   ───────────────────────────────────────────── */
@media (min-width: 1400px) {
  .hero-title {
    font-size: 5rem;
  }

  .departments-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
  }

  .gallery-grid {
    gap: var(--space-xl);
  }

  .location-grid {
    gap: var(--space-3xl);
  }

  .contact-grid {
    gap: var(--space-3xl);
  }
}

/* ─────────────────────────────────────────────
   LANDSCAPE MOBILE ADJUSTMENT
   ───────────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .section-hero {
    min-height: 100vh;
    padding: var(--space-3xl) 0;
  }

  .hero-content {
    gap: var(--space-sm);
  }

  .hero-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }

  .scroll-indicator {
    display: none;
  }
}
