/* Custom Fonts: Bornomala for Bangla, Ubuntu Sans for English */
@font-face {
  font-family: 'Bornomala';
  src: url('../fonts/Bornomala-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bornomala';
  src: url('../fonts/Bornomala-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.font-bn {
  font-family: 'Bornomala', 'Hind Siliguri', sans-serif;
}

.font-en {
  font-family: 'Ubuntu Sans', sans-serif;
}

html {
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  font-size: 16px; /* Base for mobile & standard laptops */
}

/* Fluid Responsive Typography Scaling for Desktop & Large Monitors (1080p, 1440p, 2K, 4K) */
@media (min-width: 1440px) {
  html {
    font-size: 17.5px; /* 109% scale for 1440px+ screens */
  }
}

@media (min-width: 1680px) {
  html {
    font-size: 18.5px; /* 115% scale for 1680px+ screens */
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 19.5px; /* 122% scale for 24"-27" Full HD/QHD desktop monitors */
  }
}

@media (min-width: 2560px) {
  html {
    font-size: 21.5px; /* 134% scale for 32" 2K / 4K UHD monitors */
  }
}

body {
  font-family: 'Bornomala', 'Ubuntu Sans', sans-serif;
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Ensure Bangla text always uses Bornomala */
html[lang="bn"] body,
html[lang="bn"] .font-bn,
html[lang="bn"] p,
html[lang="bn"] span:not([class*="fa-"]):not(.fa):not(.fa-solid):not(.fa-regular):not(.fa-brands),
html[lang="bn"] a:not([class*="fa-"]):not(.fa),
html[lang="bn"] h1,
html[lang="bn"] h2,
html[lang="bn"] h3,
html[lang="bn"] h4,
html[lang="bn"] button,
html[lang="bn"] input,
html[lang="bn"] select,
html[lang="bn"] textarea,
html[lang="bn"] label {
  font-family: 'Bornomala', 'Hind Siliguri', sans-serif !important;
}

/* Ensure English text uses Ubuntu Sans */
html[lang="en"] body,
html[lang="en"] .font-bn,
html[lang="en"] .font-en,
html[lang="en"] p,
html[lang="en"] span:not([class*="fa-"]):not(.fa):not(.fa-solid):not(.fa-regular):not(.fa-brands),
html[lang="en"] a:not([class*="fa-"]):not(.fa),
html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4,
html[lang="en"] button,
html[lang="en"] input,
html[lang="en"] select,
html[lang="en"] textarea,
html[lang="en"] label {
  font-family: 'Ubuntu Sans', sans-serif !important;
}

/* ===== FontAwesome Icon Protection (Prevent font-family / font-weight override by language fonts) ===== */
.fa, .fa-solid, .fa-regular, .fa-brands, [class*="fa-"], [class^="fa-"],
i.fa, i.fa-solid, i.fa-regular, i.fa-brands, span.fa, span.fa-solid, span.fa-regular, span.fa-brands,
i[class*="fa-"], span[class*="fa-"] {
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
  display: inline-block;
  vertical-align: -0.125em;
}

.fa, .fa-solid, .fas,
html[lang="bn"] .fa, html[lang="bn"] .fa-solid, html[lang="bn"] .fas,
html[lang="bn"] i.fa, html[lang="bn"] i.fa-solid, html[lang="bn"] i.fas,
html[lang="bn"] i[class*="fa-"], html[lang="bn"] span[class*="fa-"],
html[lang="en"] .fa, html[lang="en"] .fa-solid, html[lang="en"] .fas,
html[lang="en"] i.fa, html[lang="en"] i.fa-solid, html[lang="en"] i.fas,
html[lang="en"] i[class*="fa-"], html[lang="en"] span[class*="fa-"] {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.fa-regular, .far,
html[lang="bn"] .fa-regular, html[lang="bn"] .far,
html[lang="bn"] i.fa-regular, html[lang="bn"] i.far,
html[lang="en"] .fa-regular, html[lang="en"] .far,
html[lang="en"] i.fa-regular, html[lang="en"] i.far {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 400 !important;
}

.fa-brands, .fab,
html[lang="bn"] .fa-brands, html[lang="bn"] .fab,
html[lang="bn"] i.fa-brands, html[lang="bn"] i.fab,
html[lang="en"] .fa-brands, html[lang="en"] .fab,
html[lang="en"] i.fa-brands, html[lang="en"] i.fab {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* ===== Dual Language Visibility Rules (Bangla by Default) ===== */
.lang-en-only {
  display: none !important;
}

.lang-bn-only {
  display: inline;
}

div.lang-bn-only,
p.lang-bn-only,
section.lang-bn-only,
article.lang-bn-only {
  display: block;
}

span.lang-bn-only.flex,
div.lang-bn-only.flex {
  display: flex;
}

span.lang-bn-only.inline-flex,
div.lang-bn-only.inline-flex {
  display: inline-flex;
}

span.lang-bn-only.grid,
div.lang-bn-only.grid {
  display: grid;
}

html[lang="en"] .lang-bn-only {
  display: none !important;
}

html[lang="en"] .lang-en-only {
  display: inline !important;
}

html[lang="en"] div.lang-en-only,
html[lang="en"] p.lang-en-only,
html[lang="en"] section.lang-en-only,
html[lang="en"] article.lang-en-only {
  display: block !important;
}

html[lang="en"] span.lang-en-only.flex,
html[lang="en"] div.lang-en-only.flex {
  display: flex !important;
}

html[lang="en"] span.lang-en-only.inline-flex,
html[lang="en"] div.lang-en-only.inline-flex {
  display: inline-flex !important;
}

html[lang="en"] span.lang-en-only.grid,
html[lang="en"] div.lang-en-only.grid {
  display: grid !important;
}

/* ===== Navbar & Button Micro-Animations ===== */
@keyframes shimmer-sweep {
  0% {
    transform: translateX(-150%) skewX(-20deg);
  }

  50%,
  100% {
    transform: translateX(250%) skewX(-20deg);
  }
}

.animate-shimmer-btn {
  position: relative;
  overflow: hidden;
}

.animate-shimmer-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.4),
      transparent);
  animation: shimmer-sweep 3.5s infinite ease-in-out;
  pointer-events: none;
}

.nav-btn-bounce {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-btn-bounce:hover {
  transform: translateY(-2px);
}

.nav-btn-bounce:active {
  transform: translateY(0) scale(0.96);
}

/* Marquee Animation */
@keyframes marquee {
  0% {
    transform: translateX(0%);
  }

  100% {
    transform: translateX(-33.333%);
  }
}

.animate-marquee {
  animation: marquee 25s linear infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #065f46;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* ===== Production UI Polish ===== */

/* Content-visibility for below-fold sections to improve LCP */
.content-below-fold {
  content-visibility: auto;
  contain-intrinsic-size: 500px;
}

/* Smooth focus-visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Button press feedback */
.btn-press:active {
  transform: scale(0.97);
}

/* Card hover lift effect */
.card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, #f59e0b, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Image loading blur placeholder */
img {
  transition: filter 0.3s ease;
}

img.loading {
  filter: blur(10px);
}

img.loaded {
  filter: blur(0);
}

/* Glass morphism utility */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }
}

/* Responsive font adjustments */
@media (max-width: 640px) {
  .text-responsive {
    font-size: clamp(0.75rem, 3.5vw, 1rem);
  }

  h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  h2 {
    font-size: clamp(1.25rem, 5vw, 1.5rem);
  }
}

/* Language Switching Rules */
html[lang="bn"] .lang-en-only {
  display: none !important;
}

html[lang="en"] .lang-bn-only {
  display: none !important;
}

/* Language Toggle Fade Animation */
.lang-bn-only,
.lang-en-only {
  transition: opacity 0.15s ease-in-out;
}

/* Project Card Social / News Badge Overlay */
.project-social-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 231, 235, 0.8);
  color: #4b5563;
  font-size: 13px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.project-social-badge:hover {
  transform: scale(1.1);
  background: #ffffff;
  color: #047857;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Quick Donation Widget Style */
.donation-chip {
  cursor: pointer;
  transition: all 0.2s ease;
}

.donation-chip.active {
  background-color: #047857 !important;
  color: #fbbf24 !important;
  border-color: #047857 !important;
}

/* Social Share Buttons */
.social-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.social-share-btn.facebook {
  background: #eef2ff;
  color: #1d4ed8;
  border-color: #c7d2fe;
}

.social-share-btn.facebook:hover {
  background: #1d4ed8;
  color: #fff;
}

.social-share-btn.twitter {
  background: #eef2ff;
  color: #0891b2;
  border-color: #a5f3fc;
}

.social-share-btn.twitter:hover {
  background: #0891b2;
  color: #fff;
}

.social-share-btn.whatsapp {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #86efac;
}

.social-share-btn.whatsapp:hover {
  background: #16a34a;
  color: #fff;
}

.social-share-btn.telegram {
  background: #f0f9ff;
  color: #0284c7;
  border-color: #bae6fd;
}

.social-share-btn.telegram:hover {
  background: #0284c7;
  color: #fff;
}

/* Video Play Overlay */
.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.group:hover .video-play-overlay {
  opacity: 1;
}

.video-play-btn {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.group:hover .video-play-btn {
  transform: scale(1.1);
}

/* Media Card Base */
.media-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* ========================================================
   NAVBAR ANIMATED ICONS & MICRO-INTERACTIONS
   ======================================================== */
@keyframes nav-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-4px) scale(1.15);
  }

  60% {
    transform: translateY(1px) scale(1.05);
  }
}

