/* ============================================
   منصة الفرقان – الصفحات الخارجية
   ألوان اللوحات الداخلية: تركواز + ذهبي
   ============================================ */

:root {
  --primary-color: #008B8B;
  --dark-teal: #006666;
  --light-teal: #20B2AA;
  --gold-color: #D4AF37;
  --gold-dark: #B8941F;
  --text-color: #2C3E50;
  --text-muted: #5a6a7a;
  --white: #ffffff;
  --bg: #f5f7fa;
  --bg-soft: #eef5f5;
  --border: #d9e5e5;
  --danger: #DC3545;
  --shadow: 0 8px 28px rgba(0, 102, 102, 0.1);
  --radius: 16px;
  --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Amiri", "Cairo", serif;
  --container: 1140px;
  --grad-primary: linear-gradient(135deg, #008B8B 0%, #006666 100%);
  --grad-gold: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
  --grad-hero: linear-gradient(145deg, #004d4d 0%, #008B8B 48%, #006666 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-color);
  background: var(--bg);
  line-height: 1.7;
  direction: rtl;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

a:hover {
  color: var(--dark-teal);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Motion */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmerWave {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50px); }
}

.animate-on-scroll {
  animation: fadeUp 0.7s ease both;
}

/* ========== Top bar ========== */
.top-bar {
  background: var(--dark-teal);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
}

.top-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-info {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: inherit;
}

.contact-item:hover {
  color: var(--gold-color);
}

.social-icons {
  display: flex;
  gap: 0.65rem;
}

.social-link {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.social-link:hover {
  background: var(--gold-color);
  color: #fff;
}

/* ========== Navbar ========== */
.navbar {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0, 102, 102, 0.08);
  border-bottom: 1px solid rgba(0, 139, 139, 0.12);
}

.nav-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 72px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--dark-teal);
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.logo-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  color: #fff;
  font-size: 1.2rem;
}

.logo-text {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark-teal);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-inline-start: auto;
}

.nav-links a {
  display: inline-block;
  padding: 0.55rem 0.9rem;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
  background: rgba(0, 139, 139, 0.08);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  right: 20%;
  left: 20%;
  height: 2px;
  background: var(--gold-color);
  border-radius: 2px;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn-login,
.btn-register {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.05rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
}

.btn-login {
  color: var(--primary-color);
  background: rgba(0, 139, 139, 0.1);
}

.btn-login:hover {
  background: rgba(0, 139, 139, 0.18);
  color: var(--dark-teal);
}

.btn-register {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 4px 14px rgba(0, 139, 139, 0.28);
}

.btn-register:hover {
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 139, 139, 0.35);
}

.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  background: rgba(0, 139, 139, 0.1);
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--dark-teal);
  border-radius: 2px;
  transition: 0.25s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile sidebar */
.mobile-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 40, 40, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 1100;
}

.mobile-sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--white);
  z-index: 1200;
  transform: translateX(105%);
  transition: transform 0.35s ease;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
}

.mobile-sidebar.active {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: var(--grad-primary);
  color: #fff;
}

.sidebar-logo-img {
  height: 42px;
  filter: brightness(0) invert(1);
}

.sidebar-logo-text {
  margin: 0;
  font-size: 1rem;
}

.sidebar-close {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
}

.sidebar-nav {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  overflow: auto;
}

.sidebar-links a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: var(--text-color);
  font-weight: 600;
}

.sidebar-links a.active,
.sidebar-links a:hover {
  background: rgba(0, 139, 139, 0.1);
  color: var(--primary-color);
}

.sidebar-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1rem;
}

.sidebar-buttons .btn-login,
.sidebar-buttons .btn-register {
  justify-content: center;
  width: 100%;
}

/* ========== Footer ========== */
.footer {
  background: linear-gradient(160deg, #003d3d 0%, #005555 55%, #004848 100%);
  color: rgba(255, 255, 255, 0.88);
  padding: 3.5rem 0 0;
  margin-top: 3rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-column h3 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: 1.1rem;
  position: relative;
}

.footer-column h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 0.45rem;
  background: var(--gold-color);
  border-radius: 2px;
}

.footer-logo-img {
  height: 56px;
  margin-bottom: 0.85rem;
}

.footer-logo-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-color);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.footer-column p {
  margin: 0 0 1rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.75);
}

