/* =========================
   🌐 Font Import
========================= */
@font-face {
  font-family: 'JameelNooriNastaleeq';
  src: url('/assets/fonts/JameelNooriNastaleeq.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
  /* Fast rendering */
}

.roboto-sm,
.roboto-md,
.roboto-lg {
  font-family: 'Roboto', sans-serif !important;
  direction: ltr !important; /* English text direction */
}

.roboto-sm {
  font-size: 0.8rem; /* 14px */
}

.roboto-md {
  font-size: 1rem; /* 16px */
}

.roboto-lg {
  font-size: 1.25rem; /* 20px */
}



/* =========================
   🔄 Global Reset & Layout
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'JameelNooriNastaleeq', serif;
  font-size: 1.5rem;
  line-height: 1.8;
  background-color: var(--background-light);
  color: var(--body-text);
  direction: rtl;
}
.content-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}
a {
  color: var(--notice-background);
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

/* =========================
   🌿 Global CSS Variables
========================= */
:root {
  /* === Colors === */
  /* Brand / Logo */
  --brand-green: #1c5a2b;
  /* Primary Buttons / Navbar */
  --primary-green: #2e8b57;
  --primary-green-hover: #1f6e3d;
  /* Secondary Buttons (Info) */
  --info-blue: #1976D2;
  --info-blue-hover: #1565c0;
  /* Backgrounds */
  --background-light: #f2f4f7;
  --notice-background: #e6f4ec;
  /* Text Colors */
  --heading-text: #1B3C73;
  --body-text: #212121;
  --muted-text: #666666;
  /* Alerts */
  --success-color: #4CAF50;
  --error-color: #D32F2F;
  /* Input Validation */
  --valid-input: #388E3C;
  --invalid-input: #C62828;
  /* Error Alert */
  --alert-error-bg: #ffe8e8;
  --alert-error-border: #ffb3b3;
  --alert-error-text: #b30000;
  /* Success Alert */
  --alert-success-bg: #e8ffe8;
  --alert-success-border: #b3ffb3;
  --alert-success-text: #006600;
  /* White */
  --white: #ffffff;
  /* Footer Hover */
  --footer-hover-green: #a8e6a3;
  /* Box Shadow */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  
  /* === Typography (Desktop) === */
  --heading-h1: 2.5rem;      /* 40px → Sabse bada title */
  --heading-h2: 2.125rem;    /* 34px → Section headings */
  --heading-h3: 1.875rem;    /* 30px → Sub-section headings */
  --heading-h4: 1.625rem;    /* 26px → Chhoti headings */
  --heading-h5: 1.375rem;    /* 22px → Form aur content ke andar headings */
  --heading-h6: 1.25rem;     /* 20px → Sabse chhoti heading */

  /* === Typography (Mobile) === */
  --heading-h1-mobile: 2rem;     /* 32px */
  --heading-h2-mobile: 1.75rem;  /* 28px */
  --heading-h3-mobile: 1.625rem; /* 26px */
  --heading-h4-mobile: 1.5rem;   /* 24px */
  --heading-h5-mobile: 1.375rem; /* 22px */
  --heading-h6-mobile: 1.25rem;  /* 20px */
}
/* =========================
   🧾 Global Heading Styles
========================= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'JameelNooriNastaleeq', serif;
  font-weight: normal;
  line-height: 1.6;
  margin: 0.5rem 0 0.5rem 0;
  color: var(--heading-text);
  text-align: center;
}
/* Font sizes from variables */
h1 {
  font-size: var(--heading-h1);
}
h2 {
  font-size: var(--heading-h2);
}
h3 {
  font-size: var(--heading-h3);
}
h4 {
  font-size: var(--heading-h4);
}
h5 {
  font-size: var(--heading-h5);
}
h6 {
  font-size: var(--heading-h6);
}
/* =========================
   📱 Responsive Typography
========================= */
@media (max-width: 768px) {
  h1 {
    font-size: var(--heading-h1-mobile);
  }
  h2 {
    font-size: var(--heading-h2-mobile);
  }
  h3 {
    font-size: var(--heading-h3-mobile);
  }
  h4 {
    font-size: var(--heading-h4-mobile);
  }
  h5 {
    font-size: var(--heading-h5-mobile);
  }
  h6 {
    font-size: var(--heading-h6-mobile);
  }
}
/* ====================================================
   🖥️ Desktop Logo
==================================================== */
.desktop-logo {
  text-align: center;
  margin: 15px 0;
}
.desktop-logo a img {
  max-height: 90px;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}
.desktop-logo a:hover img {
  transform: scale(1.05);
  filter: brightness(1.15);
}

/* ====================================================
   🌐 Shared Navbar Styles (All Screens)
==================================================== */
.navbar {
  background: var(--primary-green) url(/assets/images/khanqah_pattern.svg) repeat center;
  background-blend-mode: luminosity;
  transition: all 0.3s ease;
  z-index: 1000;
}
/* Desktop color by default, mobile color via media query */
.navbar a {
  color: var(--heading-text);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  padding: 8px 12px;
}
.navbar a:hover {
  background: var(--white);
  color: var(--primary-green-hover);
}
.navbar a svg,
.navbar a i {
  font-size: 22px;
  vertical-align: middle;
}
/* ====================================================
   ⬇️ Dropdown Menu Styles (Shared)
==================================================== */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-content {
  display: none;
  position: absolute;
  background: var(--white);
  min-width: 220px;
  box-shadow: var(--shadow);
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 0 0 6px 6px;
  z-index: 1004;
}
.dropdown-content a {
  display: block;
  padding: 10px 15px;
  font-size: 18px;
  color: var(--heading-text-desktop);
  border-bottom: 1px solid #eee;
  background: var(--white);
}
.dropdown-content a:hover {
  background-color: var(--primary-green);
  color: var(--white);
  border-radius: 0!important;
}
/* Desktop: Show dropdown on hover */
@media (min-width: 1024px) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
}
.dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  /* Gap from dropdown */
  z-index: 1;
}
/* ====================================================
   🎨 Universal SVG Icon Styles (Navbar, Mobile, Dropdown)
==================================================== */
.icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  vertical-align: middle;
  transition: fill 0.3s ease, transform 0.3s ease;
}
.menu-toggle {
  transition: color 0.3s ease;
}
.navbar a:hover .icon,
.dropdown > a:hover .icon {
  fill: var(--primary-green-hover);
  transform: scale(1.1);
}