@keyframes nav-pulse-spin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  40% {
    transform: rotate(20deg) scale(1.25);
  }

  80% {
    transform: rotate(-10deg) scale(1.1);
  }

  100% {
    transform: rotate(0deg) scale(1);
  }
}

@keyframes nav-heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.3);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.22);
  }

  70% {
    transform: scale(1);
  }
}

@keyframes nav-wiggle {

  0%,
  100% {
    transform: rotate(0deg);
  }

  20% {
    transform: rotate(-14deg) scale(1.15);
  }

  40% {
    transform: rotate(14deg) scale(1.15);
  }

  60% {
    transform: rotate(-8deg) scale(1.1);
  }

  80% {
    transform: rotate(8deg) scale(1.05);
  }
}

@keyframes nav-flip {
  0% {
    transform: perspective(400px) rotateY(0deg);
  }

  50% {
    transform: perspective(400px) rotateY(180deg) scale(1.2);
  }

  100% {
    transform: perspective(400px) rotateY(360deg) scale(1);
  }
}

@keyframes nav-pop {

  0%,
  100% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.3) rotate(-5deg);
  }

  70% {
    transform: scale(1.1) rotate(5deg);
  }
}

.nav-anim-home,
.nav-anim-info,
.nav-anim-heart,
.nav-anim-calc,
.nav-anim-news,
.nav-anim-video,
.nav-anim-user {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .nav-anim-home {
  animation: nav-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .nav-anim-info {
  animation: nav-pulse-spin 0.6s ease-in-out;
}

.group:hover .nav-anim-heart {
  animation: nav-heartbeat 0.8s ease-in-out;
}

.group:hover .nav-anim-calc {
  animation: nav-wiggle 0.6s ease-in-out;
}

.group:hover .nav-anim-news {
  animation: nav-flip 0.7s ease-in-out;
}

.group:hover .nav-anim-video {
  animation: nav-pop 0.5s ease-in-out;
}

.group:hover .nav-anim-user {
  animation: nav-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Donate heart: Continuous energetic pulsing heartbeat */
.nav-anim-donate-heart {
  display: inline-block;
  animation: nav-heartbeat 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: center;
}

.group:hover .nav-anim-donate-heart {
  animation: nav-heartbeat 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* =========================================================
   TRANSPARENT 3D GLASSMORPHISM NAVBAR & FLOATING CAPSULE
   ========================================================= */
.glass-nav-3d {
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.75) 0%,
      rgba(255, 255, 255, 0.42) 50%,
      rgba(255, 255, 255, 0.68) 100%) !important;
  backdrop-filter: blur(20px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow:
    0 20px 35px -10px rgba(6, 78, 59, 0.12),
    0 8px 20px -6px rgba(0, 0, 0, 0.05),
    0 1px 3px 0 rgba(0, 0, 0, 0.03),
    inset 0 1.5px 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 2px 0 rgba(16, 185, 129, 0.12) !important;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3D Specular Highlight Ridge on Top Edge */
.glass-nav-3d::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1.5px;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.8),
      rgba(255, 255, 255, 1),
      rgba(255, 255, 255, 0.8),
      transparent);
  pointer-events: none;
  border-radius: 9999px;
  z-index: 2;
}

/* Subtle Glass Prismatic Bottom Sheen */
.glass-nav-3d::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg,
      transparent,
      rgba(52, 211, 153, 0.35),
      transparent);
  pointer-events: none;
  z-index: 2;
}