.footer-social {
  display: flex;
  gap: 0.55rem;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.footer-social-link:hover {
  background: var(--gold-color);
  color: #fff;
}

.footer-links li,
.footer-contact li {
  margin-bottom: 0.65rem;
}

.footer-links a,
.footer-contact a,
.footer-contact span {
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-links a:hover {
  color: var(--gold-color);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.footer-contact i {
  color: var(--gold-color);
  margin-top: 0.25rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.1rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

/* ========== Shared section bits ========== */
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--dark-teal);
  margin: 0 0 0.5rem;
  font-weight: 800;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 2.25rem;
}

.section-title-alt {
  text-align: center;
  color: var(--dark-teal);
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-line {
  width: 64px;
  height: 3px;
  margin: 0.75rem auto 0;
  background: var(--grad-gold);
  border-radius: 2px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-dark);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.section-desc {
  color: var(--text-muted);
  margin: 0.35rem 0 0;
}

.highlight,
.highlight-gold {
  color: var(--gold-color);
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--grad-gold);
  color: #fff;
  box-shadow: 0 8px 20px rgba(184, 148, 31, 0.3);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* ========== Page Heroes (formal) ========== */
.page-hero,
.hero,
.about-hero,
.courses-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #003d3d 0%, #006666 42%, #008B8B 100%);
  color: #fff;
  text-align: center;
  min-height: clamp(420px, 72vh, 680px);
}

.page-hero--inner {
  min-height: clamp(280px, 42vh, 420px);
}

.page-hero--home {
  text-align: right;
}

.page-hero--home .hero-content {
  text-align: right;
  margin-inline: 0 auto;
}

.hero-background,
.about-hero-bg,
.courses-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(212, 175, 55, 0.28), transparent 32%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.1), transparent 28%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg stroke='%23ffffff' stroke-opacity='0.08' stroke-width='1'%3E%3Cpath d='M30 5 L55 30 L30 55 L5 30 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 60px 60px;
}

.hero-ornament {
  position: absolute;
  width: min(280px, 40vw);
  height: min(280px, 40vw);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 50%;
  opacity: 0.55;
}

.hero-ornament::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.hero-ornament--right {
  top: -80px;
  left: -90px;
  animation: floatSoft 10s ease-in-out infinite;
}

.hero-ornament--left {
  bottom: -100px;
  right: -80px;
  animation: floatSoft 12s ease-in-out infinite reverse;
}

.page-hero .container,
.hero .container,
.about-hero .container,
.courses-hero .container {
  position: relative;
  z-index: 2;
  width: min(100% - 2rem, var(--container));
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(4.5rem, 10vw, 7rem);
}

.hero-content {
  max-width: 760px;
  animation: fadeUp 0.85s ease both;
}

.hero-content--center {
  margin-inline: auto;
  text-align: center;
}

.hero-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 1.15rem;
}

.page-hero--home .hero-kicker {
  justify-content: flex-start;
}

.hero-kicker__line {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-color));
}

.hero-kicker__line:last-child {
  background: linear-gradient(90deg, var(--gold-color), transparent);
}

.hero-kicker__text {
  color: #f0d78c;
  font-size: clamp(0.82rem, 2.2vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hero-title {
  margin: 0;
  line-height: 1.3;
}

.hero-brand {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.2vw, 3.15rem);
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
}

.hero-tagline {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font);
  font-size: clamp(1.15rem, 3vw, 1.65rem);
  font-weight: 700;
  color: var(--gold-color);
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.15rem 0 1.25rem;
}

.page-hero--home .hero-divider {
  justify-content: flex-start;
}

.hero-divider span {
  width: min(72px, 18vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.85), transparent);
}

.hero-divider i {
  color: var(--gold-color);
  font-size: 0.95rem;
  opacity: 0.95;
}

