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

:root {
  --primary: #0052FF;
  --primary-hover: #0040CC;
  --bg-dark: #0F172A;
  --bg-darker: #0B1120;
  --bg-footer: #020617;
  --card-dark: #1E293B;
  --text-dark: #0F172A;
  --text-light: #64748B;
  --text-white: #FFFFFF;
  --text-gray-light: #94A3B8;
  --border-light: #E2E8F0;
  --border-dark: #334155;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: #FAFAFA;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.3;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-light);
  font-size: 1rem;
}

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

.section {
  padding: 6rem 0;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  font-family: 'Tajawal', sans-serif;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-outline {
  background-color: transparent;
  color: white;
  border: 1px solid white;
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Header */
header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 0;
  background: transparent;
  color: white;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 1.1rem;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Hero */
.hero {
  min-height: 600px;
  background: url('assets/hero-bg.jpg') center/cover no-repeat;
  background-color: #1a1a1a;
  background-blend-mode: overlay;
  display: flex;
  align-items: center;
  position: relative;
  color: white;
}

.hero::before {
  content: '';
  position: absolute;
  top:0; left:0; right:0; bottom:0;
  background: linear-gradient(to left, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-right: 0; /* RTL alignment */
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Stats */
.stats-section {
  padding: 4rem 0;
  background: white;
  border-bottom: 1px solid var(--border-light);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-weight: 600;
  color: var(--text-dark);
}

/* Strategy */
.strategy-section {
  background: white;
  text-align: center;
}

.strategy-cards {
  margin-top: 3rem;
  gap: 2rem;
}

.strategy-card {
  background: #FAFAFA;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.3s;
}

.strategy-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.strategy-card h3 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* Features */
.features-section {
  background-color: var(--bg-darker);
  color: white;
}

.features-section h2 { color: white; }
.features-section p { color: var(--text-gray-light); }

.feature-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: border-color 0.3s;
}

.feature-card:hover {
  border-color: var(--primary);
}

.feature-card h3 { color: white; }
.feature-card p { color: var(--text-gray-light); font-size: 0.875rem; }

/* About Section */
.about-section {
  background: white;
}

.about-image-wrapper {
  position: relative;
  border-radius: 16px;
}

.about-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
}

.badge-float {
  position: absolute;
  top: -20px;
  left: 20px;
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.1rem;
}

.check-list {
  margin-top: 2rem;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.check-icon {
  color: var(--primary);
}

/* Programs */
.programs-section {
  background-color: var(--bg-darker);
  color: white;
  text-align: center;
}

.programs-section h2 { color: white; margin-bottom: 3rem; }

.program-card {
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  overflow: hidden;
  text-align: right;
  display: flex;
  flex-direction: column;
}

.program-img-wrapper {
  height: 200px;
  position: relative;
}

.program-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.tag-red { background: #EF4444; }
.tag-green { background: #10B981; }
.tag-blue { background: var(--primary); }

.program-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.program-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-gray-light);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.program-body h3 {
  color: white;
  font-size: 1.25rem;
}

.program-body p {
  color: var(--text-gray-light);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Culture & News */
.culture-news-section {
  background: white;
}

.section-title-side {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.title-bar {
  width: 4px;
  height: 24px;
  background-color: var(--primary);
}

.news-item {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.news-date {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.culture-main-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 300px;
  margin-bottom: 1.5rem;
}

.culture-main-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.culture-main-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
}

/* Partners */
.partners-section {
  padding: 2rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.partners-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.partners-row img {
  height: 40px;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all 0.3s;
}

.partners-row img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* Contact */
.contact-section {
  background-color: var(--bg-darker);
  color: white;
}

.contact-section h2 { color: white; }

.form-input {
  width: 100%;
  padding: 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  color: white;
  font-family: inherit;
  margin-bottom: 1rem;
}

.form-input::placeholder {
  color: var(--text-gray-light);
}

/* FAQ */
.faq-section {
  background: white;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem 0;
}

.faq-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
}

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
}

.faq-item.active .faq-icon {
  background: var(--text-dark);
  color: white;
}

/* Footer */
footer {
  background-color: var(--bg-footer);
  color: var(--text-gray-light);
  padding: 4rem 0 2rem;
  position: relative;
}

.footer-logo {
  color: white;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1.5rem;
}

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

.footer-links a:hover {
  color: white;
}

.whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
}

/* Utilities */
.text-primary { color: var(--primary); }
.mt-4 { margin-top: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* -------------------------------------------
   Interactive Animations & Transitions 
------------------------------------------- */

/* Pre-animation states for scroll reveals */
.pre-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.pre-animate.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Add stagger delays for grids */
.grid .pre-animate:nth-child(1) { transition-delay: 0.1s; }
.grid .pre-animate:nth-child(2) { transition-delay: 0.2s; }
.grid .pre-animate:nth-child(3) { transition-delay: 0.3s; }
.grid .pre-animate:nth-child(4) { transition-delay: 0.4s; }

/* Elegant hover glow for primary buttons */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.3s;
}

.btn-primary:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* Card image zoom effect on hover */
.program-card .program-img-wrapper,
.about-image-wrapper {
  overflow: hidden;
}

.program-card:hover .program-img,
.about-image-wrapper:hover .about-image {
  transform: scale(1.05);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.program-img, .about-image {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating animation for badge */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.badge-float {
  animation: float 4s ease-in-out infinite;
}

/* -------------------------------------------
   Responsive Design / Media Queries 
------------------------------------------- */

/* Tablets and below (max-width: 992px) */
@media (max-width: 992px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .stats-section .container { gap: 2rem; }
  
  .about-section .grid-cols-2,
  .culture-news-section .grid-cols-2,
  .contact-section .grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .culture-main-card { height: 250px; }
  
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }
  
  .hero { min-height: 500px; }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  .grid-cols-3,
  .grid-cols-2,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
  
  header .nav-links {
    display: none; /* simple mobile hide for now, could add a burger menu later */
  }
  
  .flex.gap-4 {
    flex-direction: column;
    width: 100%;
  }
  
  .btn { width: 100%; text-align: center; justify-content: center; }
  
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  
  .section { padding: 4rem 0; }
  .partners-row { gap: 2rem; }
  
  /* Admin responsive */
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    box-shadow: none;
    border-bottom: 1px solid #334155;
    z-index: 10;
  }
  .sidebar h2 { padding: 10px; }
  .sidebar a { padding: 10px 15px; display: inline-block; width: 48%; border-bottom: none; box-sizing: border-box; }
  
  .main-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 15px;
  }
  .app-grid, .grid-3, .grid-2 {
    grid-template-columns: 1fr !important;
  }
  .header { flex-direction: column; gap: 10px; text-align: center; }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero { min-height: 450px; padding-top: 80px; }
  .stat-number { font-size: 2.5rem; }
  .about-image { height: 300px; }
  .badge-float { font-size: 0.9rem; padding: 0.5rem 1rem; }
  .sidebar a { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); }
}