/* 3D Glass Interactive Items */
.glass-nav-item {
  position: relative;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.glass-nav-item:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  color: #022c22 !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-color: rgba(5, 150, 105, 0.4) !important;
  box-shadow:
    0 6px 14px -3px rgba(6, 78, 59, 0.12),
    inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.95) !important;
  transform: translateY(-2px);
}

.glass-nav-item:active {
  transform: translateY(0) scale(0.97);
}

/* Dedicated High-Contrast Login Button - Dark Emerald on Hover */
.nav-login-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.8) !important;
  color: #022c22 !important;
  border: 1.5px solid rgba(5, 150, 105, 0.45) !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-login-btn:hover {
  background: #064e3b !important;
  color: #ffffff !important;
  border-color: #047857 !important;
  box-shadow: 0 6px 16px -2px rgba(6, 78, 59, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
}

.nav-login-btn:hover .nav-login-icon-badge {
  background: #022c22 !important;
  color: #f59e0b !important;
}

.nav-login-btn:active {
  transform: translateY(0) scale(0.96);
}

/* 3D Glassmorphic Mobile Drawer */
.glass-drawer-3d {
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.88) 0%,
      rgba(255, 255, 255, 0.68) 100%) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow:
    0 25px 50px -12px rgba(6, 78, 59, 0.18),
    0 10px 20px -5px rgba(0, 0, 0, 0.06),
    inset 0 1.5px 2px 0 rgba(255, 255, 255, 0.95) !important;
}