.menu-toggle:hover .icon {
  fill: var(--alert-success-border); /* ✅ Change this to desired hover color */
  transform: scale(1.1);
}

.navbar a.active .icon {
  fill: var(--primary-green);
}
.menu-toggle.open .icon {
  transform: rotate(90deg);
}
.dropdown > a::after {
  transition: transform 0.3s ease, color 0.3s ease;
}
.dropdown.open > a::after {
  transform: rotate(180deg);
  color: var(--heading-text);
}
/* ====================================================
   🖥️ Desktop Navbar Styles (≥ 767px)
==================================================== */
@media (min-width: 769px) {
  .navbar {
    display: flex;
    justify-content: center;
    padding: 8px 0;
    flex-wrap: wrap;
    gap: 10px;
    border-radius: 0 !important;
    position: sticky;
    top: 0;
    text-align: center;
  }
  /* Hide mobile-only elements on desktop */
  .mobile-topbar, .menu-toggle, .mobile-overlay {
    display: none!important;
  }
  /* Navbar links use desktop color */
  .navbar a {
    color: var(--white);
  }
  .dropdown-content a {
    color: var(--heading-text);
  }
  .navbar a:hover {
    color: var(--primary-green-hover);
  }
  .dropdown.open > a::after {
    color: var(--heading-text);
  }
  .navbar a:hover .icon, .dropdown > a:hover .icon, .menu-toggle:hover .icon {
    fill: var(--primary-green-hover);
  }
}
/* ====================================================
   📱 Mobile Navbar Styles (≤ 767px)
==================================================== */
@media (max-width: 768px) {
  /* 🔹 Mobile Topbar */
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: var(--primary-green) url(/assets/images/khanqah_pattern.svg) repeat center;
    background-blend-mode: luminosity;
    padding: 22px;
    position: sticky;
    top: 0;
    z-index: 1002;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
  }
  .mobile-topbar-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 42px;
    max-width: 80%;
    object-fit: contain;
    z-index: 2;
    display: inline-block!important;
  }
  /* 🔹 Hamburger Menu Icon */
  .menu-toggle {
    display: block;
    margin-left: auto;
    font-size: 24px;
    color: var(--white);
    cursor: pointer;
    z-index: 3;
    background: none;
    border: none;
    user-select: none;
  }
  /* 🔹 Hide Desktop Logo */
  .desktop-logo {
    display: none!important;
  }
  /* 🔹 Mobile Navbar */
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    left: 0;
    width: 100%;
    height: 0;
    overflow-y: hidden;
    background: var(--notice-background);
    transition: height 0.35s ease;
    z-index: 1003;
  }
  .navbar.show {
    height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .navbar a {
    justify-content: flex-start;
    width: 100%;
    padding: 12px 20px;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--footer-hover-green);
    border-radius: 0 !important;
    margin: 0;
    color: var(--heading-text);
  }
  .navbar a:last-child {
    border-bottom: none;
  }
  .dropdown {
    width: 100%;
  }
  .dropdown > a {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--heading-text);
  }
  .dropdown .dropdown-content {
    position: relative!important;
    width: 90%!important;
    max-width: 500px;
    margin: 10px auto;
    background-color: rgba(255, 255, 255, 0.95);
    display: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    left: auto!important;
    transform: none!important;
  }
  .dropdown .dropdown-content a {
    padding: 12px 20px;
    font-size: 1.2rem;
    color: var(--heading-text);
    border-bottom: 1px solid #ddd;
  }
  .dropdown-content a:hover {
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 0!important;
  }
  .dropdown.open .dropdown-content {
    display: block;
  }
}
/* ====================================================
   📱 Bottom Navigation Bar (Mobile only)
==================================================== */
#bottomNav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--white);
  padding: 0.5rem 0 0;
  border-top: 1px solid #ddd;
  direction: rtl;
}
@media (min-width: 769px) {
  #bottomNav {
    display: none!important;
  }
}
@media (max-width: 768px) {
  body {
    padding-bottom: 65px;
  }
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  color: var(--heading-text);
  font-size: 0.85rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0.1rem 0 0.4rem;
  position: relative;
  transition: color 0.3s ease;
}
.bottom-nav a i {
  font-size: 1.3rem;
}
.bottom-nav a:hover {
  color: var(--alert-success-text);
}
.bottom-nav span {
  font-size: 1rem;
}
.bottom-nav a.active {
  color: var(--primary-green);
  font-weight: 600;
}
.bottom-nav a.active::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 10%;
  right: 10%;
  height: 4px;
  background-color: var(--primary-green);
  border-radius: 0 0 9999px 9999px;
  z-index: 1;
}
/* Additional styles for active links */
.navbar a.active {
  background: var(--white);
  color: var(--primary-green);
}

