@import url("https://fonts.googleapis.com/css2?family=New+Rocker&display=swap");
:root {
  --primary: #0d5a2e;
  --secondary: #ffca1e;
  --light: #f8f9fa;
  --dark: #1a1a1a;
  --accent: #2e7d32;
  --transition: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --gray-600: #666;
  --gray-700: #555;
  --gray-500: #888;
  --success: #4caf50;
  --warning: #ff9800;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: "Open Sans", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.6;
}

.hero-subtitle {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 30px;
  animation: slideUp 1.2s ease;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  background: transparent;
}

.navbar.scrolled {
  padding: 10px 5%;
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.logo {
  display: flex;
  align-items: center;
  z-index: 9999;
}

.logo-img {
  height: 60px;
  margin-right: 10px;
  transition: transform 0.3s ease;
  border-radius: 9px;
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

.logo-text {
  font-family: "New Rocker", system-ui;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  transition: color 0.3s ease;
}

.logo-text .big {
  color: var(--secondary);
  text-shadow: 0 0 5px #000000;
  font-size: 2.5rem;
}

.navbar.scrolled .logo-text {
  color: var(--primary) !important;
}

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

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 600;
  position: relative;
  padding: 8px 0;
  transition: color 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar.scrolled .nav-links a {
  color: var(--dark) !important;
}

.nav-links a:hover {
  color: var(--secondary) !important;
}

.nav-links a.active {
  color: var(--secondary) !important;
}

.nav-links a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--secondary);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: 100%;
}

.nav-icon {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.nav-links a:hover .nav-icon {
  transform: translateY(-2px);
}

.nav-links a.nav-link-pressed {
  animation: navTabPulse 0.42s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes navTabPulse {
  0% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-2px) scale(1.07);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

.sign-in-btn {
  padding: 10px 25px;
  border-radius: 30px;
  transition: all 0.3s ease;
}

.sign-in-btn:hover {
  transform: translateY(-2px);
  color: var(--dark);
  border-color: var(--secondary);
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
  transition: color 0.3s ease;
  z-index: 1000;
}

.navbar.scrolled .hamburger {
  color: var(--dark) !important;
}

/* Enhanced Page Transitions */
.page-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  perspective: 1200px;
}

.page-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  will-change: transform, opacity, filter;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 0, 0) scale(0.98);
  filter: blur(0);
}

.page-section.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  position: relative;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

.page-container.is-navigating .page-section {
  pointer-events: none;
}

.page-section.nav-enter,
.page-section.nav-exit {
  visibility: visible;
  pointer-events: none;
}

.page-section.nav-enter.nav-forward {
  animation: pageEnterForward 0.64s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.page-section.nav-exit.nav-forward {
  animation: pageExitForward 0.64s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.page-section.nav-enter.nav-backward {
  animation: pageEnterBackward 0.64s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.page-section.nav-exit.nav-backward {
  animation: pageExitBackward 0.64s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes pageEnterForward {
  0% {
    opacity: 0;
    transform: translate3d(90px, 0, 0) scale(0.96) rotateY(-6deg);
    filter: blur(4px) saturate(0.85);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateY(0);
    filter: blur(0) saturate(1);
  }
}

@keyframes pageExitForward {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateY(0);
    filter: blur(0) saturate(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-90px, 0, 0) scale(0.96) rotateY(6deg);
    filter: blur(4px) saturate(0.85);
  }
}

@keyframes pageEnterBackward {
  0% {
    opacity: 0;
    transform: translate3d(-90px, 0, 0) scale(0.96) rotateY(6deg);
    filter: blur(4px) saturate(0.85);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateY(0);
    filter: blur(0) saturate(1);
  }
}

@keyframes pageExitBackward {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1) rotateY(0);
    filter: blur(0) saturate(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(90px, 0, 0) scale(0.96) rotateY(-6deg);
    filter: blur(4px) saturate(0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-links a.nav-link-pressed,
  .page-section.nav-enter.nav-forward,
  .page-section.nav-exit.nav-forward,
  .page-section.nav-enter.nav-backward,
  .page-section.nav-exit.nav-backward {
    animation: none !important;
  }
}

/* Home Hero (Full Height) */
.home-hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("assets/bg.jpg") no-repeat center center/cover;
  color: white;
  position: relative;
  overflow: hidden;
}

/* Shared Page Hero (70% Height) */
.shared-page-hero {
  height: 75vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 3% 5% 0 5%;
  background:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("assets/bg.jpg") no-repeat center center/cover;
  color: white;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
}

.shared-page-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 10px;
  font-family: "Amiri", serif;
  transition: all 0.5s ease;
}

.shared-page-hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 30px;
  transition: all 0.5s ease;
}

/* Enhanced Quran Verse Styling */
.home-quran-verse {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 30px;
  backdrop-filter: blur(100px);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: fadeIn 2s ease;
  position: relative;
  z-index: 10;
}

.arabic {
  font-family: "Amiri", serif;
  font-size: 2.2rem;
  margin-bottom: 10px;
  line-height: 1.8;
}

.translation {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 15px;
}

.reference {
  font-weight: bolder;
  font-size: 1.3rem;
  opacity: 0.8;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-family: "Amiri", serif;
  animation: slideUp 1s ease;
}

.hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 30px;
  animation: slideUp 1.2s ease;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  cursor: pointer;
}

.scroll-down i {
  font-size: 2rem;
  color: white;
}

/* Content Containers */
.content-container {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
  min-height: 100vh;
}

.home-content {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
}

/* History Section */
.history-section {
  padding: 100px 5% 50px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  font-family: "Amiri", serif;
  font-size: 2.5rem;
  color: var(--primary);
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--secondary);
}

.history-item {
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.history-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.history-text {
  flex: 1;
  padding: 30px;
}

.history-image {
  flex: 1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s ease;
}

.history-image:hover {
  transform: scale(1.03);
}

.history-image img {
  width: 100%;
  height: auto;
  display: block;
}

.history-item:nth-child(even) {
  flex-direction: row-reverse;
}

.history-item h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--primary);
  font-family: "Amiri", serif;
}

.history-item p {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

/* Read More Section */
.read-more-section {
  padding: 80px 5%;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  margin: 10px auto 40px auto;
  max-width: 1200px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.read-more-content h3 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--primary);
  font-family: "Amiri", serif;
}

.read-more-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #555;
}

.read-more-btn {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(13, 90, 46, 0.3);
  position: relative;
  overflow: hidden;
}

.read-more-btn--compact {
  margin-top: 15px;
  font-size: 0.9rem;
  padding: 12px 28px;
}

.read-more-btn--spaced {
  margin-top: 15px;
}

.read-more-btn:hover {
  background: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(13, 90, 46, 0.4);
}

.read-more-btn:active {
  transform: translateY(0);
}

.read-more-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.read-more-btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

/* Content Section */
.content-section {
  padding: 80px 5%;
  max-width: 1500px;
  margin: 0 auto;
}

.placeholder-content {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.placeholder-content i {
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.placeholder-content h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--primary);
  font-family: "Amiri", serif;
}

.placeholder-content p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: #555;
}

/* Mobile Menu Footer */
.mobile-menu-footer {
  display: none;
  text-align: center;
  padding: 20px 0;
  margin-top: 20px;
  border-top: 2px solid var(--secondary);
  position: relative;
}

.nepali-muslims-text {
  font-family: "Amiri", serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

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

.scroll-to-top:hover {
  background: var(--secondary);
  transform: translateY(-5px);
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 60px 5% 30px;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  flex: 1;
  min-width: 250px;
  margin-bottom: 30px;
  padding: 0 15px;
}

.footer-column h4 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--secondary);
  font-family: "Amiri", serif;
}

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

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

