/* ==========================================================================
   Fat'h Foundation & Academy - Institutional Multi-Page Portal Stylesheet
   Version: 2.0 (Comprehensive Expansion)
   Brand Colors:
   - Primary Navy: #091a34
   - Royal Blue: #005291
   - Emerald Green: #059669
   - Gold Accent: #d97706
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Amiri', serif;
  
  /* Brand Color Palette */
  --brand-navy: #091a34;
  --brand-blue: #005291;
  --brand-blue-light: #0284c7;
  --brand-emerald: #059669;
  --brand-emerald-light: #10b981;
  --brand-emerald-soft: rgba(5, 150, 105, 0.08);
  --brand-gold: #d97706;
  
  /* Neutral Hierarchy */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  
  /* Shadows & Glassmorphism */
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px -15px rgba(0, 82, 145, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.92);
  
  /* Transition timings */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

button, input, textarea, select {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 76px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all var(--transition-smooth);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.98);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 1.25rem;
}

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

.brand-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

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

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.675rem;
  font-weight: 600;
  color: var(--brand-emerald);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding: 0.4rem 0;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-emerald);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 82, 145, 0.22);
}

.btn-primary:hover {
  background: #004275;
  transform: translateY(-2px);
}

.btn-emerald {
  background: var(--brand-emerald);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.22);
}

.btn-emerald:hover {
  background: #047857;
  transform: translateY(-2px);
}

.btn-gold {
  background: var(--brand-gold);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.22);
}

.btn-gold:hover {
  background: #b45309;
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--border-color);
  color: var(--text-dark);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: rgba(0, 82, 145, 0.04);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text-dark);
}

/* ==========================================================================
   Page Banners & Hero Sections
   ========================================================================== */
.page-banner {
  margin-top: 76px;
  padding: 3.5rem 0 3rem 0;
  background: radial-gradient(circle at 80% 20%, rgba(5, 150, 105, 0.08) 0%, transparent 45%),
              radial-gradient(circle at 20% 80%, rgba(0, 82, 145, 0.08) 0%, transparent 50%),
              var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.page-banner-content {
  max-width: 780px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-emerald);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--brand-blue);
}

.page-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.page-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero {
  position: relative;
  margin-top: 76px;
  padding: 4rem 0 4.5rem 0;
  background: radial-gradient(circle at 85% 15%, rgba(5, 150, 105, 0.07) 0%, transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(0, 82, 145, 0.07) 0%, transparent 50%),
              var(--bg-primary);
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-content {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 10;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.25rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 99px;
  font-size: 0.825rem;
  font-weight: 600;
  color: #047857;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--brand-emerald-light);
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--brand-emerald-light);
  border-radius: 50%;
  opacity: 0.6;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.hero-headline {
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.16;
  color: var(--brand-navy);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-headline span.highlight-emerald {
  color: var(--brand-emerald);
}

.hero-headline span.highlight-blue {
  color: var(--brand-blue);
}

.hero-subhead {
  font-size: 1.125rem;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 720px;
  margin: 0 auto 2.25rem auto;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.75rem;
  padding: 2rem 2.25rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  text-align: left;
}

.stat-item {
  border-left: 3px solid var(--brand-emerald);
  padding-left: 1.25rem;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-navy);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ==========================================================================
   Section Framework
   ========================================================================== */
.section {
  padding: 85px 0;
  position: relative;
}

.section-bg-alt {
  background: var(--bg-secondary);
}

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-emerald);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 800;
  color: var(--brand-navy);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Tables (Curriculum, Fee Structure, Academic Calendar)
   ========================================================================== */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-primary);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: var(--bg-tertiary);
  color: var(--brand-navy);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1.1rem 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.custom-table td {
  padding: 1.1rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border-color);
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background: rgba(5, 150, 105, 0.02);
}

/* ==========================================================================
   Testimonials & Impact Cards
   ========================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: var(--bg-primary);
  border-radius: 24px;
  padding: 2.25rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-smooth);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-emerald);
}

.testimonial-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.user-info h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.user-info span {
  font-size: 0.8rem;
  color: var(--brand-emerald);
  font-weight: 600;
}

/* ==========================================================================
   Gallery & Lightbox Modal
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 240px;
  background: var(--bg-tertiary);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 26, 52, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #ffffff;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  font-size: 1rem;
  font-weight: 700;
}

.gallery-cat {
  font-size: 0.75rem;
  color: #6ee7b7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9, 26, 52, 0.92);
  backdrop-filter: blur(12px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-content {
  max-width: 900px;
  max-height: 85vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* ==========================================================================
   Donation Cards & Bank Info
   ========================================================================== */
.donation-card {
  background: #ffffff;
  border: 2px solid #a7f3d0;
  border-radius: 28px;
  padding: 3rem;
  box-shadow: var(--shadow-md);
}

.bank-info-box {
  background: var(--bg-secondary);
  border-radius: 18px;
  padding: 1.75rem;
  border: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

.bank-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.925rem;
}

.bank-row:last-child {
  border-bottom: none;
}

.bank-label {
  color: var(--text-muted);
  font-weight: 500;
}

.bank-val {
  font-weight: 700;
  color: var(--brand-navy);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--brand-navy);
  color: #ffffff;
  padding: 75px 0 35px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3.5rem;
  margin-bottom: 50px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.925rem;
  margin-top: 1.25rem;
  line-height: 1.7;
}

.footer-col h5 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand-emerald-light);
}

.footer-bottom {
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 0.825rem;
}

/* Utilities: Floating Actions & Cookie Consent */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all var(--transition-smooth);
}

.whatsapp-float:hover {
  transform: scale(1.08) rotate(5deg);
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 6.25rem;
  width: 48px;
  height: 48px;
  background: var(--brand-navy);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--brand-emerald);
}

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(9, 26, 52, 0.96);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 1.25rem 2rem;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 -5px 25px rgba(0,0,0,0.2);
}

.cookie-consent p {
  font-size: 0.875rem;
  color: #cbd5e1;
}

/* Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
  .nav-links, .nav-actions .btn-outline {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
  
  .cookie-consent {
    flex-direction: column;
    text-align: center;
  }
  
  .back-to-top {
    right: 5.25rem;
    width: 44px;
    height: 44px;
  }
}