.hero-subtitle,
.about-hero-subtitle,
.courses-hero-subtitle {
  margin: 0 auto 1.75rem;
  max-width: 36rem;
  font-size: clamp(0.98rem, 2.4vw, 1.15rem);
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.page-hero--home .hero-subtitle {
  margin-inline: 0;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-hero--home .hero-buttons {
  justify-content: flex-start;
}

.hero-content--center .hero-buttons {
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  min-height: 48px;
  padding: 0.85rem 1.45rem;
  font-size: 0.95rem;
}

.wave-divider,
.about-hero-divider,
.courses-hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
  z-index: 3;
}

.wave-divider svg,
.hero-waves {
  width: 100%;
  height: clamp(48px, 10vw, 78px);
  display: block;
}

.wave-parallax use:nth-child(1),
.wave-layers use:nth-child(1) {
  animation: shimmerWave 10s linear infinite;
}

.wave-parallax use:nth-child(2),
.wave-layers use:nth-child(2) {
  animation: shimmerWave 14s linear infinite reverse;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Courses search inside hero */
.courses-search {
  margin-top: 0.35rem;
  width: min(100%, 560px);
  margin-inline: auto;
}

.search-form {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 0.4rem;
  backdrop-filter: blur(8px);
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-inline: 0.75rem;
  min-width: 0;
}

.search-input-wrapper i {
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
}

.search-form input,
.search-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  background: transparent;
  color: #fff;
  padding: 0.65rem 0;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}

.search-form input::placeholder,
.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-form button,
.search-btn {
  border: none;
  background: var(--grad-gold);
  color: #fff;
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  min-height: 44px;
}

/* Knowledge */
.knowledge-section {
  padding: 4.5rem 0;
  background:
    radial-gradient(ellipse at top, rgba(0, 139, 139, 0.06), transparent 55%),
    var(--white);
}

.knowledge-content {
  display: grid;
  gap: 1.25rem;
}

.verse-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.verse-card.large-card {
  text-align: center;
  padding: 2.25rem 1.75rem;
  background:
    linear-gradient(180deg, rgba(0, 139, 139, 0.05), transparent 40%),
    var(--white);
}

.card-accent {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--grad-gold);
}

.verse-text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.95;
  color: var(--dark-teal);
  margin-bottom: 0.85rem;
}

.verse-start,
.verse-end {
  color: var(--gold-color);
  font-size: 1.4em;
}

.verse-source {
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.hadith-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

/* Features */
.features-section {
  padding: 4.5rem 0 5rem;
  background:
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.6rem 1.35rem;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 139, 139, 0.25);
}

.feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(0, 139, 139, 0.1);
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin: 0 0 0.55rem;
  color: var(--dark-teal);
  font-size: 1.15rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== About body ========== */
.about-section {
  padding: 3.5rem 0 4rem;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.about-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.header-with-icon {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.about-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad-primary);
  color: #fff;
}

.about-card-title {
  margin: 0;
  color: var(--dark-teal);
}

.about-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-soft);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.badge-logo {
  height: 28px;
  width: auto;
}

.badge-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--dark-teal);
}

.about-card-body {
  color: var(--text-muted);
  line-height: 1.9;
}

.card-decoration {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  left: -30px;
  bottom: -40px;
}

.mission-vision-section {
  margin-bottom: 3rem;
}

.mission-vision-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.mission-card,
.vision-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary-color);
}

.vision-card {
  border-top-color: var(--gold-color);
}

.mv-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mv-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
}

.mission-icon { background: var(--grad-primary); }
.vision-icon { background: var(--grad-gold); }

.mv-title {
  margin: 0;
  color: var(--dark-teal);
}

.mv-card-body p {
  margin: 0;
  color: var(--text-muted);
}

.mv-decorative-line {
  margin-top: 1.1rem;
  height: 3px;
  width: 48px;
  background: var(--border);
  border-radius: 2px;
}

.values-section {
  margin-bottom: 3rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.value-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.value-card-inner {
  padding: 1.4rem 1.2rem 1.6rem;
  position: relative;
}

.value-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--card-color, var(--primary-color)) 16%, white);
  color: var(--card-color, var(--primary-color));
  margin-bottom: 0.85rem;
  font-size: 1.15rem;
}

.value-card h3 {
  margin: 0 0 0.45rem;
  color: var(--dark-teal);
  font-size: 1.05rem;
}

.value-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.value-number {
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-weight: 900;
  font-size: 1.4rem;
  color: rgba(0, 139, 139, 0.12);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--grad-primary);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
  color: #fff;
}

.stat-item {
  text-align: center;
}

.stat-icon {
  font-size: 1.4rem;
  color: var(--gold-color);
  margin-bottom: 0.45rem;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 900;
}

.stat-label {
  opacity: 0.9;
  font-size: 0.92rem;
}