.footer-column ul li a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--secondary);
}

.social-links {
  display: flex;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  margin-right: 18px;
  transition: all 0.3s ease;
}

.social-links .social-link.facebook {
  color: #1877f2;
}

.social-links .social-link.twitter {
  color: #1da1f2;
}

.social-links .social-link.instagram {
  color: #e1306c;
}

.social-links .social-link.youtube {
  color: #ff0000;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-5px);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #aaa;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
  .quran-hero-content {
    flex-direction: column;
    gap: 30px;
  }
  .quran-column {
    width: 90%;
    max-width: 600px;
  }
}

@media (max-width: 992px) {
  .history-item,
  .history-item:nth-child(even) {
    flex-direction: column;
  }
  .history-text,
  .history-image {
    width: 100%;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
  .shared-page-hero h1 {
    font-size: 2.8rem;
  }
  .arabic {
    font-size: 1.8rem;
  }
  .quran-column {
    min-height: 350px;
  }
  .verse-text {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 15px 20px;
  }
  .logo-text {
    font-size: 1.4rem;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 90px;
    padding-bottom: 50px;
    transition: right 0.5s ease;
    z-index: 999;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  }
  .nav-links.active {
    right: 0;
  }
  .nav-links li {
    margin: 20px 0px 0px 0px;
    width: 75%;
    text-align: center;
  }
  .nav-links a {
    color: var(--dark);
    font-size: 1.2rem;
    display: block;
    padding: 15px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    justify-content: center;
    background: rgba(13, 90, 46, 0.05);
  }
  .nav-links a:hover {
    background: rgba(13, 90, 46, 0.1);
    transform: translateX(5px);
  }
  .hamburger {
    display: block;
  }
  .navbar.mobile-active {
    background: white;
  }
  .navbar.mobile-active .logo-text {
    color: var(--primary);
  }
  .navbar.mobile-active .hamburger {
    color: var(--dark);
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .shared-page-hero h1 {
    font-size: 2.2rem;
  }
  /* Fixed Quran verse positioning on mobile */
  .home-quran-verse {
    padding: 20px;
    margin-top: 80px;
    margin-bottom: 20px;
    max-width: 90%;
  }
  .arabic {
    font-size: 1.5rem;
  }
  .translation {
    font-size: 1rem;
  }
  .shared-page-hero p {
    font-size: 1rem;
  }
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  .read-more-content h3 {
    font-size: 1.8rem;
  }
  .read-more-content p {
    font-size: 1rem;
  }
  .mobile-menu-footer {
    display: block;
    position: absolute;
    bottom: 3rem;
    width: 100%;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  /* Quran Hero Mobile */
  .quran-hero {
    height: auto;
    padding: 100px 5% 60px;
  }
  .quran-column {
    padding: 25px;
    min-height: 300px;
  }
  .verse-text {
    font-size: 1.4rem;
  }
  .verse-translation {
    font-size: 1rem;
  }
  /* Ensure home hero has enough top padding */
  .home-hero {
    padding-top: 80px;
  }
}

@media (max-width: 576px) {
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero h1 {
    font-size: 1.8rem;
  }
  .shared-page-hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .shared-page-hero p {
    font-size: 1rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .history-item h3 {
    font-size: 1.5rem;
  }
  .nepali-muslims-text {
    font-size: 1.7rem;
  }
  /* Further mobile adjustments for Quran verse */
  .home-quran-verse {
    padding: 15px;
    margin-top: 70px;
  }
  .arabic {
    font-size: 1.3rem;
  }
  .translation,
  .reference {
    font-size: 0.9rem;
  }
  /* Quran Hero Small Mobile */
  .quran-column {
    padding: 20px;
    min-height: 250px;
  }
  .quran-column h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  .verse-text {
    font-size: 1.2rem;
  }
  .verse-translation {
    font-size: 0.9rem;
  }
}

.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 400px;
  position: relative;
  animation: modalSlideIn 0.3s ease;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
  transition: color 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  line-height: 1;
}

.close-modal:hover {
  color: var(--primary);
  background-color: rgba(13, 90, 46, 0.1);
}

.is-hidden {
  display: none;
}

.ask-us-modal .close-modal {
  background: rgba(255, 255, 255, 0.8);
}

.ask-us-modal .close-modal:hover {
  background-color: rgba(13, 90, 46, 0.15);
}

.modal-title {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary);
  font-family: "Amiri", serif;
  font-size: 2rem;
}

.admin-form {
  display: flex;
  flex-direction: column;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.admin-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.admin-btn:active {
  transform: translateY(0);
}

.message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  font-weight: 600;
}

.message.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.message.success {
  background: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.clarifications-container {
  max-width: 1200px;
  margin: 0 auto;
  transition: min-height 0.25s ease;
}

.clarifications-container p {
  text-align: center;
}

.clarifications-container.clarifications-loading {
  position: relative;
}

.clarification-loading-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.clarification-loading-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.clarification-loading-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(13, 90, 46, 0.1);
  color: var(--primary);
  border: 1px solid rgba(13, 90, 46, 0.2);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.clarification-loading-hint {
  color: #5c6f63;
  font-size: 0.9rem;
}

.clarification-skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.clarification-skeleton-card {
  background: white;
  border: 1px solid rgba(13, 90, 46, 0.14);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clarification-skeleton-line,
.book-skeleton-cover,
.book-skeleton-line,
.book-skeleton-button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    rgba(13, 90, 46, 0.08) 0%,
    rgba(13, 90, 46, 0.14) 50%,
    rgba(13, 90, 46, 0.08) 100%
  );
}

.clarification-skeleton-line::after,
.book-skeleton-cover::after,
.book-skeleton-line::after,
.book-skeleton-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  animation: shimmer 1.6s linear infinite;
}

.clarification-skeleton-line {
  height: 13px;
  border-radius: 999px;
  width: 100%;
}

.clarification-skeleton-line--title {
  width: 72%;
  height: 17px;
}

.clarification-skeleton-line--medium {
  width: 84%;
}

@media (max-width: 768px) {
  .clarification-loading-hint {
    font-size: 0.82rem;
  }

  .clarification-skeleton-card {
    padding: 0.9rem 1rem;
  }
}

.allegation-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary);
}

.allegation-header {
  margin-bottom: 1.5rem;
}

