/* ==========================================================================
   Albalagh Panel — Public Site Styles (site.css)
   Pakistani Social Media Friendly Urdu & Islamic Design
   ========================================================================== */

@font-face {
  font-family: 'MeherNastaliq';
  src: url('/fonts/meher.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-urdu: 'MeherNastaliq', 'Noto Nastaliq Urdu', 'Gulzar', 'Jameel Noori Nastaleeq', system-ui, sans-serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Green / Emerald Theme (Default) */
  --primary: #047857;
  --primary-dark: #064e3b;
  --primary-light: #ecfdf5;
  --accent: #d97706;
  --accent-light: #fef3c7;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="teal"] {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #f0fdfa;
  --accent: #f59e0b;
}

[data-theme="blue"] {
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-light: #eff6ff;
  --accent: #d97706;
}

[data-theme="brown"] {
  --primary: #78350f;
  --primary-dark: #451a03;
  --primary-light: #fef3c7;
  --accent: #047857;
}

[data-theme="gold"] {
  --primary: #b45309;
  --primary-dark: #78350f;
  --primary-light: #fffbeb;
  --accent: #059669;
}

[data-theme="dark-islamic"] {
  --primary: #065f46;
  --primary-dark: #022c22;
  --primary-light: #064e3b;
  --accent: #10b981;
}

[data-theme="maroon"] {
  --primary: #831843;
  --primary-dark: #500724;
  --primary-light: #fdf2f8;
  --accent: #d97706;
}

/* Dark Mode Overrides */
[data-mode="dark"] {
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --bg-main: #111827;
  --bg-card: #1f2937;
  --border-color: #374151;
  --primary-light: #064e3b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
}

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

body {
  font-family: var(--font-urdu);
  direction: rtl;
  text-align: right;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.8;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Top Bar */
.site-header {
  background: var(--bg-card);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.top-bar {
  background: var(--primary-dark);
  color: #ffffff;
  font-size: 13px;
  padding: 6px 0;
  font-family: var(--font-urdu);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo img {
  height: 48px;
  width: auto;
}

.brand-text h1 {
  font-size: 26px;
  font-weight: bold;
  color: var(--primary);
  margin: 0;
  line-height: 1.2;
}

.brand-text span {
  font-size: 13px;
  color: var(--text-muted);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  border-radius: 8px;
  transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}

.admin-login-link {
  background-color: var(--primary);
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-login-link:hover {
  background-color: var(--primary-dark);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 42px;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
  font-size: 20px;
  opacity: 0.95;
  margin-bottom: 28px;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff !important;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #ffffff !important;
  border: 2px solid #ffffff;
}

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

/* Section Common */
.section {
  padding: 60px 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: #000;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card:hover .card-image {
  transform: scale(1.04);
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-main);
  line-height: 1.4;
}

.card-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

/* Compact Audio Player (Bayanat) */
.audio-player-box {
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 10px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.play-pause-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
}

.play-pause-btn:hover {
  background: var(--primary-dark);
}

.player-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.player-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  width: 0%;
}

.player-time {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  direction: ltr;
}

/* YouTube Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16/9;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 10;
  font-size: 18px;
}

/* Welfare Projects */
.progress-bar-wrap {
  margin: 12px 0;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.progress-track {
  height: 10px;
  background: var(--border-color);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
  transition: width 0.5s ease;
}

/* Contact & Forms */
.contact-form {
  background: var(--bg-card);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: inherit;
  font-size: 16px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: #ffffff;
  padding: 60px 0 20px 0;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 20px;
  margin-bottom: 18px;
  color: var(--accent);
}

.footer-col p {
  color: #d1d5db;
  font-size: 15px;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #e5e7eb;
}

.footer-links a:hover {
  color: var(--accent);
  padding-right: 6px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-card);
    border-bottom: 2px solid var(--primary);
    padding: 16px;
    box-shadow: var(--shadow-lg);
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 30px;
  }
  
  .section-title {
    font-size: 26px;
  }
}

/* ==========================================================================
   Speakers & Scholars (مقررین و اساتذہ) Styles
   ========================================================================== */
.speaker-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.speaker-avatar-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 16px;
  border: 3px solid var(--primary);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.speaker-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.speaker-avatar-fallback {
  font-size: 48px;
  color: var(--primary);
}

.speaker-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.speaker-title-badge {
  display: inline-block;
  padding: 3px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.speaker-bio-snippet {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.speaker-profile-hero {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  padding: 36px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
}

.speaker-hero-layout {
  display: flex;
  flex-direction: column;
  md-flex-direction: row;
  align-items: center;
  gap: 30px;
}

@media (min-width: 768px) {
  .speaker-hero-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

.speaker-hero-avatar-wrap {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary);
  background: var(--primary-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.speaker-hero-info {
  flex: 1;
}

.speaker-hero-name {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.speaker-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.speaker-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: all 0.2s ease;
}

.speaker-social-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.speaker-bio-full {
  font-size: 16px;
  line-height: 2;
  color: var(--text-main);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