/* Footer Copyright Green Style */
.footer-copyright-green,
.footer-copyright-green span {
  color: #166534 !important;
  /* deep rich emerald green */
  font-weight: 600;
}

.footer-copyright-green a {
  color: #166534 !important;
  /* exactly matches surrounding text */
  font-weight: 600 !important;
  text-decoration: none !important;
  /* seamlessly blended, no underline */
  outline: none;
  cursor: pointer;
}

/* Hero Banner Height: Matches As-Sunnah Foundation (assunnahfoundation.org) exact 750px (desktop) / 523px (mobile) */
.hero-banner-assunnah {
  min-height: 523px;
  height: 523px;
}

@media (min-width: 640px) {
  .hero-banner-assunnah {
    min-height: 600px;
    height: 600px;
  }
}

@media (min-width: 768px) {
  .hero-banner-assunnah {
    min-height: 660px;
    height: 660px;
  }
}

@media (min-width: 1024px) {
  /* Exactly matches As-Sunnah Foundation's live hero height: 750px */
  .hero-banner-assunnah {
    min-height: 750px;
    height: 750px;
  }
}

@media (min-width: 1680px) {
  /* Ultra-wide / 2K monitors */
  .hero-banner-assunnah {
    min-height: 780px;
    height: 780px;
  }
}

/* As-Sunnah Exact Half-Overlapping Donation Box Position (matches As-Sunnah mt: -116.5px / -39px) */
.hero-donation-box-assunnah {
  margin-top: -39px !important;
}

@media (min-width: 640px) {
  .hero-donation-box-assunnah {
    margin-top: -65px !important;
  }
}

@media (min-width: 1024px) {
  /* Exactly matches As-Sunnah Foundation: -116.5px */
  .hero-donation-box-assunnah {
    margin-top: -116px !important;
  }
}

/* Hero Campaign Slider Image Framing: prevent top cutoff of heads/caps/banners & keep founder prominent */
.hero-slider-img {
  object-fit: cover !important;
  object-position: center top !important;
  transition: transform 0.6s ease-out;
}

@media (min-width: 1024px) {
  /* On desktop screens, anchor framing to founder on the left; zoom slightly so background sprawl is eliminated */
  .hero-slider-img {
    object-position: 10% 12% !important;
    transform: scale(1.10);
    transform-origin: 15% 25%;
  }
}

@media (min-width: 1920px) {
  /* Ultra-wide monitors: maintain balanced, elegant framing focused tightly on founder */
  .hero-slider-img {
    object-position: 8% 15% !important;
    transform: scale(1.15);
    transform-origin: 12% 25%;
  }
}

@media (max-width: 640px) {
  .hero-slider-img {
    object-position: center 5% !important;
    transform: none !important;
  }
}

/* ========================================================
   GLOBAL REQUIRED ASTERISK & FORM ACCENT RED STYLING
   ======================================================== */
.req-star,
.text-red-500,
.text-red-600,
span.text-red-500,
span.text-red-600 {
  color: #ef4444 !important;
}

.req-star {
  font-weight: 900;
  font-size: 1.15em;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  margin-left: 2px;
}