.allegation-title {
  font-family: "Amiri", serif;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.allegation-description {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
}

.clarification-item {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e9ecef;
}

.clarification-title {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 1rem;
  font-weight: 600;
}

.clarification-content {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.clarification-evidence {
  background: var(--light);
  padding: 1rem;
  border-radius: 5px;
  border-left: 3px solid var(--secondary);
  font-style: italic;
  margin-top: 1rem;
}

.evidence-label {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.no-clarifications {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.no-clarifications i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ddd;
}

.allegation-card {
  background: white;
  border-radius: 15px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-left: 5px solid var(--primary);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.allegation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.allegation-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.allegation-title {
  font-family: "Amiri", serif;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.allegation-misconception {
  background: #fff3f3;
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid #dc3545;
  margin-bottom: 2rem;
}

.misconception-label {
  font-weight: 700;
  color: #dc3545;
  margin-bottom: 0.5rem;
  display: block;
  font-size: 1.1rem;
}

.clarification-content {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.clarification-label {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
  font-size: 1.2rem;
}

.evidence-section {
  background: var(--light);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--secondary);
}

.evidence-label {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  display: block;
}

.evidence-text {
  font-style: italic;
  color: #555;
  line-height: 1.6;
}

.no-clarifications {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.no-clarifications i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: #ddd;
}

.no-clarifications h3 {
  font-family: "Amiri", serif;
  color: var(--primary);
  margin-bottom: 1rem;
}

.clarification-error-detail {
  font-size: 0.9rem;
  margin-top: 10px;
  color: #666;
}

@media (max-width: 768px) {
  .allegation-card {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  .allegation-title {
    font-size: 1.5rem;
  }
  .allegation-misconception,
  .clarification-content {
    padding: 1rem;
  }
}

.search-container {
  position: relative;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  z-index: 2;
}

.search-input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 5px 15px rgba(13, 90, 46, 0.1);
}

.allegation-accordion {
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfc 100%);
  border-radius: 16px;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 22px rgba(7, 41, 23, 0.09);
  border: 1px solid #dceee3;
  overflow: hidden;
  transition: all 0.3s ease;
}

.allegation-accordion:hover {
  box-shadow: 0 12px 32px rgba(7, 41, 23, 0.15);
  transform: translateY(-2px);
}

.allegation-accordion.active {
  box-shadow: 0 14px 38px rgba(7, 41, 23, 0.18);
}

.accordion-header {
  padding: clamp(1rem, 2.4vw, 1.5rem) clamp(1rem, 3vw, 2rem);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e8f4ec 100%);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.allegation-accordion.active .accordion-header {
  background: linear-gradient(
    135deg,
    var(--primary) 40%,
    var(--secondary) 100%
  );
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.accordion-title {
  font-family: "Amiri", serif;
  font-size: clamp(1.15rem, 1.03rem + 0.65vw, 1.6rem);
  line-height: 1.45;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  flex: 1;
  transition: color 0.3s ease;
}

.allegation-accordion.active .accordion-title {
  color: white;
}

.accordion-icon {
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.25rem);
  color: var(--primary);
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.accordion-check-icon {
  color: var(--primary);
}

.allegation-accordion.active .accordion-icon {
  color: white;
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  background: white;
}

.allegation-accordion.active .accordion-content {
  max-height: 1000px;
}

.accordion-body {
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.accordion-body .clarification-content {
  padding: clamp(1.2rem, 3vw, 2rem) 0;
  border-bottom: 1px solid #f0f0f0;
}

.accordion-body .clarification-text {
  font-size: clamp(1rem, 0.94rem + 0.4vw, 1.18rem);
  line-height: 1.9;
  color: #444;
  margin-bottom: 1.5rem;
}

.reference-section {
  background: #f8f9fa;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  border-radius: 10px;
  border-left: 4px solid var(--secondary);
  margin-top: clamp(1rem, 2vw, 1.5rem);
}

.reference-label {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
  font-size: clamp(0.96rem, 0.9rem + 0.25vw, 1.08rem);
}

.reference-text {
  color: #555;
  font-style: italic;
  line-height: 1.7;
  font-size: clamp(0.98rem, 0.92rem + 0.25vw, 1.08rem);
}

.accordion-footer {
  padding: 1rem 0 1.4rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: #516058;
  font-size: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
}

.accordion-footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: #f3f9f5;
  border: 1px solid #dceee3;
  color: var(--primary);
  font-weight: 600;
}

.no-clarifications {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.no-clarifications i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: #ddd;
}

.no-clarifications h3 {
  font-family: "Amiri", serif;
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: #666;
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #ccc;
}

/* Animation for accordion */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.allegation-accordion.active .accordion-content {
  animation: slideDown 0.3s ease;
}

@media (max-width: 768px) {
  .accordion-header {
    padding: 1rem 1.1rem;
  }
  .accordion-body {
    padding: 0 1.1rem;
  }
  .accordion-body .clarification-content {
    padding: 1.5rem 0;
  }
  .accordion-body .clarification-text {
    line-height: 1.8;
  }
  .accordion-footer {
    justify-content: flex-start;
    padding: 1rem 0 1.25rem;
  }
}

/* Enhanced Login Modal Styles */
.login-modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 10px 40px;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 450px;
  height: min(640px, calc(100vh - 80px));
  position: relative;
  animation: modalSlideIn 0.4s ease;
  border: 1px solid #e8f4ec;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.login-modal-content,
.ask-us-modal-content {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) rgba(13, 90, 46, 0.12);
}

.login-modal-content::-webkit-scrollbar,
.ask-us-modal-content::-webkit-scrollbar {
  width: 10px;
}

.login-modal-content::-webkit-scrollbar-track,
.ask-us-modal-content::-webkit-scrollbar-track {
  background: rgba(13, 90, 46, 0.12);
  border-radius: 999px;
  margin: 8px 0;
}

.login-modal-content::-webkit-scrollbar-thumb,
.ask-us-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--primary));
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px rgba(13, 90, 46, 0.15);
}

.login-modal-content::-webkit-scrollbar-thumb:hover,
.ask-us-modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  margin-top: 20px;
}

.login-logo-img {
  height: 60px;
  margin-right: 15px;
  border-radius: 10px;
}

.login-logo-text {
  font-family: "New Rocker", system-ui;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.login-logo-text .big {
  font-size: 2.5rem;
  color: var(--secondary);
  text-shadow: 0 0 5px #000000;
}

.login-title {
  font-family: "Amiri", serif;
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.login-subtitle {
  color: #666;
  font-size: 1rem;
}

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

.login-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
}

.icon-inline {
  margin-right: 5px;
}

.icon-inline-lg {
  margin-right: 8px;
}

.password-input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.login-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.85rem;
}

.label-spaced {
  margin-top: 15px;
  display: block;
}

.btn-margin-top {
  margin-top: 10px;
}

.login-input {
  width: 100%;
  padding: 15px 45px 15px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fafafa;
}

.login-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(13, 90, 46, 0.1);
}

.password-toggle {
  position: absolute;
  right: 15px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.password-toggle:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.password-toggle:focus {
  outline: none;
}

.login-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 5px 15px rgba(13, 90, 46, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 90, 46, 0.4);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-footer {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.login-footer p {
  color: #666;
  font-size: 0.9rem;
}

.security-notice {
  background: #e8f5e8;
  padding: 12px;
  border-radius: 8px;
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.security-notice i {
  margin-right: 5px;
}

.search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.clarifications-search-container {
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

.refresh-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(13, 90, 46, 0.3);
  position: relative;
}

.refresh-btn--compact {
  margin-top: 1rem;
  width: auto;
}

.refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 90, 46, 0.4);
}

.refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.refresh-btn .fa-spin {
  animation: fa-spin 1s infinite linear;
}

.refresh-btn-container {
  position: relative;
  display: inline-block;
}

.cooldown-timer {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.refresh-btn.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Message animations */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.quran-tabs-container {
  max-width: 1400px;
  margin: 0 auto;
}

.tabs-header {
  display: flex;
  background: white;
  border-radius: 15px;
  padding: 10px;
  margin-bottom: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8f4ec;
}

.tab-btn {
  flex: 1;
  padding: 1.2rem 2rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 15px rgba(13, 90, 46, 0.3);
  color: white;
}

.tab-btn:hover:not(.active) {
  background: rgba(13, 90, 46, 0.05);
  color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.selection-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.input-group label {
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group input {
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  width: 40%;
  height: 2rem;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 90, 46, 0.1);
}

.load-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 90, 46, 0.4);
}

.load-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* NEW: Continuous Quran Display */
.quran-continuous-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(13, 90, 46, 0.1);
  overflow: hidden;
  margin-bottom: 2rem;
}

.quran-continuous-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.quran-continuous-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><text x="50%" y="50%" font-family="Amiri" font-size="30" text-anchor="middle" fill="white">ٱقْرَأْ</text></svg>');
  background-size: 200px;
  background-repeat: no-repeat;
  background-position: center;
}