/* =========================
    Global Smooth Scroll
========================= */
html {
  scroll-behavior: smooth;
}
/* =========================
   Utility Classes
========================= */
.right-align {
  text-align: right;
  margin: 20px 0 15px;
}
/* =========================
   Footer Optimized
========================= */
footer {
  position: relative;
  background: var(--heading-text) url(/assets/images/khanqah_pattern.svg) center repeat;
  background-blend-mode: overlay;
  color: var(--white);
  padding-top: 30px;
  font-family: 'Roboto', Arial, sans-serif;
  direction: ltr;
}
/* Main container */
.footer-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto 8px;
  justify-content: center;
  gap: 1.5rem;
  line-height: 1.6;
  text-align: left;
}
.footer-container > *:not(.footer-logo) {
  border-left: 1px solid var(--footer-hover-green);
  padding-inline-start: 2rem;
}
/* Headings */
footer h2,
footer h3,
footer h4 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: bold;
  color: var(--white);
  text-align: left;
}
/* Links & contact */
.footer-links,
.footer-contact {
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}
.footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}
.footer-links a:hover {
  color: var(--footer-hover-green);
}
/* Social section */
.footer-social a {
  display: inline-block;
  margin: 0 2px;
  transition: transform .2s ease, color .2s ease;
}
.footer-social img {
  width: 28px;
  height: 28px;
  transition: transform .2s ease;
}
.footer-social a:hover,
.footer-social a:hover img {
  color: var(--footer-hover-green);
}
/* Social icons (main row) */
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 15px 0 0;
}
.social-icons img {
  width: 20px;
  height: 20px;
  transition: filter .3s ease, transform .3s ease;
}
.social-icons a:hover img {
  filter: brightness(0) saturate(100%) invert(72%) sepia(14%) saturate(747%) hue-rotate(71deg) brightness(95%) contrast(92%);
  transform: scale(1.2);
  /* thoda zoom effect */
}
/* Footer bottom */
.footer-bottom {
  text-align: center;
  padding: 15px 10px;
  font-size: 14px;
  background: var(--white);
  color: var(--heading-text);
}
.footer-bottom strong {
  color: #1c5a2b;
}
.footer-bottom a {
  color: inherit;
  text-decoration: none;
}
/* Reset list */
footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Logo */
.footer-logo {
  text-align: left;
  margin: 20px 0;
}
.footer-logo img {
  max-height: 90px;
  cursor: pointer;
  transition: transform .3s ease, filter .3s ease;
}
.footer-logo a:hover img {
  transform: scale(1.05);
  filter: brightness(1.2);
}
/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .footer-container > *:not(.footer-logo) {
    border: 0;
    border-top: 1px solid var(--footer-hover-green);
    padding: 1rem;
    width: 100%;
  }
  .footer-logo {
    text-align: center;
    width: 100%;
  }
}
/* OneSignal */
footer .onesignal-customlink-container {
  height: auto!important;
  min-height: auto!important;
  padding: 0!important;
  margin: 0 0 20px!important;
  max-width: 250px;
  overflow: visible;
  font-weight: 500;
}
footer .onesignal-customlink-container button {
  background: var(--primary-green)!important;
  color: var(--white)!important;
  border: none;
  padding: 10px 16px;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}
