/* ═══════════════════════════════════════════════════════════
   TAIM DESIGN SYSTEM — Global Styles
   Brand: Taim (taim.om) | Al Sahl Al Mumtani SPC
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Brand Colors */
  --navy: #091C3A;
  --navy-light: #1e293b;
  --navy-mid: #334155;
  --accent-orange: #D96C4E;
  --accent-orange-light: #fb923c;
  --accent-orange-hover: #ea580c;
  
  /* Functional */
  --success: #059669;
  --info: #0891b2;
  --warning: #d97706;
  --danger: #dc2626;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing */
  --max-width: 1200px;
  --section-pad: 5rem 2rem;
  --section-pad-sm: 3rem 1.5rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
  
  /* Borders */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50px;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: inherit; }

/* ─── ANNOUNCEMENT BAR ─── */
.announcement-bar {
  background: var(--accent-orange);
  color: white;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 13px;
  font-weight: 500;
}
.announcement-bar a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
}

/* ─── NAVIGATION ─── */
.site-nav {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.site-nav.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.nav-logo img {
  height: 40px;
  width: auto;
}
.nav-logo-fallback {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-logo-fallback span {
  color: white;
  font-size: 24px;
  font-weight: 700;
}
.nav-logo-fallback::after {
  content: '';
  width: 7px; height: 7px;
  background: var(--accent-orange-light);
  border-radius: 50%;
  position: absolute;
  top: 6px; right: 6px;
}
.nav-brand-text {
  line-height: 1.1;
}
.nav-brand-text h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}
.nav-brand-text p {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Nav Links */
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}
.nav-links > li { position: relative; }
.nav-links > li > a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--navy);
  background: var(--gray-50);
}
.nav-links > li > a.active {
  font-weight: 600;
}

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 100;
}
.nav-links > li:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.nav-dropdown a:hover {
  background: var(--gray-50);
  color: var(--navy);
}

/* Nav CTA */
.nav-cta {
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: white !important;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s;
}
.nav-cta:hover {
  box-shadow: 0 8px 16px rgba(9,28,58,0.3);
  transform: translateY(-1px);
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; color: var(--navy); }
.nav-mobile {
  display: none;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.nav-mobile.open { display: block; }
.nav-mobile a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--gray-100);
}
.nav-mobile a.active { color: var(--navy); font-weight: 600; }
.nav-mobile .nav-cta {
  display: block;
  text-align: center;
  margin-top: 1rem;
  padding: 0.75rem;
  color: white !important;
}

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

/* ─── FOOTER ─── */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 4rem 0 2rem;
}
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand { margin-bottom: 1rem; }
.footer-brand img { height: 36px; margin-bottom: 0.75rem; }
.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--gray-400);
}
.footer-column h4 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-column a {
  display: block;
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.footer-column a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom span, .footer-bottom a {
  font-size: 12px;
  color: var(--gray-500);
}
.footer-bottom a:hover { color: var(--gray-300); }
.footer-policies { display: flex; gap: 1.5rem; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: white;
}
.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(9,28,58,0.3);
  transform: translateY(-1px);
}
.btn-accent {
  background: var(--accent-orange);
  color: white;
}
.btn-accent:hover {
  background: var(--accent-orange-hover);
  box-shadow: 0 8px 20px rgba(217,108,78,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: white;
}
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.15);
}
.btn-white {
  background: white;
  color: var(--navy);
}
.btn-white:hover {
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 15px;
}
.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 13px;
}
.btn-block { width: 100%; justify-content: center; }

/* ─── BADGES ─── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-mol {
  background: rgba(5,150,105,0.12);
  color: var(--success);
}
.badge-category {
  background: var(--gray-100);
  color: var(--text-muted);
}
.badge-inperson {
  background: rgba(124,58,237,0.1);
  color: #7c3aed;
}
.badge-online {
  background: rgba(8,145,178,0.1);
  color: var(--info);
}
.badge-blended {
  background: rgba(217,108,78,0.1);
  color: var(--accent-orange);
}
.badge-upcoming {
  background: rgba(249,115,22,0.1);
  color: #ea580c;
}

/* ─── TRUST BADGE ─── */
.mol-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 1rem;
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.2);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}
.mol-badge::before {
  content: '✓';
  font-weight: 700;
}

/* ─── SECTION HELPERS ─── */
.section { padding: var(--section-pad); }
.section-gray { background: var(--gray-50); }
.section-dark { background: var(--navy); color: white; }
.section-navy { background: linear-gradient(135deg, var(--gray-900), var(--navy)); color: white; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-dark .section-badge {
  background: rgba(255,255,255,0.1);
  color: var(--accent-orange-light);
}
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-dark .section-subtitle { color: var(--gray-300); }

/* ─── CARDS ─── */
.card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s;
}
.card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ─── FORMS ─── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
  background: white;
}
.form-input:focus {
  border-color: var(--navy);
}
textarea.form-input { min-height: 120px; resize: vertical; }
select.form-input { cursor: pointer; }

/* ─── PHILOSOPHY MODAL ─── */
.philosophy-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.philosophy-modal-overlay.active { display: flex; }
.philosophy-modal {
  background: white;
  border-radius: var(--radius-xl);
  padding: 3rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
}
.philosophy-modal h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 1rem;
}
.philosophy-modal p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}
.philosophy-modal .btn { margin: 0.5rem; }

/* ─── UTILITIES ─── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .section { padding: var(--section-pad-sm); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── Course Detail Responsive ─── */
@media (max-width: 768px) {
  .course-grid-layout { grid-template-columns: 1fr !important; }
}

/* ─── Dropdown active state ─── */
.nav-dropdown a.active { color: #091C3A; font-weight: 600; }

/* ─── Course Detail Page ─── */
@media (max-width: 768px) {
  .course-grid-layout { grid-template-columns: 1fr !important; }
  .course-grid-layout > div:last-child { position: static !important; }
}