.quran-continuous-header h3 {
  margin: 0;
  font-family: "Amiri", serif;
  font-size: 1.8rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.chapter-title-arabic {
  display: block;
  font-size: 2rem;
  opacity: 0.9;
}

.verse-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.quran-continuous-content {
  padding: 2rem;
  max-height: 70vh;
  overflow-y: auto;
  background: #fefefe;
}

.continuous-verse {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  position: relative;
}

.continuous-verse:hover {
  background: rgba(13, 90, 46, 0.03);
}

.continuous-verse.active {
  background: rgba(13, 90, 46, 0.08);
  border-color: var(--primary);
}

.arabic-line {
  font-family: "Amiri", serif;
  font-size: 2.2rem;
  text-align: right;
  direction: rtl;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  padding: 0.5rem 0;
  position: relative;
}

.translation-line {
  font-size: 1.1rem;
  color: #555;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(13, 90, 46, 0.1);
  line-height: 1.6;
  position: relative;
}

.verse-number {
  background: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  margin-left: 0.5rem;
  vertical-align: super;
  box-shadow: 0 2px 5px rgba(13, 90, 46, 0.3);
}

/* Special styling for Bismillah */
.bismillah-verse {
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(13, 90, 46, 0.05),
    rgba(46, 125, 50, 0.08)
  );
  border: 2px solid rgba(13, 90, 46, 0.1);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.bismillah-verse::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.05"><text x="50%" y="50%" font-family="Amiri" font-size="40" text-anchor="middle" fill="%230d5a2e">بِسْمِ</text></svg>');
  background-size: 150px;
  background-repeat: no-repeat;
  background-position: center;
}

.bismillah-verse .arabic-line {
  font-size: 2.8rem;
  text-align: center;
  color: var(--primary);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.bismillah-verse .translation-line {
  background: transparent;
  border-top: none;
  text-align: center;
  font-size: 1.2rem;
  color: var(--accent);
  position: relative;
  z-index: 1;
}

/* Enhanced Chapter Navigation */
.quran-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: rgba(13, 90, 46, 0.05);
  border-top: 1px solid rgba(13, 90, 46, 0.1);
  flex-shrink: 0;
  position: relative;
}

.chapter-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: 2px solid var(--primary);
  background: white;
  color: var(--primary);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(13, 90, 46, 0.15);
  position: relative;
  overflow: hidden;
}

.chapter-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(13, 90, 46, 0.1),
    transparent
  );
  transition: all 0.6s ease;
}

.chapter-nav:hover::before {
  left: 100%;
}

.chapter-nav:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(13, 90, 46, 0.3);
}

.chapter-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.chapter-nav:disabled:hover {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(13, 90, 46, 0.15);
}

/* Progress Indicator */
.reading-progress {
  width: 100%;
  height: 4px;
  background: rgba(13, 90, 46, 0.1);
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  transition: width 0.3s ease;
  position: relative;
  width: 0%;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
  .quran-continuous-container {
    border-radius: 15px;
  }
  .quran-continuous-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .quran-continuous-header h3 {
    font-size: 1.4rem;
  }
  .quran-continuous-content {
    padding: 1rem;
    max-height: 60vh;
  }
  .continuous-verse {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
  }
  .arabic-line {
    font-size: 1.8rem;
  }
  .translation-line {
    font-size: 1rem;
  }
  .verse-number {
    width: 25px;
    height: 25px;
    font-size: 0.7rem;
  }
  .bismillah-verse .arabic-line {
    font-size: 2.2rem;
  }
  .quran-navigation {
    gap: 1rem;
    padding: 1rem;
  }
  .chapter-nav {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.25rem;
  }
  .chapter-nav span {
    display: none;
  }
}

@media (max-width: 480px) {
  .arabic-line {
    font-size: 1.6rem;
  }
  .verse-number {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }
  .bismillah-verse .arabic-line {
    font-size: 2rem;
  }
  .chapter-nav {
    padding: 0.75rem 1rem;
  }
}

/* Custom scrollbar */
.quran-continuous-content::-webkit-scrollbar {
  width: 8px;
}

.quran-continuous-content::-webkit-scrollbar-track {
  background: rgba(13, 90, 46, 0.05);
  border-radius: 4px;
}

.quran-continuous-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.quran-continuous-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Loading animation */
.loading-verses {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1.5rem;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(13, 90, 46, 0.1);
  border-left: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: auto auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error toast animation */
.error-toast {
  animation: slideInRight 0.3s ease;
}

/* Chapter selection enhancements */
.chapter-selection {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8f4ec;
  position: relative;
  overflow: hidden;
}

.chapter-selection::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.selection-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  gap: 0.75rem;
}

.input-group label {
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.input-group input {
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fafafa;
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(13, 90, 46, 0.1);
}

.load-btn {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(13, 90, 46, 0.3);
  position: relative;
  overflow: hidden;
  color: white;
}

.load-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: all 0.6s ease;
}

.load-btn:hover::before {
  left: 100%;
}

.load-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(13, 90, 46, 0.4);
}

.load-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 768px) {
  .selection-inputs {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Ahadith Placeholder */
.ahadith-placeholder {
  background: white;
  border-radius: 15px;
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8f4ec;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--warning), #f57c00);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

/* Introduction Description */
.intro-description {
  background: white;
  border-radius: 15px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e8f4ec;
  line-height: 1.8;
}

.intro-description h2 {
  font-family: "Amiri", serif;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  text-align: center;
}

.intro-description p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #555;
}

.intro-description p:last-child {
  margin-bottom: 0;
}

/* Introduction Description */
.introQuran {
  font-size: 1.2rem;
  background-color: white;
  margin-bottom: 1rem;
  padding: 1.2rem;
  border-radius: 15px;
  text-align: center;
}

.read {
  text-align: center;
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .introQuran p {
    font-size: 0.9rem;
  }
}

.footer-column ol {
  list-style: none;
}

/* Fix for navbar text color in Quran page */
@media (max-width: 1024px) {
  .page-section.active#quran ~ footer .navbar.scrolled .logo-text,
  .page-section.active#quran ~ footer .navbar.scrolled .nav-links a,
  .page-section.active#quran ~ footer .navbar.scrolled .hamburger {
    color: var(--dark) !important;
  }
  .page-section.active#quran ~ footer .navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
  }
}

