/* Global styling overrides and helpers for nolcardae.org */

:root {
  --nol-navy: #0f2a5c;
  --nol-blue: #1e4fbf;
  --nol-gold: #f6b51e;
  --nol-red: #e63946;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family:
    "Inter",
    "SF Pro Display",
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    sans-serif;
  color: #0f172a;
  background: #ffffff;
  font-feature-settings:
    "cv02",
    "cv03",
    "cv04",
    "cv11";
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body {
  font-family:
    "Cairo",
    "Tajawal",
    "Noto Sans Arabic",
    "Segoe UI",
    Tahoma,
    sans-serif;
}

/* Load pleasant Arabic font when needed */
@font-face {
  font-family: "Cairo";
  src: local("Cairo"), local("Tajawal");
  font-display: swap;
}

/* Reusable hero gradient */
.nol-hero-bg {
  background:
    radial-gradient(circle at 12% 20%, rgba(30, 79, 191, 0.25) 0%, transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(246, 181, 30, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(15, 42, 92, 0.45) 0%, transparent 50%),
    linear-gradient(135deg, #0a1f4d 0%, #0f2a5c 40%, #1e4fbf 100%);
}

.nol-card-sheen {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 60%),
    linear-gradient(160deg, #0f2a5c 0%, #1e4fbf 55%, #f6b51e 180%);
}

/* Subtle grid overlay used on hero backgrounds */
.nol-grid-overlay {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Mini card mock */
.nol-mini-card {
  width: 100%;
  aspect-ratio: 1.586 / 1;
  border-radius: 20px;
  background: linear-gradient(135deg, #d4af37 0%, #f6b51e 45%, #9a7412 100%);
  color: #1a1203;
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.3) inset;
  position: relative;
  overflow: hidden;
}

.nol-mini-card.silver {
  background: linear-gradient(135deg, #c0c5cd 0%, #eef1f5 45%, #7c8390 100%);
  color: #13202f;
}

.nol-mini-card.blue {
  background: linear-gradient(135deg, #0f2a5c 0%, #1e4fbf 50%, #0b1e3f 100%);
  color: #fff;
}

.nol-mini-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px circle at 110% -20%, rgba(255, 255, 255, 0.3), transparent 40%),
    radial-gradient(600px circle at -20% 120%, rgba(0, 0, 0, 0.25), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.nol-mini-card > * {
  position: relative;
  z-index: 1;
}

/* Animated pulse dot */
.nol-pulse {
  position: relative;
}
.nol-pulse::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.4;
  animation: nolPulse 2s ease-out infinite;
}
@keyframes nolPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Focus ring */
:focus-visible {
  outline: 3px solid #1e4fbf;
  outline-offset: 2px;
  border-radius: 6px;
}

/* Make long FAQ <details> animation smoother */
details > summary {
  cursor: pointer;
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* Fade-in helper (non-JS) */
.nol-fade-up {
  animation: nolFadeUp 0.7s ease-out both;
}
@keyframes nolFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* RTL helpers */
html[dir="rtl"] .nol-flip {
  transform: scaleX(-1);
}

/* Article / long-form content styling */
.nol-article {
  color: #1f2937;
  font-size: 17px;
  line-height: 1.75;
}
.nol-article .nol-lead {
  font-size: 1.18em;
  line-height: 1.7;
  color: #0f172a;
  font-weight: 500;
  padding-left: 1rem;
  border-left: 3px solid #1e4fbf;
  margin-bottom: 1.75rem;
}
html[dir="rtl"] .nol-article .nol-lead {
  padding-left: 0;
  padding-right: 1rem;
  border-left: 0;
  border-right: 3px solid #1e4fbf;
}
.nol-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f2a5c;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  letter-spacing: -0.01em;
  scroll-margin-top: 6rem;
}
.nol-article p {
  margin-bottom: 1.1rem;
}
.nol-article ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.nol-article ul li {
  position: relative;
  padding-left: 1.5rem;
  line-height: 1.65;
}
.nol-article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background: #f6b51e;
}
html[dir="rtl"] .nol-article ul li {
  padding-left: 0;
  padding-right: 1.5rem;
}
html[dir="rtl"] .nol-article ul li::before {
  left: auto;
  right: 0;
}
.nol-article blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-left: 4px solid #f6b51e;
  border-radius: 0 0.75rem 0.75rem 0;
  font-size: 1.08em;
  font-style: italic;
  color: #0f2a5c;
  line-height: 1.6;
}
html[dir="rtl"] .nol-article blockquote {
  border-left: 0;
  border-right: 4px solid #f6b51e;
  border-radius: 0.75rem 0 0 0.75rem;
}
.nol-article a {
  color: #1e4fbf;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nol-article a:hover {
  color: #0f2a5c;
}