/* ========== Courses ========== */
.courses-section {
  padding: 3rem 0 4rem;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.course-card:hover {
  transform: translateY(-5px);
}

.course-image-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  overflow: hidden;
}

.course-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-level-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 102, 102, 0.92);
  color: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.course-content {
  padding: 1.15rem 1.15rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.course-content h3 {
  margin: 0;
  color: var(--dark-teal);
  font-size: 1.1rem;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.course-footer {
  margin-top: auto;
  padding-top: 0.5rem;
}

.course-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
}

.course-btn:hover {
  color: #fff;
  filter: brightness(1.05);
}

/* ========== Scholars ========== */
.teaching-staff-section {
  padding: 2.5rem 0 4rem;
}

.teaching-staff-header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.teaching-staff-title {
  margin: 0;
  color: var(--dark-teal);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 900;
}

.title-underline {
  width: 72px;
  height: 4px;
  margin: 0.85rem auto 0;
  border-radius: 3px;
  background: var(--grad-gold);
}

.teaching-staff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.teaching-staff-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 102, 102, 0.08);
  border: 1px solid rgba(0, 139, 139, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
  position: relative;
}

.teaching-staff-card::before {
  content: "";
  display: block;
  height: 88px;
  background: linear-gradient(135deg, #006666 0%, #008B8B 55%, #20B2AA 100%);
}

.teaching-staff-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 102, 102, 0.14);
}

.staff-image-wrapper {
  width: 132px;
  height: 132px;
  margin: -66px auto 0;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(145deg, var(--gold-color), #f5e6a8 45%, var(--gold-dark));
  box-shadow: 0 8px 22px rgba(0, 102, 102, 0.18);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.staff-image,
.staff-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #e8f4f4;
  display: block;
}

.staff-content {
  padding: 1.1rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.staff-name-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.staff-title {
  display: inline-block;
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(212, 175, 55, 0.14);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.staff-name {
  margin: 0;
  color: var(--dark-teal);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.45;
  font-family: var(--font-display);
}

.staff-specialization {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(0, 139, 139, 0.07);
  border: 1px solid rgba(0, 139, 139, 0.12);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
}

.staff-specialization i {
  color: var(--gold-dark);
}

.specialization-label {
  color: var(--text-muted);
  font-weight: 600;
}

.specialization-value {
  color: var(--dark-teal);
  font-weight: 800;
}

.staff-section {
  text-align: right;
  margin-top: 0.15rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(0, 139, 139, 0.18);
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.staff-section-title {
  margin: 0 0 0.4rem;
  color: var(--dark-teal);
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.staff-section-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-color);
  flex-shrink: 0;
}

.staff-section-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-scholars {
  text-align: center;
  padding: 3.5rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.no-scholars-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 139, 139, 0.1);
  color: var(--primary-color);
  font-size: 1.8rem;
}

.no-scholars h3 {
  margin: 0 0 0.4rem;
  color: var(--dark-teal);
}

.no-scholars p {
  margin: 0;
  color: var(--text-muted);
}

/* ========== Contact ========== */
.contact-section {
  padding: 2.5rem 0 4rem;
}

.contact-main-title {
  text-align: center;
  margin: 0 0 0.5rem;
  color: var(--dark-teal);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 900;
}

.contact-intro {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.contact-content {
  max-width: 760px;
  margin: 0 auto;
}

.contact-info-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  border: 1px solid var(--border);
}

.contact-panel-title {
  margin: 0 0 1.25rem;
  color: var(--dark-teal);
  font-size: 1.25rem;
}

.contact-info-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-info-item:last-of-type {
  border-bottom: none;
}

.contact-info-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 0.35rem;
}

.contact-info-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-color);
  font-weight: 600;
}

.contact-info-details i {
  color: var(--primary-color);
}

.contact-info-details a {
  color: var(--text-color);
  font-weight: 600;
}

.contact-info-details a:hover {
  color: var(--primary-color);
}

.contact-social {
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.contact-social-icons {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.contact-social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 139, 139, 0.1);
  color: var(--primary-color);
}

.contact-social-link:hover {
  background: var(--grad-primary);
  color: #fff;
}