/* Photo Gallery */
.photo-gallery {
  margin: 3rem 0;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.gallery-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  background: white;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.placeholder-image {
  width: 100%;
  height: 250px;
  background: linear-gradient(
    135deg,
    rgba(13, 90, 46, 0.1),
    rgba(46, 125, 50, 0.2)
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.placeholder-image i {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.placeholder-image p {
  font-weight: 600;
  font-size: 1.1rem;
}

.gallery-caption {
  padding: 1rem;
  background: white;
  text-align: center;
  font-weight: 600;
  color: var(--dark);
  border-top: 1px solid rgba(13, 90, 46, 0.1);
}

/* Team Section */
.team-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.team-member {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: var(--transition);
  border: 1px solid rgba(13, 90, 46, 0.1);
}

.team-member:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.member-avatar {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
}

.member-info h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.member-info p {
  color: var(--gray-600);
  font-size: 0.95rem;
}

/* UPDATED: Books Carousel with Navigation Buttons and Progress Bar */
.books-carousel-section {
  position: relative;
}

.books-intro {
  text-align: center;
  margin: 0 auto 1rem;
  color: #555;
  font-size: 1.1rem;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.8);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.books-intro h4 {
  font-family: "Amiri", serif;
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.books-carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: white;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(13, 90, 46, 0.1);
  padding: 2rem 0;
}

.books-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 2rem;
  justify-content: space-evenly;
}

.books-carousel-track.books-loading {
  justify-content: flex-start;
  padding: 0 2rem;
}

.carousel-book-card {
  flex: 0 0 320px;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(13, 90, 46, 0.1);
  display: flex;
  flex-direction: column;
}

.carousel-book-card--skeleton {
  pointer-events: none;
}

.book-skeleton-cover {
  height: 100%;
  width: 100%;
}

.book-skeleton-line {
  height: 12px;
  border-radius: 999px;
  width: 100%;
}

.book-skeleton-line--title {
  height: 18px;
  width: 76%;
}

.book-skeleton-line--author {
  width: 55%;
}

.book-skeleton-line--short {
  width: 82%;
}

.book-skeleton-button {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  margin-top: 0.35rem;
}

.carousel-book-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.carousel-book-cover {
  height: 250px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel-book-card:hover .carousel-book-cover img {
  transform: scale(1.05);
}

.carousel-cover-placeholder {
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
}

.carousel-cover-placeholder i {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.carousel-book-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.carousel-book-title {
  font-family: "Amiri", serif;
  font-size: 1.4rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.carousel-book-author {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.carousel-book-description {
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.carousel-book-actions {
  display: flex;
  gap: 0.75rem;
}

.carousel-book-btn {
  flex: 1;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  border: none;
  text-decoration: none;
}

.carousel-book-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.carousel-book-btn.secondary {
  background: rgba(13, 90, 46, 0.1);
  color: var(--primary);
}

.carousel-book-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(13, 90, 46, 0.3);
}

.carousel-book-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Navigation Buttons */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(13, 90, 46, 0.3);
}

.carousel-nav-btn:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(13, 90, 46, 0.4);
}

.carousel-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: translateY(-50%);
}

.carousel-nav-btn.prev {
  left: 10px;
}

.carousel-nav-btn.next {
  right: 10px;
}

/* Progress Bar */
.carousel-progress-container {
  max-width: 800px;
  margin: 2rem auto 0;
  height: 6px;
  background: rgba(13, 90, 46, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.carousel-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
  position: relative;
}

.carousel-progress-bar.is-loading {
  animation: loadingBarPulse 1.15s ease-in-out infinite alternate;
}

@keyframes loadingBarPulse {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 1;
  }
}

.carousel-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  animation: shimmer 2s infinite;
}

.carousel-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.carousel-position {
  font-weight: 600;
  color: var(--primary);
}

.no-books-carousel {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-600);
  width: 100%;
}

.no-books-carousel i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: rgba(13, 90, 46, 0.2);
}

.no-books-carousel h3 {
  font-family: "Amiri", serif;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* Responsive Design for Books Carousel */
@media (max-width: 1200px) {
  .carousel-book-card {
    flex: 0 0 280px;
  }
}

@media (max-width: 992px) {
  .carousel-book-card {
    flex: 0 0 250px;
  }
  .carousel-book-cover {
    height: 200px;
  }
}

@media (max-width: 768px) {
  .carousel-book-card {
    flex: 0 0 220px;
  }
  .carousel-book-cover {
    height: 180px;
  }
  .carousel-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  .carousel-nav-btn.prev {
    left: 5px;
  }
  .carousel-nav-btn.next {
    right: 5px;
  }
  .books-intro {
    padding: 1.5rem;
    font-size: 1rem;
  }
  .books-intro h4 {
    font-size: 1.4rem;
  }
}

@media (max-width: 576px) {
  .carousel-book-card {
    flex: 0 0 200px;
  }
  .carousel-book-cover {
    height: 160px;
  }
  .carousel-book-content {
    padding: 1rem;
  }
  .carousel-book-title {
    font-size: 1.2rem;
  }
  .carousel-book-description {
    font-size: 0.85rem;
  }
  .carousel-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  .carousel-progress-container {
    margin: 1.5rem auto 0;
  }
}

@media (max-width: 480px) {
  .carousel-book-card {
    flex: 0 0 180px;
  }
  .carousel-book-cover {
    height: 140px;
  }
}

/* Contact/Support Section */
.support-section {
  margin-top: 4rem;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.support-section h3 {
  font-family: "Amiri", serif;
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.support-section p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: #555;
  font-size: 1.1rem;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  margin-bottom: 25px;
  border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(13, 90, 46, 0.05);
}

.auth-tab:hover:not(.active) {
  background: rgba(13, 90, 46, 0.02);
}

.auth-form {
  display: none;
  animation: fadeIn 0.3s ease;
}

.auth-form.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* OTP input styling */
.otp-input-container {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.otp-input {
  width: 50px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.otp-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 90, 46, 0.1);
}

.otp-input.filled {
  border-color: var(--success);
  background: rgba(76, 175, 80, 0.05);
}

/* Password requirements */
.password-requirements {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
  border-left: 3px solid var(--primary);
}

.password-requirements ul {
  list-style: none;
  padding-left: 0;
  margin: 5px 0;
}

.password-requirements li {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.password-requirements li.valid {
  color: var(--success);
}

.password-requirements li i {
  font-size: 0.8rem;
}

.language-switcher {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto;
  flex-wrap: wrap;
}

.lang-btn {
  padding: 10px 20px;
  background: #e0e0e0;
  color: var(--dark);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.lang-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.lang-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(13, 90, 46, 0.3);
}

.lang-btn i {
  font-size: 1rem;
}

/* Responsive design for language switcher */
@media (max-width: 768px) {
  .language-switcher {
    flex-direction: row;
    gap: 0.5rem;
  }
  .lang-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* NEW: Footer quick links grid for mobile */
@media (max-width: 768px) {
  .footer-column ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .footer-column ul li {
    margin-bottom: 0.5rem;
  }
}

/* Image placeholder styles */
.image-placeholder {
  background: #e0e0e0;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.image-placeholder.tall {
  height: 400px;
}

.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Highlight animation */
@keyframes highlightPulse {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(13, 90, 46, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

/* Success pulse animation */
@keyframes successPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: scale(1.01);
    box-shadow: 0 15px 40px rgba(13, 90, 46, 0.2);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
}
a.sign-in {
  display: inline-block;
  width: 100%;
  max-width: 240px;
  box-sizing: border-box;
  margin: 8px auto;
  text-decoration: none;
  background-color: var(--primary);
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

a.sign-in:hover {
  background: var(--secondary);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(13, 90, 46, 0.4);
}

@media (min-width: 992px) {
  a.sign-in {
    width: 180px;
  }
}

@media (max-width: 576px) {
  a.sign-in {
    width: 90%;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: 10px;
  }
}
/* Ask Us Floating Button Styles */
.ask-us-floating-btn {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(13, 90, 46, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: all 0.3s ease;
  z-index: 999;
}

.ask-us-floating-btn:hover {
  width: 180px;
  background: var(--secondary);
  box-shadow: 0 8px 30px rgba(13, 90, 46, 0.6);
  color: var(--dark);
}

.ask-us-floating-btn .btn-text {
  margin-left: 10px;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  width: 0;
  transition:
    opacity 0.3s ease,
    width 0.3s ease;
}

.ask-us-floating-btn:hover .btn-text {
  opacity: 1;
  width: auto;
}

.ask-us-floating-btn:active {
  transform: scale(0.95);
}

/* Enhanced Ask Us Modal Styles */
.ask-us-modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow-y: auto;
}

.ask-us-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 500px;
  position: relative;
  animation: modalSlideIn 0.4s ease;
  border: 1px solid #e8f4ec;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  margin: auto 0;
}

.ask-us-header {
  text-align: center;
  margin-bottom: 30px;
}

.ask-us-title {
  font-family: "Amiri", serif;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ask-us-title i {
  font-size: 2.2rem;
}

.ask-us-subtitle {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.ask-us-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ask-us-form-group {
  display: flex;
  flex-direction: column;
}

.ask-us-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--dark);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.ask-us-label i {
  color: var(--primary);
}

.required {
  color: #e53935;
}

.optional {
  color: #999;
  font-weight: 400;
  font-size: 0.85rem;
}

.ask-us-textarea,
.ask-us-input {
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fafafa;
}

.ask-us-textarea {
  min-height: 120px;
  max-height: 200px;
  resize: vertical;
}

.ask-us-textarea:focus,
.ask-us-input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(13, 90, 46, 0.1);
}

.ask-us-hint {
  display: block;
  color: #999;
  font-size: 0.85rem;
  margin-top: 6px;
}

.ask-us-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.ask-us-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ask-us-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}

.ask-us-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 90, 46, 0.3);
}

.ask-us-btn.primary:active {
  transform: translateY(0);
}

.ask-us-btn.secondary {
  background: #f0f0f0;
  color: var(--dark);
  border: 2px solid #e0e0e0;
}

.ask-us-btn.secondary:hover {
  background: #e8e8e8;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.ask-us-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ask-us-message {
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  margin-top: 10px;
}

.ask-us-thankyou {
  background: linear-gradient(
    135deg,
    rgba(76, 175, 80, 0.1),
    rgba(76, 175, 80, 0.05)
  );
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid var(--success);
}

.ask-us-thankyou-title {
  color: var(--success);
  margin-bottom: 0.5rem;
}

.ask-us-thankyou-text {
  color: var(--gray-700);
  margin: 0;
}

.ask-us-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.ask-us-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.ask-us-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.ask-us-privacy-notice {
  background: linear-gradient(
    135deg,
    rgba(13, 90, 46, 0.05) 0%,
    rgba(13, 90, 46, 0.02) 100%
  );
  padding: 15px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  border-left: 4px solid var(--primary);
  margin-top: 20px;
}

.ask-us-privacy-notice i {
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.ask-us-privacy-notice h4 {
  color: var(--primary);
  margin: 0 0 6px 0;
  font-size: 0.95rem;
}

.ask-us-privacy-notice p {
  color: #666;
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ask Us Modal Responsive */

/* Extra Large Screens (1200px and above) */
@media (min-width: 1200px) {
  .ask-us-modal-content {
    padding: 50px;
  }

  .ask-us-title {
    font-size: 2.2rem;
  }

  .ask-us-subtitle {
    font-size: 1rem;
  }

  .ask-us-textarea {
    min-height: 140px;
  }
}

/* Tablets (769px to 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .ask-us-modal-content {
    padding: 35px;
  }

  .ask-us-title {
    font-size: 1.8rem;
  }

  .ask-us-textarea {
    min-height: 130px;
  }
}

/* Small Tablets and Large Phones (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .ask-us-modal {
    padding: 12px;
  }

  .ask-us-modal-content {
    width: 95%;
    padding: 28px 22px;
    max-width: none;
    border-radius: 16px;
  }

  .ask-us-title {
    font-size: 1.5rem;
  }

  .ask-us-subtitle {
    font-size: 0.9rem;
  }

  .ask-us-label {
    font-size: 0.9rem;
  }

  .ask-us-textarea,
  .ask-us-input {
    padding: 12px;
    font-size: 16px;
  }

  .ask-us-textarea {
    min-height: 110px;
    max-height: 180px;
  }

  .ask-us-hint {
    font-size: 0.8rem;
  }

  .ask-us-actions {
    flex-direction: column;
    gap: 10px;
  }

  .ask-us-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  .ask-us-privacy-notice {
    padding: 12px;
    gap: 10px;
    margin-top: 16px;
  }

  .ask-us-privacy-notice i {
    font-size: 1rem;
  }

  .ask-us-privacy-notice h4 {
    font-size: 0.9rem;
  }

  .ask-us-privacy-notice p {
    font-size: 0.8rem;
  }

  .ask-us-floating-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    left: 20px;
    font-size: 1rem;
  }

  .ask-us-floating-btn:hover {
    width: 140px;
  }

  .ask-us-floating-btn .btn-text {
    font-size: 0.85rem;
  }
}

/* Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
  .ask-us-modal {
    padding: 8px;
    align-items: flex-start;
    padding-top: 50px;
  }

  .ask-us-modal-content {
    width: 100%;
    padding: 24px 16px;
    max-width: 100%;
    border-radius: 14px;
    max-height: calc(100vh - 60px);
    margin-top: 0;
  }

  .close-modal {
    top: 12px;
    right: 12px;
    font-size: 28px;
  }

  .ask-us-header {
    margin-bottom: 20px;
  }

  .ask-us-title {
    font-size: 1.3rem;
    gap: 6px;
  }

  .ask-us-title i {
    font-size: 1.5rem;
  }

  .ask-us-subtitle {
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .ask-us-form {
    gap: 16px;
  }

  .ask-us-form-group {
    gap: 6px;
  }

  .ask-us-label {
    font-size: 0.85rem;
    gap: 6px;
  }

  .ask-us-label i {
    font-size: 0.9rem;
  }

  .required,
  .optional {
    font-size: 0.75rem;
  }

  .ask-us-textarea,
  .ask-us-input {
    padding: 10px;
    font-size: 16px;
    border-radius: 8px;
    border-width: 1px;
  }

  .ask-us-textarea {
    min-height: 100px;
    max-height: 160px;
  }

  .ask-us-hint {
    font-size: 0.75rem;
    margin-top: 4px;
  }

  .ask-us-actions {
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
  }

  .ask-us-btn {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.9rem;
    gap: 6px;
    border-radius: 8px;
  }

  .ask-us-btn i {
    font-size: 0.9rem;
  }

  .ask-us-message {
    padding: 10px 12px;
    font-size: 0.85rem;
    margin-top: 8px;
    border-radius: 6px;
  }

  .ask-us-privacy-notice {
    padding: 10px;
    gap: 8px;
    margin-top: 12px;
    border-left-width: 3px;
    border-radius: 8px;
  }

  .ask-us-privacy-notice i {
    font-size: 0.95rem;
    margin-top: 0;
  }

  .ask-us-privacy-notice h4 {
    font-size: 0.85rem;
    margin-bottom: 4px;
  }

  .ask-us-privacy-notice p {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .ask-us-floating-btn {
    width: 48px;
    height: 48px;
    bottom: 16px;
    left: 16px;
    font-size: 0.95rem;
  }

  .ask-us-floating-btn:hover {
    width: 130px;
  }

  .ask-us-floating-btn .btn-text {
    font-size: 0.8rem;
  }
}

/* Ultra-small screens (320px to 380px) */
@media (max-width: 380px) {
  .ask-us-modal-content {
    padding: 18px 12px;
  }

  .ask-us-title {
    font-size: 1.1rem;
  }

  .ask-us-subtitle {
    font-size: 0.8rem;
  }

  .ask-us-label {
    font-size: 0.8rem;
  }

  .ask-us-textarea,
  .ask-us-input {
    font-size: 15px;
    padding: 9px;
  }

  .ask-us-textarea {
    min-height: 90px;
  }

  .ask-us-btn {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* Modern Page Loader Styles */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
  animation: slideInLoader 0.8s ease;
}

@keyframes slideInLoader {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loader-logo {
  margin-bottom: 2rem;
  animation: bobbing 2s ease-in-out infinite;
}

.loader-logo-img {
  height: 80px;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(13, 90, 46, 0.3);
}

@keyframes bobbing {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.loader-spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 2rem auto;
  position: relative;
}

.spinner-circle {
  width: 100%;
  height: 100%;
  border: 4px solid rgba(13, 90, 46, 0.1);
  border-top: 4px solid var(--primary);
  border-right: 4px solid var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(13, 90, 46, 0.15);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loader-text {
  font-size: 1.2rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 2px;
  animation: dotAnimation 1.5s steps(4, end) infinite;
}

@keyframes dotAnimation {
  0%,
  20% {
    content: "Loading";
    color: var(--primary);
  }
  40% {
    content: "Loading.";
    color: var(--primary);
  }
  60% {
    content: "Loading..";
    color: var(--primary);
  }
  80%,
  100% {
    content: "Loading...";
    color: var(--primary);
  }
}

/* Loading dots animation alternative */
.loader-text::after {
  content: "";
  display: inline-block;
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%,
  20% {
    content: "";
    width: 0;
  }
  40% {
    content: ".";
    width: auto;
  }
  60% {
    content: "..";
    width: auto;
  }
  80%,
  100% {
    content: "...";
    width: auto;
  }
}

@media (max-width: 768px) {
  .loader-logo-img {
    height: 60px;
  }

  .loader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1.5rem auto;
  }

  .spinner-circle {
    border: 3px solid rgba(13, 90, 46, 0.1);
    border-top: 3px solid var(--primary);
    border-right: 3px solid var(--secondary);
  }

  .loader-text {
    font-size: 1rem;
  }
}

/* Scroll reveal utilities */
.scroll-reveal {
  --sr-duration: 0.7s;
  --sr-easing: cubic-bezier(0.22, 1, 0.36, 1);
  --sr-delay: 0s;
  --sr-x: 0;
  --sr-y: 24px;
  opacity: 0;
  transform: translate3d(var(--sr-x), var(--sr-y), 0);
  transition:
    opacity var(--sr-duration) var(--sr-easing) var(--sr-delay),
    transform var(--sr-duration) var(--sr-easing) var(--sr-delay);
  will-change: opacity, transform;
}

.scroll-reveal--fade-up {
  --sr-x: 0;
  --sr-y: 24px;
}

.scroll-reveal--fade-in {
  --sr-x: 0;
  --sr-y: 0;
}

.scroll-reveal--slide-left {
  --sr-x: 32px;
  --sr-y: 0;
}

.scroll-reveal--slide-right {
  --sr-x: -32px;
  --sr-y: 0;
}

.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }
}

/* Mobile polish refinements */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }

  .logo-img {
    height: 52px;
    margin-right: 8px;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .logo-text .big {
    font-size: 1.9rem;
  }

  .nav-links {
    width: min(88vw, 360px);
    padding-top: 84px;
    padding-left: 12px;
    padding-right: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-links li {
    width: 100%;
    margin: 10px 0 0;
  }

  .nav-links a {
    min-height: 46px;
    padding: 12px 14px;
    justify-content: flex-start;
    font-size: 1.02rem;
    border-radius: 14px;
  }

  .home-hero {
    padding: 96px 16px 56px;
  }

  .home-quran-verse {
    max-width: 100%;
    margin-top: 18px;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    margin-bottom: 22px;
  }

  .history-section {
    padding: 72px 16px 20px;
  }

  .history-item {
    margin-bottom: 18px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }

  .history-text {
    padding: 18px;
  }

  .shared-page-hero {
    padding: 108px 16px 44px;
  }

  .content-section {
    padding: 28px 16px;
  }

  .read-more-section,
  .support-section,
  .intro-description,
  .books-intro {
    margin-left: 16px;
    margin-right: 16px;
    padding: 24px 18px;
  }

  .tabs-header {
    gap: 8px;
    flex-wrap: wrap;
  }

  .tab-btn {
    min-height: 44px;
    flex: 1;
    justify-content: center;
  }

  .search-container.clarifications-search-container {
    padding: 14px;
    border-radius: 14px;
  }

  .search-box .search-input {
    min-height: 44px;
  }

  .team-section {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .team-member {
    padding: 1.1rem;
    gap: 1rem;
    align-items: flex-start;
  }

  .member-avatar {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
    flex-shrink: 0;
  }

  .books-carousel-container {
    padding: 1.2rem 0 1rem;
  }

  .books-carousel-track {
    gap: 1rem;
    padding: 0 0.75rem;
  }

  .carousel-book-card {
    flex: 0 0 min(84vw, 280px);
  }

  .carousel-book-cover {
    height: 190px;
  }

  .carousel-book-btn {
    min-height: 42px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    width: 100vw;
  }

  .home-hero h1 {
    font-size: 1.9rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.98rem;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
  }

  .history-item p {
    font-size: 0.98rem;
  }

  .books-carousel-track {
    padding: 0 0.5rem;
  }

  .carousel-book-card {
    flex: 0 0 calc(100vw - 44px);
  }

  .ask-us-floating-btn {
    left: 12px;
    bottom: 12px;
  }
}

/* Public modal refresh: Ask Us + Login */
.login-modal,
.ask-us-modal {
  backdrop-filter: blur(10px) saturate(115%);
}

.login-modal::before,
.ask-us-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      120deg,
      rgba(255, 255, 255, 0) 5%,
      rgba(255, 255, 255, 0.12) 40%,
      rgba(255, 255, 255, 0) 75%
    ),
    linear-gradient(
      305deg,
      rgba(255, 202, 30, 0.08) 2%,
      rgba(255, 202, 30, 0) 38%
    );
  animation: modalBackdropPulse 14s ease-in-out infinite alternate;
}

.login-modal-content,
.ask-us-modal-content {
  position: relative;
  width: min(100%, 560px);
  max-height: min(88vh, 760px);
  border-radius: 26px;
  border: 1px solid rgba(13, 90, 46, 0.18);
  box-shadow:
    0 26px 64px rgba(0, 0, 0, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.75) inset;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.98) 8%, rgba(244, 250, 245, 0.98) 100%);
  overflow: hidden auto;
  padding: clamp(22px, 2.7vw, 38px);
  animation: modalCardEnter 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ask-us-modal-content {
  width: min(100%, 640px);
}

.login-modal-content::before,
.ask-us-modal-content::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.close-modal {
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(13, 90, 46, 0.2);
  background: rgba(255, 255, 255, 0.88);
  color: var(--primary);
  font-size: 1.45rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.close-modal:hover,
.close-modal:focus-visible {
  background: rgba(13, 90, 46, 0.1);
  color: var(--accent);
  transform: translateY(-1px);
  outline: none;
}

.login-header,
.ask-us-header {
  text-align: center;
  margin-bottom: 22px;
}

.modal-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0.42rem 0.88rem;
  margin: 0 auto 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(13, 90, 46, 0.1);
  color: var(--primary);
  border: 1px solid rgba(13, 90, 46, 0.2);
}

.login-status-pill {
  background: linear-gradient(120deg, rgba(13, 90, 46, 0.14), rgba(46, 125, 50, 0.08));
}

.ask-us-status-pill {
  background: linear-gradient(120deg, rgba(255, 202, 30, 0.23), rgba(255, 202, 30, 0.07));
}

.login-logo {
  margin-top: 0;
  margin-bottom: 0.95rem;
}

.login-logo-img {
  height: 54px;
  margin-right: 12px;
}

.login-logo-text {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

.login-logo-text .big {
  font-size: clamp(2rem, 3.6vw, 2.35rem);
}

.login-title,
.ask-us-title {
  margin-bottom: 0.45rem;
  color: var(--primary);
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  line-height: 1.25;
}

.ask-us-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-subtitle,
.ask-us-subtitle {
  color: #5f6864;
  margin: 0;
  font-size: clamp(0.9rem, 1.55vw, 1rem);
  line-height: 1.5;
}

.auth-tabs {
  margin-bottom: 20px;
  padding: 5px;
  border: 1px solid rgba(13, 90, 46, 0.16);
  border-radius: 14px;
  background: rgba(13, 90, 46, 0.03);
  gap: 6px;
}

.auth-tab {
  border-radius: 10px;
  border-bottom: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #375144;
  min-height: 44px;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.auth-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 16px rgba(13, 90, 46, 0.3);
}

.auth-tab:hover:not(.active) {
  background: rgba(13, 90, 46, 0.08);
  transform: translateY(-1px);
}

.forgot-fields-stage {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.forgot-step-field {
  opacity: 1;
  transform: translateX(0);
  max-height: 280px;
  overflow: hidden;
  transition:
    opacity 0.32s ease,
    transform 0.32s ease,
    max-height 0.32s ease;
}

.forgot-step-field.is-collapsed-left,
.forgot-step-field.is-collapsed-right {
  opacity: 0;
  max-height: 0;
  pointer-events: none;
}

.forgot-step-field.is-collapsed-left {
  transform: translateX(-32px);
}

.forgot-step-field.is-collapsed-right {
  transform: translateX(32px);
}

.login-form-group,
.ask-us-form-group {
  margin-bottom: 0;
  gap: 8px;
}

.login-form-group label,
.ask-us-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #264035;
}

.login-input,
.ask-us-textarea,
.ask-us-input {
  border: 1px solid #d4e2d9;
  border-radius: 12px;
  background: #fff;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
  margin-bottom: 1rem;
}

.login-input {
  min-height: 50px;
}

.password-input-row:focus-within .login-input,
.ask-us-form-group:focus-within .ask-us-textarea,
.ask-us-form-group:focus-within .ask-us-input {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 90, 46, 0.13);
  transform: translateY(-1px);
}

.login-input:focus,
.ask-us-textarea:focus,
.ask-us-input:focus {
  box-shadow: none;
}

.password-toggle {
  right: 10px;
  border-radius: 10px;
  top: 11px;
}

.password-toggle:hover {
  background: rgba(13, 90, 46, 0.1);
}

.ask-us-form {
  gap: 16px;
}

.ask-us-textarea {
  min-height: 135px;
  max-height: 260px;
}

.ask-us-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ask-us-char-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: #5d7066;
  padding: 0.2rem 0.58rem;
  border-radius: 999px;
  background: rgba(13, 90, 46, 0.08);
  border: 1px solid rgba(13, 90, 46, 0.15);
}

.ask-us-char-count.near-limit {
  background: rgba(255, 152, 0, 0.16);
  border-color: rgba(255, 152, 0, 0.28);
  color: #8c5403;
}

.ask-us-char-count.at-limit {
  background: rgba(229, 57, 53, 0.16);
  border-color: rgba(229, 57, 53, 0.26);
  color: #9f221f;
}

.ask-us-topics-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #456357;
}

.ask-us-topic-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ask-us-chip {
  border: 1px solid rgba(13, 90, 46, 0.24);
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.ask-us-chip:hover,
.ask-us-chip:focus-visible {
  background: rgba(13, 90, 46, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.ask-us-chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-color: transparent;
  box-shadow: 0 8px 14px rgba(13, 90, 46, 0.24);
}

.login-btn,
.ask-us-btn {
  min-height: 50px;
  border-radius: 12px;
  font-size: 0.98rem;
}

.login-btn {
  margin-top: 6px;
}

#forgotPasswordForm .forgot-step-field .login-input {
  margin-bottom: 0.7rem;
}

#forgotPasswordForm #newPasswordSection .label-spaced {
  margin-top: 10px;
}

#forgotPasswordForm #newPasswordSection .password-input-row:last-child .login-input {
  margin-bottom: 0;
}

