/* ================= FORCE JAMEEL NOORI NASTALEEQ (MOBILE & DESKTOP) ================= */
@font-face {
  font-family: 'Jameel Noori Nastaleeq';
  src: url('https://cdn.jsdelivr.net/npm/jameel-noori/fonts/jameel-noori-nastaleeq4.woff2') format('woff2'),
       url('https://unpkg.com/jameel-noori/fonts/jameel-noori-nastaleeq4.woff2') format('woff2'),
       url('https://jamiatunnoor.com/fonts/Jameel%20Noori%20Nastaleeq.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Jameel Noori Nastaleeq Kasheeda';
  src: url('https://cdn.jsdelivr.net/gh/rohit267/jameel-noori-nastaleeq-cdn@latest/JameelNooriNastaleeqKasheeda.woff2') format('woff2'),
       url('https://jamiatunnoor.com/fonts/Jameel%20Noori%20Nastaleeq%20Kasheeda.ttf') format('truetype');
	/*url('https://cdn.jsdelivr.net/gh/urdufonts/urdu-fonts/Jameel%20Noori%20Nastaleeq%20Kasheeda.ttf') format('truetype');    */
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ================= GLOBAL RESETS & STYLING ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

html, body, div, p, h1, h2, h3, h4, h5, h6, a, span, button, input, marquee, li {
  font-family: 'Jameel Noori Nastaleeq', 'Jameel Noori Nastaleeq Kasheeda', 'JameelNooriNastaleeq', serif !important;
}

body {
  /* line-height: 2.7;  */
  font-size: 25px;
  direction: rtl;
  text-align: right;
  background-color: #f7f9f8;
  color: #2b2b2b;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ================= TOP HEADER ================= */
.top-bar {
  background-color: #0b3c26;
  color: #f1f1f1;
  font-size: 1.0rem;
  padding: 6px 0;
}

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

.top-info span {
  margin-left: 18px;
}

.top-links a {
  color: #e2c076;
  margin-left: 15px;
  font-size: 1.35rem;
  text-decoration: none;
  transition: color 0.4s ease;
}

.top-links a:hover {
  color: #ffffff;
//font-size: 1.45rem;

  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-color: white;
  text-decoration-thickness: 2px;
 
  
}

/* ================= BRANDING HEADER ================= */
.branding-header {
  background: #ffffff;
  padding: 0px 10px;
  //border-bottom: 2px solid #e2c076;
}

.branding-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.site-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 2.2rem;
  color: #0b3c26;
  font-weight: normal;
  margin-bottom: -10px;
}

.logo-text p {
  font-size: 1.1rem;
  color: #666;
}

.hadith-banner {
  font-size: 1.4rem;
  color: #0b3c26;
}

/* ================= NAVIGATION & SLOW DROPDOWN ================= */
.navbar {
  background-color: #125436;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  display: block;
  padding: 8px 18px;
  color: #ffffff;
  text-decoration: none;
  font-size: 2.0 rem;
  transition: background 0.4s ease, color 0.4s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background-color:  #0b3c26;
  color: #e2c076;
  //text-decoration-line: underline;
  //text-decoration-style: dashed;
  //text-decoration-color: white;
  //text-decoration-thickness: 2px;
}

.dropdown-icon {
  font-size: 1.0rem;  //changed
  margin-right: 6px;
  transition: transform 0.8s ease;
}

.dropdown:hover .dropdown-icon {
  transform: rotate(540deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color:  #ffffff;
  min-width: 240px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  list-style: none;
  border-top: 3px solid #e2c076;
  
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), 
              visibility 0.5s;
}

.dropdown-menu li a {
  color: #333333;
  padding: 8px 18px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.4s ease;
}

.dropdown-menu li a:hover {
  background-color: lightgreen; // #f7f9f8;
  color: #0b3c26;
  padding-right: 45px;
	transition: all 0.6s ease;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  padding: 10px;
  cursor: pointer;
}

/* ================= HERO SLIDER ================= */
.hero-section {
  position: relative;
  overflow: hidden;
  height: 440px;
  background-color: #000;
}

.slider-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active {
  opacity: 1;
}

.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
}

.slide-caption {
  position: absolute;
  bottom: 40px;
  right: 8%;
  color: #ffffff;
  max-width: 650px;
}

.slide-caption h2 {
  font-size: 2.3rem;
  color: #e2c076;
  margin-bottom: 5px;
  font-weight: normal;
}

.btn-primary {
  display: inline-block;
  background-color: #e2c076;
  color: #0b3c26;
  padding: 4px 22px;
  text-decoration: none;
  font-size: 1.15rem;
  border-radius: 4px;
  margin-top: 10px;
  transition: background 0.4s ease, color 0.4s ease;
}

.btn-primary:hover {
  background-color: #ffffff;
  color: #000;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.4s ease;
}

.slider-btn:hover {
  background: #e2c076;
  color: #0b3c26;
}

.prev-btn { right: 20px; }
.next-btn { left: 20px; }

/* ================= MARQUEE ================= */
.marquee-bar {
  background-color: #e8edea;
  border-bottom: 1px solid #d4ded8;
  padding: 4px 0;
}

.marquee-content {
  display: flex;
  align-items: center;
}

.marquee-tag {
  background-color: #0b3c26;
  color: #fff;
  padding: 0 12px;
  border-radius: 3px;
  font-size: 1.5rem;
  margin-left: 10px;
  white-space: nowrap;
}

/* ================= MAIN CONTENT GRID ================= */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 45px 0;
}

.card {
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0,0,0,0.05);
  border-top: 3px solid #0b3c26;
  display: flex;
  flex-direction: column;
}