/* ========== Login ========== */
.login-section {
  padding: 3rem 0 4rem;
  background:
    radial-gradient(ellipse at top, rgba(0, 139, 139, 0.1), transparent 50%),
    var(--bg);
  min-height: 70vh;
}

.login-wrapper {
  max-width: 460px;
  margin: 0 auto;
}

.login-card {
  background: var(--white);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 2rem 1.6rem;
  border: 1px solid var(--border);
  animation: fadeUp 0.6s ease both;
}

.login-title {
  margin: 0 0 0.35rem;
  text-align: center;
  color: var(--dark-teal);
  font-size: 1.6rem;
  font-weight: 900;
}

.login-subtitle {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.login-error {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f5c2c7;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--bg-soft);
  padding: 0.35rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.role-btn {
  border: none;
  background: transparent;
  padding: 0.7rem 0.5rem;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.role-btn.active {
  background: var(--white);
  color: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0, 102, 102, 0.12);
}

.login-form .form-group,
.registration-card .form-group {
  margin-bottom: 1rem;
}

.login-form label,
.registration-card label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--dark-teal);
  font-size: 0.92rem;
}

.login-form .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-form .input-icon {
  position: absolute;
  right: 14px;
  color: var(--primary-color);
  pointer-events: none;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"],
.registration-card input,
.registration-card select,
.registration-card textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fbfcfd;
  border-radius: 12px;
  padding: 0.85rem 2.6rem 0.85rem 2.6rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-color);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus,
.registration-card input:focus,
.registration-card select:focus,
.registration-card textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.15);
}

.login-form .password-toggle {
  position: absolute;
  left: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
}

.login-submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  background: var(--grad-primary);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 8px 20px rgba(0, 139, 139, 0.28);
}

.login-submit-btn:hover {
  filter: brightness(1.05);
}

.login-links {
  text-align: center;
  margin-top: 1.15rem;
  color: var(--text-muted);
}

.register-link {
  color: var(--gold-dark);
  font-weight: 800;
}

/* ========== Register shell ========== */
.registration-container {
  min-height: 100vh;
  padding: 1.5rem 0.75rem 2rem;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.18), transparent 35%),
    linear-gradient(160deg, #eef5f5 0%, #d9ecec 45%, #e8eef5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.registration-wrapper {
  width: min(100%, 820px);
}

.registration-card {
  background: var(--white);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: fadeUp 0.65s ease both;
}

.registration-header {
  background: var(--grad-primary);
  color: #fff;
  padding: 1.5rem 1.35rem;
  text-align: center;
}

.registration-header h1,
.registration-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
}

.registration-header p {
  margin: 0;
  opacity: 0.9;
}

.registration-body {
  padding: 1.5rem 1.25rem 1.75rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.radio-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.radio-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  font-weight: 600;
}

.radio-option:has(input:checked),
.radio-option.active {
  border-color: var(--primary-color);
  background: rgba(0, 139, 139, 0.08);
  color: var(--dark-teal);
}

.phone-input-wrapper {
  display: flex;
  gap: 0.5rem;
}

.country-code-select {
  max-width: 130px;
}

.alert-box {
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.alert-error {
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f5c2c7;
}

.alert-warning {
  background: #fff8e6;
  color: #8a6d1d;
  border: 1px solid #f0e0a2;
}

.alert-info {
  background: #e8f6f6;
  color: var(--dark-teal);
  border: 1px solid #b7e0e0;
}

.success-screen {
  text-align: center;
  padding: 2rem 1rem;
}

.success-screen i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
  .features-grid,
  .courses-grid,
  .teaching-staff-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .page-hero--home .hero-content,
  .page-hero--home .hero-kicker,
  .page-hero--home .hero-divider,
  .page-hero--home .hero-subtitle,
  .page-hero--home .hero-buttons {
    text-align: center;
    justify-content: center;
    margin-inline: auto;
  }

  .page-hero--home {
    text-align: center;
  }
}

