/* ==========================================================================
   مدارس التربية الصالحة الأهلية بالخبر (قسم البنين)
   Refined Master CSS - 100% Uniform Navbar Dropdowns & Arrows
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Tajawal:wght@400;500;700;900&display=swap');

:root {
  /* Brand Palette */
  --primary-deep: #062C1E;
  --primary: #0A4A2F;
  --primary-mid: #0E6B44;
  --primary-light: #16A363;
  --accent-gold: #D4AF37;
  --accent-gold-bright: #F3E5AB;
  --gold-glow: rgba(212, 175, 55, 0.3);
  --gold-gradient: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 50%, #AA7C11 100%);

  /* Neutrals */
  --bg-dark: #04140D;
  --bg-card: #083323;
  --light-bg: #F4F7F5;
  --light-card: #FFFFFF;
  --text-dark: #121F18;
  --text-muted: #4A5E53;
  --text-light: #FFFFFF;
  
  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 25px rgba(10, 74, 47, 0.12);
  --shadow-gold: 0 0 20px rgba(212, 175, 55, 0.35);

  /* Fonts */
  --font-heading: 'Cairo', sans-serif;
  --font-body: 'Tajawal', sans-serif;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
  font-size: 14.2px;
  overflow-x: hidden;
  overflow-y: auto !important;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

body {
  font-family: var(--font-body);
  background-color: var(--light-bg);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
  overflow-y: auto !important;
  position: relative;
  width: 100%;
  touch-action: pan-y !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.3;
  color: var(--primary-deep);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Glassmorphism utility */
.glass-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(10, 74, 47, 0.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   ULTRA SMOOTH RE-TRIGGERING SCROLL ENTRANCE ANIMATIONS
   ========================================================================== */
.reveal-left {
  opacity: 0;
  transform: translateX(-55px);
  transition: opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1), transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right {
  opacity: 0;
  transform: translateX(55px);
  transition: opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1), transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1), transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 1.15s cubic-bezier(0.16, 1, 0.3, 1), transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-active {
  opacity: 1 !important;
  transform: translate(0, 0) scale(1) !important;
}

/* Stagger Delays for Grid Elements */
.delay-1 { transition-delay: 0.15s !important; }
.delay-2 { transition-delay: 0.3s !important; }
.delay-3 { transition-delay: 0.45s !important; }
.delay-4 { transition-delay: 0.6s !important; }

/* CLICKABLE CONTACT CARDS & MINIMAL CIRCULAR SVG BADGES */
.clickable-contact-card {
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none !important;
  border: 1.5px solid rgba(10, 74, 47, 0.12) !important;
}

.clickable-contact-card:hover,
.clickable-contact-card:active {
  transform: translateY(-4px) !important;
  border-color: var(--accent-gold) !important;
  box-shadow: 0 12px 25px rgba(10, 74, 47, 0.15) !important;
  background: #FFFFFF !important;
}

.click-badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(22, 163, 99, 0.12);
  color: var(--primary-mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  border: 1px solid rgba(22, 163, 99, 0.2);
}

.clickable-contact-card:hover .click-badge-icon {
  background: var(--gold-gradient);
  color: var(--primary-deep);
  border-color: var(--accent-gold);
  transform: scale(1.1);
}

/* FOOTER CONTACT ITEMS & ICON BADGES */
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.9) !important;
  margin-bottom: 0.65rem;
  transition: var(--transition);
  text-decoration: none !important;
  font-size: 0.88rem;
  line-height: 1.5;
}

.footer-contact-item:hover {
  color: var(--accent-gold) !important;
  transform: translateX(-4px);
}

.footer-contact-item a {
  color: var(--accent-gold) !important;
  font-weight: 800;
  transition: var(--transition);
}

.footer-contact-item a:hover {
  color: #FFFFFF !important;
  text-decoration: underline;
}

.footer-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(10, 74, 47, 0.9);
  border: 1px solid var(--accent-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.footer-icon-badge svg {
  fill: var(--accent-gold) !important;
}

/* TOP BAR (Desktop) */
.top-bar {
  background: var(--primary-deep);
  color: #FFFFFF;
  font-size: 0.88rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.top-bar-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.top-info {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  color: #FFFFFF;
}

.top-info a {
  transition: var(--transition);
}

.top-info a:hover {
  color: var(--accent-gold) !important;
}

.top-info span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.top-info svg {
  fill: var(--accent-gold);
  flex-shrink: 0;
}

.portal-links {
  display: flex;
  gap: 0.6rem;
}

.portal-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF !important;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(212, 175, 55, 0.4);
  transition: var(--transition);
}

.portal-badge:hover {
  background: var(--gold-gradient);
  color: var(--primary-deep) !important;
  box-shadow: var(--shadow-gold);
}

/* NAVBAR (Desktop) */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-emblem-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 3px 12px rgba(10, 74, 47, 0.15);
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--primary-deep);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 800;
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.4rem;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  transition: var(--transition);
}