footer .onesignal-customlink-container button:hover {
  background: var(--white)!important;
  color: var(--primary-green)!important;
}
/* Contact icons */
.footer-contact .icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  display: inline-block;
  color: var(--white);
  transition: color .3s ease, transform .3s ease;
}
.footer-contact svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}
.footer-contact p:hover .icon {
  color: var(--footer-hover-green);
  transform: scale(1.1);
}

/* =========================
   Base Button Styles
========================= */
.btn {
  background: var(--heading-text);
  color: var(--white);
  padding: 0.55rem 2.55rem;
  border: none;
  font-size: 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: sans-serif;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem auto;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
  flex-shrink: 1;
  min-width: 140px;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
}

/* Hover State */
.btn:hover {
  background: var(--primary-green-hover);
  color: var(--white);
}

/* =========================
   Button Variants
========================= */

/* Primary Buttons */
.btn-submit,
.btn-send,
.btn-print {
  background: var(--primary-green);
  color: var(--white);
}
.btn-submit:hover,
.btn-send:hover,
.btn-print:hover {
  background: var(--primary-green-hover);
}

/* Secondary Buttons */
.btn-search,
.btn-download {
  background: var(--info-blue);
  color: var(--white);
}
.btn-search:hover,
.btn-download:hover {
  background: var(--info-blue-hover);
}

/* Destructive / Close Buttons */
.btn-close,
.btn-back {
  background: var(--error-color);
  color: var(--white);
}
.btn-close:hover,
.btn-back:hover {
  background: var(--invalid-input);
}

/* Read More */
.btn-readmore {
  background: transparent;
  color: var(--primary-green);
  padding: 0;
  border: none;
  font-size: 1rem;
  font-family: sans-serif;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
  direction: rtl;
  text-align: right;
  float: left;
  clear: both;
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}
.btn-readmore:hover {
  color: var(--primary-green-hover);
  text-decoration: underline;
}

/* =========================
   Button Icons (::after)
========================= */
.btn::after {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

/* Icons */
.btn-back::after {
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z'/></svg>");
}
.btn-submit::after {
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2a10 10 0 100 20 10 10 0 000-20zm-1 15l-5-5 1.41-1.41L11 14.17l6.59-6.59L19 9l-8 8z'/></svg>");
}
.btn-print::after {
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M19 8h-1V3H6v5H5c-1.1 0-2 .9-2 2v7h4v4h10v-4h4v-7c0-1.1-.9-2-2-2zm-5 9h-4v-5h4v5zm5-7H6V5h12v5z'/></svg>");
}
.btn-download::after {
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 16l-6-6h4V4h4v6h4l-6 6zm-8 2h16v2H4v-2z'/></svg>");
}
.btn-search::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
}
.btn-close::after {
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M18.3 5.71L12 12l6.3 6.29-1.42 1.42L12 13.41l-6.29 6.3-1.42-1.42L10.59 12 4.29 5.71 5.71 4.29 12 10.59l6.29-6.3z'/></svg>");
}
.btn-send::after {
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M22 3L1 12l21 9v-7l-15-2l15-2V3z'/></svg>");
}
.btn-readmore::after {
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='%23666666' viewBox='0 0 24 24'><circle cx='5' cy='12' r='2'/><circle cx='12' cy='12' r='2'/><circle cx='19' cy='12' r='2'/></svg>");
}

/* =========================
   Button Container
========================= */
.button-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin: 1rem auto;
}

/* =========================
   Responsive Fixes
========================= */
@media (max-width: 768px) {
  .btn {
    font-size: 0.95rem;
    padding: 0.45rem 1.25rem;
    gap: 0.4rem;
  }

  /* No column direction, keep buttons side-by-side */
  .button-container {
    gap: 0.75rem;
  }
}