@media (max-width: 860px) {
  .nav-links,
  .nav-buttons {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    width: 46px;
    height: 46px;
    order: 0;
    flex-shrink: 0;
    background: rgba(0, 139, 139, 0.1);
    border: 1px solid rgba(0, 139, 139, 0.14);
    justify-self: start;
    grid-column: 1;
  }

  .navbar {
    box-shadow: 0 4px 18px rgba(0, 102, 102, 0.1);
  }

  .nav-content {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    align-items: center;
    gap: 0.5rem;
    min-height: 78px;
    padding-block: 0.35rem;
  }

  .logo {
    margin: 0;
    justify-self: center;
    grid-column: 2;
  }

  .logo-link {
    justify-content: center;
  }

  .logo-img {
    height: 68px;
    max-width: min(220px, 58vw);
    width: auto;
  }

  .logo-icon {
    width: 58px;
    height: 58px;
    font-size: 1.45rem;
  }

  .logo-text {
    font-size: 1.05rem;
    max-width: 46vw;
    line-height: 1.25;
  }

  .nav-content::after {
    content: "";
    width: 46px;
    height: 46px;
    grid-column: 3;
  }

  .top-bar {
    font-size: 0.78rem;
  }

  .teaching-staff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }

  .staff-image-wrapper {
    width: 118px;
    height: 118px;
    margin-top: -59px;
  }

  .teaching-staff-card::before {
    height: 76px;
  }
}

@media (max-width: 720px) {
  .hadith-cards,
  .mission-vision-grid,
  .features-grid,
  .courses-grid,
  .values-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .teaching-staff-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }

  .staff-image-wrapper {
    width: 128px;
    height: 128px;
    margin-top: -64px;
  }

  .staff-name {
    font-size: 1.15rem;
  }

  .staff-content {
    padding: 1rem 1.1rem 1.35rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .page-hero,
  .hero,
  .about-hero,
  .courses-hero {
    min-height: auto;
  }

  .page-hero--inner {
    min-height: auto;
  }

  .page-hero .container,
  .hero .container,
  .about-hero .container,
  .courses-hero .container {
    padding-block: 3.25rem 4.5rem;
  }

  .hero-brand {
    font-size: clamp(1.55rem, 7.2vw, 2.1rem);
    line-height: 1.35;
  }

  .hero-tagline {
    font-size: clamp(1.05rem, 4.5vw, 1.25rem);
  }

  .hero-subtitle,
  .about-hero-subtitle,
  .courses-hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.85;
    margin-bottom: 1.4rem;
    padding-inline: 0.25rem;
  }

  .hero-kicker {
    gap: 0.5rem;
    margin-bottom: 0.95rem;
  }

  .hero-kicker__line {
    width: 22px;
  }

  .hero-kicker__text {
    font-size: 0.8rem;
    white-space: normal;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
  }

  .btn-primary,
  .btn-secondary {
    justify-content: center;
    width: 100%;
  }

  .search-form {
    flex-direction: column;
    gap: 0.45rem;
  }

  .search-btn span {
    display: inline;
  }

  .search-form button,
  .search-btn {
    width: 100%;
    justify-content: center;
  }

  .top-bar .contact-text {
    display: none;
  }

  .knowledge-section,
  .features-section,
  .about-section,
  .courses-section,
  .teaching-staff-section,
  .contact-section {
    padding: 2.5rem 0 3rem;
  }

  .verse-card,
  .feature-card,
  .about-card,
  .contact-info-panel {
    padding: 1.25rem 1.1rem;
  }

  .login-section {
    padding: 2rem 0 2.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .login-card,
  .registration-body {
    padding-inline: 1rem;
  }

  .page-hero .container,
  .hero .container,
  .about-hero .container,
  .courses-hero .container {
    padding-block: 2.75rem 4rem;
  }

  .hero-ornament {
    opacity: 0.28;
  }

  .wave-divider svg,
  .hero-waves {
    height: 42px;
  }

  .nav-content {
    min-height: 84px;
    grid-template-columns: 44px 1fr 44px;
  }

  .nav-content::after {
    width: 44px;
    height: 44px;
  }

  .mobile-menu-toggle {
    width: 44px;
    height: 44px;
  }

  .logo-img {
    height: 74px;
    max-width: min(240px, 62vw);
  }

  .logo-icon {
    width: 64px;
    height: 64px;
    font-size: 1.55rem;
  }

  .contact-info-details {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .teaching-staff-card::before {
    height: 70px;
  }

  .staff-image-wrapper {
    width: 120px;
    height: 120px;
    margin-top: -60px;
  }
}

@media (max-width: 360px) {
  .hero-brand {
    font-size: 1.4rem;
  }

  .hero-kicker__text {
    font-size: 0.74rem;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
  }
}