.dropdown-arrow {
  display: inline-block !important;
  fill: currentColor;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.nav-item:hover .dropdown-arrow {
  transform: rotate(180deg);
}

.nav-link svg:not(.dropdown-arrow) {
  display: none !important;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(10, 74, 47, 0.08);
  color: var(--primary-mid);
}

/* Desktop Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 210px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(10, 74, 47, 0.1);
  padding: 0.5rem;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1100;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.dropdown-item a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.dropdown-item a:hover {
  background: rgba(10, 74, 47, 0.06);
  color: var(--primary-mid);
}

/* Buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: #fff !important;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-gold {
  background: var(--gold-gradient);
  color: var(--primary-deep) !important;
  font-weight: 800;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-gold);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.btn-outline {
  border: 1.5px solid var(--primary-mid);
  color: var(--primary-mid);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  white-space: nowrap;
  transition: var(--transition);
}

.mobile-toggle {
  display: none;
}

/* HERO SECTION (Desktop - Expanded Container, Medium Typography) */
.hero-section {
  position: relative;
  min-height: 78vh;
  background: linear-gradient(160deg, var(--bg-dark) 0%, #08281B 60%, #03140C 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  padding: 3.2rem 0;
}

#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #F3E5AB !important;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.25;
  color: #FFFFFF;
  margin-bottom: 0.9rem;
}

.hero-title span.highlight {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.typing-slogan {
  font-size: 1.25rem;
  color: #A3E6C5;
  font-weight: 700;
  margin-bottom: 0.9rem;
  min-height: 1.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-desc {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.6rem;
  max-width: 560px;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.tilt-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(212, 175, 55, 0.35);
}

.tilt-card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.tilt-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(4, 20, 13, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.6rem;
}

.tilt-card-tag {
  background: var(--primary-light);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  align-self: flex-start;
  margin-bottom: 0.45rem;
}

.tilt-card-title {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

/* STATS SECTION (Desktop - Sleek, Thin & Elegant Floating Bar) */
.stats-section {
  position: relative;
  z-index: 20;
  margin-top: -2.2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: #FFFFFF;
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(10, 74, 47, 0.1);
  align-items: center;
}

.stat-item {
  text-align: center;
  position: relative;
  padding: 0 0.5rem;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: rgba(10, 74, 47, 0.12);
}

.stat-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
  color: var(--accent-gold) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.4rem;
  border: 1.5px solid var(--accent-gold);
  box-shadow: 0 3px 10px rgba(10, 74, 47, 0.2);
}

.stat-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--accent-gold);
}

.stat-number {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--primary-deep);
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* SECTION PADDING & HEADERS */
.section-padding {
  padding: 3.8rem 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.section-subtitle {
  display: inline-block;
  color: var(--primary-light);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  background: rgba(22, 163, 99, 0.08);
  padding: 0.25rem 0.85rem;
  border-radius: var(--radius-full);
}

.section-title {
  font-size: 1.95rem;
  color: var(--primary-deep);
  margin-bottom: 0.6rem;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* PROGRAM CARDS & DESKTOP SUBPAGE GRIDS */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.facilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.program-card {
  background: var(--light-card);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(10, 74, 47, 0.08);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.program-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border: 1px solid var(--accent-gold);
}

.program-icon-box svg {
  fill: var(--accent-gold);
}

.program-title {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.program-grades {
  display: inline-block;
  background: rgba(10, 74, 47, 0.06);
  color: var(--primary-mid);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.program-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.1rem;
}

/* ABOUT SECTION */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-img-group {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-img-main {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.about-img-sub {
  display: none !important;
}

.feature-list {
  list-style: none;
  margin: 1rem 0 1.5rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  font-weight: 700;
  font-size: 0.92rem;
}

/* PORTALS BANNER */
.portals-banner {
  background: linear-gradient(135deg, #052418 0%, #0A4A2F 100%);
  border-radius: var(--radius-lg);
  padding: 2.8rem 2rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-gold);
  box-shadow: var(--shadow-md);
}

.portals-banner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.portal-card-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.2rem;
  text-align: center;
  transition: var(--transition);
  color: #FFFFFF !important;
}

.portal-card-box h3 {
  color: #FFFFFF !important;
  font-size: 1.18rem;
  margin-bottom: 0.4rem;
}

.portal-card-box p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.portal-icon svg {
  fill: var(--accent-gold);
}

/* FORM STYLES */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--primary-deep);
  font-size: 0.88rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid #C4D4CC;
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: var(--transition);
  background: #FAFCFA;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 3px rgba(22, 163, 99, 0.12);
  background: #fff;
}

/* FOOTER & CLICKABLE LINKS */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 3.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 50;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.2rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-title {
  color: #fff;
  font-size: 1.08rem;
  margin-bottom: 1rem;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent-gold) !important;
  transform: translateX(-4px);
}

.footer-contact-info p {
  font-size: 0.88rem;
  margin-bottom: 0.7rem;
  line-height: 1.5;
}

.footer-bottom {
  padding-top: 1.5rem;
  font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}


/* ==========================================================================
   PRINT STYLES (@media print) - CLEAN FULL-PAGE CONTRACT PRINTING
   ========================================================================== */
@media print {
  .official-contract-card button,
  .official-contract-card .btn-gold,
  .official-contract-card .btn-outline {
    display: none !important;
  }

  .top-bar, .navbar, .mobile-toggle, #particle-canvas {
    display: none !important;
  }
}


/* ==========================================================================
   MOBILE MEDIA QUERIES (<= 768px)
   ========================================================================== */

@media (max-width: 992px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: flex;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #EBF3EF;
    color: var(--primary-deep);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(10,74,47,0.15);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 13px;
  }

  .top-bar {
    display: none !important;
  }

  .navbar {
    padding: 0.2rem 0;
  }

  .nav-container {
    padding: 0.4rem 0.8rem;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .brand-sub {
    font-size: 0.7rem;
  }

  .logo-emblem-img {
    width: 36px;
    height: 36px;
  }

  /* Mobile Drawer Navigation Menu */
  .nav-links {
    display: flex;
    position: fixed;
    top: 50px;
    right: -100%;
    width: 82%;
    max-width: 300px;
    height: calc(100vh - 50px);
    background: rgba(4, 20, 13, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1.2rem 0.9rem;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    align-items: stretch;
    text-align: right;
    overflow-y: auto;
    box-shadow: -8px 0 25px rgba(0, 0, 0, 0.4);
    border-left: 1px solid rgba(212, 175, 55, 0.25);
    z-index: 1200;
    pointer-events: none;
    visibility: hidden;
  }

  .nav-links.active {
    right: 0;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  .nav-link {
    color: #FFFFFF;
    font-size: 0.92rem;
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 0.3rem;
    justify-content: flex-start;
    gap: 0.6rem;
  }

  .nav-link svg:not(.dropdown-arrow) {
    display: inline-block !important;
    fill: var(--accent-gold);
  }

  .nav-link.active, .nav-link:hover {
    background: var(--gold-gradient);
    color: var(--primary-deep) !important;
  }

  .nav-link.active svg, .nav-link:hover svg {
    fill: var(--primary-deep);
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    border: none;
    margin: 0.2rem 0 0.5rem;
    padding: 0.2rem;
  }

  .dropdown-item a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  /* Compact Mobile Hero Section */
  .hero-section {
    padding: 2rem 0;
    min-height: auto;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .hero-title {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .typing-slogan {
    font-size: 1rem;
    justify-content: center;
  }

  .hero-desc {
    font-size: 0.88rem;
    margin-bottom: 1.2rem;
  }

  .hero-cta {
    justify-content: center;
    gap: 0.6rem;
  }

  .hero-cta a {
    width: 100%;
    padding: 0.7rem;
    font-size: 0.9rem;
  }

  .tilt-card img {
    height: 220px;
  }

  /* STATS CARDS ON MOBILE - ULTRA COMPACT */
  .stats-section {
    margin-top: 0.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem !important;
    padding: 0.6rem 0.4rem !important;
    border-radius: 12px !important;
  }

  .stat-item {
    padding: 0.2rem !important;
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .stat-icon {
    width: 28px !important;
    height: 28px !important;
    margin: 0 auto 0.25rem !important;
    border-width: 1px !important;
    box-shadow: none !important;
  }

  .stat-icon svg {
    width: 13px !important;
    height: 13px !important;
  }

  .stat-number {
    font-size: 1.15rem !important;
    margin-bottom: 0.1rem !important;
  }

  .stat-label {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
  }

  /* Forms on Mobile */
  #registration-form > div,
  form > div {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }

  .glass-panel {
    padding: 1.2rem 0.9rem !important;
    border-radius: 12px;
  }

  .form-control {
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
  }

  /* Section Padding & Headers Mobile */
  .section-padding {
    padding: 2.2rem 0;
  }

  .section-title {
    font-size: 1.45rem;
  }

  .section-desc {
    font-size: 0.85rem;
  }

  /* ALL SUBPAGE CARDS & GRIDS STACK ON MOBILE INTO SINGLE COLUMN (1-COLUMN) */
  .programs-grid,
  .contact-grid,
  .gallery-grid,
  .facilities-grid,
  .news-grid,
  .staff-grid,
  .about-split,
  .portals-banner-grid,
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .portals-banner {
    padding: 1.6rem 1rem;
  }

  .about-img-main {
    height: 240px;
  }

  /* Hide header CTA button on mobile to keep navbar clean */
  .nav-actions .btn-gold {
    display: none !important;
  }

  /* Prevent form submit button text overflow on mobile screens */
  form button[type="submit"],
  form .btn-gold,
  form .btn-primary,
  form .btn-outline {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    text-align: center !important;
    box-sizing: border-box !important;
    line-height: 1.4 !important;
    padding: 0.65rem 0.85rem !important;
    font-size: 0.9rem !important;
  }
}

/* Global form button safety for mobile responsiveness */
form button[type="submit"],
form .btn-gold,
form .btn-primary,
form .btn-outline {
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: center;
  box-sizing: border-box;
}