.card-header {
  background-color: #f7f9f8;
  padding: 8px 20px;
  border-bottom: 1px solid #eee;
}

.card-header h3 {
  font-size: 1.6rem;
  color: #0b3c26;
  font-weight: normal;
}

.card-body {
  padding: 20px 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.btn-group {
  margin-top: 15px;
  display: flex;
  gap: 12px;
}

.btn-action {
  flex: 1;
  text-align: right;
  background-color: #0b3c26;
  color: #ffffff;
  text-decoration: none;
  padding: 4px 4px;
  border-radius: 8px;
  font-size: 1.5rem;
  transition: all 0.4s ease;
}

.btn-action.outline {
  background-color: transparent;
  color: #0b3c26;
  border: 1px solid #0b3c26;
}

.btn-action:hover {
  background-color: #e2c076;
  color: #0b3c26;
  border-color: #e2c076;
}

/* ================= SLOW SCROLL ANIMATIONS ================= */
.animate-on-scroll {
  opacity: 0;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.slide-from-right {
  transform: translateX(80px);
}

.slide-from-left {
  transform: translateX(-80px);
}

.fade-in {
  transform: translateY(35px);
}

.animate-on-scroll.appear {
  opacity: 1;
  transform: translate(0, 0);
}

/* ================= FLOATING BACK TO TOP BUTTON ================= */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px; /* Placed bottom-left so it doesn't collide with RTL scrollbars */
  width: 50px;
  height: 50px;
  background-color: #0b3c26;
  color: #e2c076;
  border: 2px solid #e2c076;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  
  /* Hidden by default with smooth slide & fade transitions */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              visibility 0.4s,
              background-color 0.3s ease,
              color 0.3s ease,
              box-shadow 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background-color: #e2c076;
  color: #0b3c26;
  transform: translateY(-5px) scale(1.08);
  box-shadow: 0 8px 20px rgba(226, 192, 118, 0.4);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

/* Tooltip on Hover */
.back-to-top .tooltip-text {
  visibility: hidden;
  width: 75px;
  background-color: #0b3c26;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 2px 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  font-size: 0.85rem;
  border: 1px solid #e2c076;
  transition: opacity 0.3s;
  pointer-events: none;
}

.back-to-top:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ================= FOOTER ================= */
.footer {
  background-color: #08281a;
  color: #d1dcd6;
  padding: 45px 0 0 0;
}

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

.footer-col h4 {
  color: #e2c076;
  font-size: 1.5rem;
  margin-bottom: 10px;
  border-bottom: 1px solid #144931;
  padding-bottom: 4px;
  font-weight: normal;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li a {
  color: #c1d1ca;
  text-decoration: none;
  transition: color 0.4s ease;
}

.footer-col ul li a:hover {
  color: #e2c076;
}

.footer-bottom {
  text-align: center;
  background-color: #051a11;
  padding: 12px;
  font-size: 1.05rem;
  border-top: 1px solid #0b3c26;
}

/* ================= MOBILE VIEW OPTIMIZATIONS ================= */
@media (max-width: 768px) {
  html, body {
    font-size: 18px;
    line-height: 2.8;
  }

  .top-bar-content,
  .branding-container {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: 10px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: #0b3c26;
  }

  .dropdown-menu li a {
    color: #fff;
    padding-right: 35px;
  }

  .hero-section {
    height: 320px;
  }

  .slide-caption {
    right: 5%;
    left: 5%;
    bottom: 25px;
  }

  .slide-caption h2 {
    font-size: 1.7rem;
    line-height: 1.9;
  }

  .slide-from-right {
    transform: translateX(40px);
  }
  .slide-from-left {
    transform: translateX(-40px);
  }

  .back-to-top {
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  
  .back-to-top .tooltip-text {
    display: none; /* Hide hover tooltip on touch devices */
  }

}
/* 1. Flex Container */
.welcome-container {
  display: flex;                  /* Activates Flexbox layout */
  justify-content: center;       /* Centers the image horizontally */
  align-items: center;           /* Centers the image vertically */
  width: 100%;                   /* Spans the full width of the screen */
  //min-height: 100vh;             /* Spans the full height of the viewport */
  background-color: #f0f2f5;     /* Optional background color */
  padding: 0px;                 /* Prevents image from touching screen edges */
  box-sizing: border-box;        /* Includes padding in the total width/height */
}

/* 2. Responsive Image */
.welcome-image {
  max-width: 100%;               /* Prevents image from overflowing small screens */
  //max-height: 80vh;              /* Prevents image from overflowing tall screens vertically */
  width: 600px;                  /* Your target size on desktop screens */
  height: auto;                  /* Maintains original aspect ratio automatically */
  object-fit: contain;           /* Ensures crisp rendering within bounds */
  border-radius: 12px;           /* Optional aesthetic styling */
  box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Optional aesthetic styling */
}
/* 1. Flex Container */
.welcome-container2 {
  display: flex;                  /* Activates Flexbox */
  justify-content: center;       /* Center aligns the image horizontally */
  align-items: center;           /* Center aligns the image vertically */
  width: calc(100vw - 20px);                   /* Takes up the full width of the screen */
  //min-height: 100vh;             /* Takes up the full viewport height */
  box-sizing: border-box;        /* Standard box sizing rule */
}

/* 2. Responsive Image spanning screen minus margins */
.welcome-image2 {
  width: calc(100vw - 20px);     /* 100% viewport width minus 10px left and 10px right */
  height: auto;                  /* Height adjusts automatically to preserve aspect ratio */
  display: block;                /* Removes unwanted default inline spacing at the bottom */
}