.ask-us-btn.secondary {
  border: 1px solid rgba(13, 90, 46, 0.2);
}

.security-notice,
.ask-us-privacy-notice {
  margin-top: 18px;
  border-left-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(13, 90, 46, 0.14);
  background: linear-gradient(135deg, rgba(13, 90, 46, 0.1), rgba(13, 90, 46, 0.03));
}

.security-notice {
  color: #25543d;
  font-weight: 600;
}

.ask-us-message {
  font-size: 0.9rem;
  border-radius: 10px;
  margin-top: 6px;
}

.ask-us-floating-btn {
  width: 64px;
  height: 64px;
  box-shadow:
    0 12px 28px rgba(13, 90, 46, 0.44),
    0 0 0 0 rgba(13, 90, 46, 0.25);
  overflow: hidden;
}

.ask-us-floating-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: scale(1);
  animation: askUsBtnPing 2.4s ease-out infinite;
}

.ask-us-floating-btn:hover {
  width: 190px;
  color: #fff;
  background: var(--secondary);
}

.ask-us-floating-btn .btn-text {
  font-size: 0.93rem;
  font-weight: 700;
}

@keyframes modalBackdropPulse {
  from {
    opacity: 0.68;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalCardEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes askUsBtnPing {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  70% {
    transform: scale(1.1);
    opacity: 0;
  }
  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}

@media (max-width: 992px) {
  .login-modal-content,
  .ask-us-modal-content {
    width: min(100%, 620px);
    max-height: min(90vh, 760px);
  }
}

@media (max-width: 768px) {
  .login-modal,
  .ask-us-modal {
    padding: 10px;
    align-items: flex-start;
  }

  .login-modal-content,
  .ask-us-modal-content {
    border-radius: 20px;
    padding: 20px 16px 18px;
    max-height: calc(100vh - 20px);
    margin-top: 10px;
  }

  .login-logo-img {
    height: 46px;
    margin-right: 10px;
  }

  .login-logo-text {
    font-size: 1.25rem;
  }

  .login-logo-text .big {
    font-size: 1.85rem;
  }

  .auth-tabs {
    margin-bottom: 16px;
  }

  .auth-tab {
    min-height: 42px;
    font-size: 0.84rem;
  }

  .ask-us-topic-chips {
    gap: 6px;
  }

  .ask-us-chip {
    font-size: 0.75rem;
    padding: 0.34rem 0.66rem;
  }

  .ask-us-actions {
    flex-direction: column;
    gap: 10px;
  }

  .ask-us-floating-btn {
    width: 56px;
    height: 56px;
    left: 14px;
    bottom: 14px;
  }
}

@media (max-width: 480px) {
  .login-modal,
  .ask-us-modal {
    padding: 8px;
  }

  .login-modal-content,
  .ask-us-modal-content {
    border-radius: 16px;
    padding: 18px 12px 14px;
    max-height: calc(100vh - 12px);
    margin-top: auto;
    margin-bottom: auto;
  }

  .forgot-fields-stage {
    min-height: 196px;
  }

  .modal-status-pill {
    font-size: 0.72rem;
    padding: 0.34rem 0.74rem;
    margin-bottom: 8px;
  }

  .login-title,
  .ask-us-title {
    font-size: 1.2rem;
  }

  .login-subtitle,
  .ask-us-subtitle {
    font-size: 0.83rem;
  }

  .login-input,
  .ask-us-input,
  .ask-us-textarea {
    font-size: 16px;
    min-height: 46px;
    padding: 12px;
  }

  .ask-us-textarea {
    min-height: 110px;
  }

  .login-btn,
  .ask-us-btn {
    min-height: 46px;
    font-size: 0.9rem;
  }

  .security-notice,
  .ask-us-privacy-notice {
    margin-top: 14px;
    font-size: 0.78rem;
  }

  .close-modal {
    width: 38px;
    height: 38px;
    top: 10px;
    right: 10px;
  }

  .ask-us-floating-btn {
    width: 52px;
    height: 52px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .ask-us-floating-btn {
    width: 56px;
  }

  .ask-us-floating-btn:hover {
    width: 56px;
  }

  .ask-us-floating-btn .btn-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-modal::before,
  .ask-us-modal::before,
  .login-modal-content,
  .ask-us-modal-content,
  .ask-us-floating-btn::after {
    animation: none !important;
  }
}
