/* ══════════════════════════════════════════════════════════════════
   TMMM — The Museum of Meelaad e Mustafa ﷺ
   Global Stylesheet
   ══════════════════════════════════════════════════════════════════ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Cinzel:wght@400;600;700&family=Amiri:ital,wght@0,400;0,700;1,400&family=Noto+Naskh+Arabic:wght@400;700&display=swap');

/* ── Reset ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

/* ── Root Variables ── */
:root {
  --emerald-deep:   #061710;
  --emerald-mid:    #0e2e1c;
  --emerald-bright: #163d27;
  --gold:           #c9a84c;
  --gold-light:     #e8c97a;
  --gold-pale:      #f5e8c0;
  --ivory:          #faf6ee;
  --ivory-warm:     #f0e9d6;
  --text-dark:      #1a1a14;
  --text-mid:       #3d3d2e;
  --pattern-opacity: 0.07;
}

/* ── Base ── */
html { 
  scroll-behavior: smooth; 
}

body {
  font-family: 'Cormorant Garamond', serif;
  background-color: var(--ivory);
  color: var(--text-dark);
  overflow-x: hidden;
  cursor: auto;
}

/* ── Page Transition ── */
body {
  opacity: 1;
  transition: opacity 0.3s ease;
}
body.page-loaded {
  opacity: 1;
}
body.page-exit {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* ── Custom Cursor (removed) ──
   Using default browser cursor instead
*/

/* ── Scrollbar ── */
::-webkit-scrollbar { 
  width: 5px; 
}

::-webkit-scrollbar-track { 
  background: var(--emerald-deep); 
}

::-webkit-scrollbar-thumb { 
  background: var(--gold); 
  border-radius: 2px; 
}

/* ══════════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════════ */

nav {
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  z-index: 1000;
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: #0d2b1f;
  border-bottom: 1px solid rgba(201,168,76,0.22);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.32);
  transition: background 0.5s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

nav.scrolled {
  background: #0d2b1f;
  backdrop-filter: blur(16px);
  padding: 0.8rem 3rem;
  box-shadow: 0 3px 42px rgba(0,0,0,0.42);
}

.nav-logo {
  display: flex; 
  align-items: center;
  gap: 0.8rem;
  line-height: 1;
  text-decoration: none;
  flex: 0 1 auto;
}

.nav-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  justify-content: center;
}

.nav-logo .logo-main {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem; 
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.15em;
}

.nav-logo .logo-sub {
  font-family: 'Amiri', serif;
  font-size: 0.7rem; 
  color: rgba(201,168,76,0.65);
  letter-spacing: 0.25em; 
  text-transform: uppercase;
}

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

.nav-links a {
  font-family: 'Cinzel', serif; 
  font-size: 0.72rem;
  letter-spacing: 0.18em; 
  text-transform: uppercase;
  color: rgba(245,232,192,0.75);
  text-decoration: none;
  position: relative; 
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: ''; 
  position: absolute; 
  bottom: 0; 
  left: 0;
  width: 0; 
  height: 1px; 
  background: var(--gold);
  transition: width 0.35s ease;
}

.nav-links a:hover { 
  color: var(--gold-light); 
}

.nav-links a:hover::after { 
  width: 100%; 
}

.nav-links a.active {
  color: var(--gold-light);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  font-family: 'Cinzel', serif; 
  font-size: 0.72rem;
  letter-spacing: 0.18em; 
  text-transform: uppercase;
  color: var(--emerald-deep) !important;
  background: var(--gold);
  padding: 0.55rem 1.4rem !important;
  border-radius: 1px;
  transition: background 0.3s ease, color 0.3s ease !important;
}

.nav-cta:hover { 
  background: var(--gold-light) !important; 
}

.nav-cta::after { 
  display: none !important; 
}

.hamburger {
  display: none; 
  flex-direction: column; 
  gap: 5px;
  cursor: pointer; 
  padding: 4px;
  z-index: 1002;
  background: transparent;
  border: none;
  align-self: center;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  flex-shrink: 0;
}

.hamburger span {
  display: block; 
  width: 24px; 
  height: 1.5px;
  background: var(--gold-light); 
  transition: all 0.3s ease;
  border-radius: 1px;
}

.hamburger:hover span {
  background: var(--gold);
}

/* Mobile Menu Styles */
.nav-links.mobile-open {
  animation: slideDown 0.3s ease;
}

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

.nav-links.mobile-open a {
  font-size: 1rem;
  padding: 0.8rem 0;
}

body.nav-open {
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */

.btn-primary {
  font-family: 'Cinzel', serif; 
  font-size: 0.75rem;
  letter-spacing: 0.22em; 
  text-transform: uppercase;
  background: var(--gold); 
  color: var(--emerald-deep);
  padding: 1rem 2.4rem; 
  text-decoration: none;
  border: none; 
  cursor: pointer;
  position: relative; 
  overflow: hidden;
  transition: color 0.4s ease;
  display: inline-block;
}

.btn-primary::before {
  content: ''; 
  position: absolute;
  inset: 0; 
  background: var(--emerald-deep);
  transform: translateX(-101%);
  transition: transform 0.4s ease;
}

.btn-primary:hover { 
  color: var(--gold); 
}

.btn-primary:hover::before { 
  transform: translateX(0); 
}

.btn-primary span { 
  position: relative; 
  z-index: 1; 
}

.btn-outline {
  font-family: 'Cinzel', serif; 
  font-size: 0.75rem;
  letter-spacing: 0.22em; 
  text-transform: uppercase;
  border: 1px solid rgba(201,168,76,0.5); 
  color: var(--gold-pale);
  padding: 1rem 2.4rem; 
  text-decoration: none;
  background: transparent;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
  color: var(--gold-light);
}

/* Filter Pills (for Events, Blog) */
.filter-pill {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 1.5rem;
  background: transparent;
  color: var(--text-mid);
  border: 1px solid rgba(6,23,16,0.15);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.filter-pill:hover {
  border-color: var(--gold);
  color: var(--emerald-deep);
}

.filter-pill.active {
  background: var(--gold);
  color: var(--emerald-deep);
  border-color: var(--gold);
}

/* Donation Amount Buttons */
.donation-btn {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 600;
  padding: 1.2rem;
  background: var(--ivory-warm);
  color: var(--text-dark);
  border: 2px solid rgba(6,23,16,0.12);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.donation-btn:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
}

.donation-btn.active {
  background: var(--gold);
  color: var(--ivory);
  border-color: var(--gold);
}

/* Donation Type Buttons */
.donation-type-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem;
  background: var(--ivory-warm);
  color: var(--text-dark);
  border: 2px solid rgba(6,23,16,0.12);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.donation-type-btn:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
}

.donation-type-btn.active {
  background: var(--emerald-deep);
  color: var(--gold-light);
  border-color: var(--emerald-deep);
}

/* ══════════════════════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════════════════════ */

section { 
  padding: 7rem 3rem; 
}

.section-label {
  font-family: 'Cinzel', serif; 
  font-size: 0.68rem;
  letter-spacing: 0.35em; 
  text-transform: uppercase;
  color: var(--gold); 
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300; 
  line-height: 1.2;
  color: var(--emerald-deep);
}

.section-title strong { 
  font-weight: 700; 
  color: var(--emerald-mid); 
}

.section-body {
  font-size: 1.1rem; 
  line-height: 1.85;
  color: var(--text-mid); 
  font-weight: 300;
}

.section-standard { 
  padding: 7rem 7rem; 
}

.section-dark { 
  background: var(--emerald-deep); 
}

.section-dark .section-title { 
  color: var(--ivory); 
}

.section-dark .section-label { 
  color: var(--gold); 
}

.section-dark .section-body { 
  color: rgba(245,232,192,0.65); 
}

/* ══════════════════════════════════════════════════════════════════
   PAGE HERO (for inner pages, not homepage)
   ══════════════════════════════════════════════════════════════════ */

.page-hero {
  background: var(--emerald-deep);
  padding: 10rem 5rem 5rem;
  position: relative; 
  overflow: hidden;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.page-hero::before {
  content: '';
  position: absolute; 
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 30px,
    rgba(201,168,76,0.02) 30px, rgba(201,168,76,0.02) 31px),
    repeating-linear-gradient(-45deg, transparent, transparent 30px,
    rgba(201,168,76,0.02) 30px, rgba(201,168,76,0.02) 31px);
}

.page-hero-content { 
  position: relative; 
  z-index: 1; 
  max-width: 800px; 
}

.page-hero .section-label { 
  color: var(--gold); 
}

.page-hero .section-title { 
  color: var(--ivory); 
  font-size: clamp(2.5rem, 5vw, 4rem); 
}

.page-hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; 
  font-style: italic; 
  font-weight: 300;
  color: rgba(245,232,192,0.6); 
  margin-top: 1rem; 
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════════════════════════════ */

.breadcrumb {
  display: flex; 
  gap: 0.5rem; 
  align-items: center;
  font-family: 'Cinzel', serif; 
  font-size: 0.6rem;
  letter-spacing: 0.25em; 
  text-transform: uppercase;
  color: rgba(201,168,76,0.4); 
  margin-bottom: 1.5rem;
}

.breadcrumb a { 
  color: rgba(201,168,76,0.4); 
  text-decoration: none; 
  transition: color 0.3s; 
}

.breadcrumb a:hover { 
  color: var(--gold); 
}

.breadcrumb span { 
  color: var(--gold); 
}

/* ══════════════════════════════════════════════════════════════════
   ORNAMENT DIVIDER
   ══════════════════════════════════════════════════════════════════ */

.ornament-divider {
  display: flex; 
  align-items: center;
  justify-content: center; 
  gap: 1rem;
  padding: 0.5rem 0;
}

.ornament-divider .line {
  flex: 1; 
  max-width: 120px; 
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}

.ornament-divider .line.rev {
  background: linear-gradient(to left, transparent, var(--gold));
}

.ornament-svg { 
  color: var(--gold); 
  opacity: 0.8; 
}

/* ══════════════════════════════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0; 
  transform: translateY(22px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.d1 { 
  transition-delay: 0.1s; 
}

.reveal.d2 { 
  transition-delay: 0.22s; 
}

.reveal.d3 { 
  transition-delay: 0.36s; 
}

.reveal.d4 { 
  transition-delay: 0.5s; 
}

.reveal.visible { 
  opacity: 1; 
  transform: none; 
}

/* ══════════════════════════════════════════════════════════════════
   CARD GRIDS
   ══════════════════════════════════════════════════════════════════ */

.card-grid-3 { 
  display: grid; 
  grid-template-columns: repeat(3,1fr); 
  gap: 1.5rem; 
}

.card-grid-2 { 
  display: grid; 
  grid-template-columns: repeat(2,1fr); 
  gap: 2rem; 
}

/* ══════════════════════════════════════════════════════════════════
   CONTENT CARD
   ══════════════════════════════════════════════════════════════════ */

.content-card {
  border: 1px solid rgba(201,168,76,0.18);
  background: white; 
  padding: 2rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.content-card:hover {
  border-color: rgba(201,168,76,0.45);
  box-shadow: 0 8px 40px rgba(0,0,0,0.07);
  transform: translateY(-3px);
}

.content-card-img {
  width: 100%; 
  aspect-ratio: 4/3;
  background: var(--emerald-mid); 
  overflow: hidden; 
  margin-bottom: 1.5rem;
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.content-card-label {
  font-family: 'Cinzel', serif; 
  font-size: 0.6rem;
  letter-spacing: 0.3em; 
  color: var(--gold); 
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.content-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem; 
  font-weight: 600;
  color: var(--emerald-deep); 
  line-height: 1.3; 
  margin-bottom: 0.5rem;
}

.content-card-body {
  font-size: 0.95rem; 
  color: var(--text-mid);
  font-style: italic; 
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════════
   IMAGE PLACEHOLDER
   ══════════════════════════════════════════════════════════════════ */

.img-placeholder {
  width: 100%; 
  height: 100%;
  background: var(--emerald-mid);
  display: flex; 
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  gap: 0.75rem; 
  min-height: 200px;
}

.img-placeholder-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; 
  font-size: 0.85rem;
  color: rgba(201,168,76,0.35);
  letter-spacing: 0.1em;
}

/* ══════════════════════════════════════════════════════════════════
   MARQUEE
   ══════════════════════════════════════════════════════════════════ */

.marquee-section {
  background: var(--gold);
  padding: 1rem 0; 
  overflow: hidden;
}

.marquee-track {
  display: flex; 
  gap: 3rem;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

.marquee-track span {
  font-family: 'Cinzel', serif; 
  font-size: 0.7rem;
  letter-spacing: 0.3em; 
  text-transform: uppercase;
  color: var(--emerald-deep); 
  flex-shrink: 0;
}

.marquee-dot { 
  color: var(--emerald-mid); 
  opacity: 0.5; 
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */

footer {
  background: #060f08;
  padding: 4rem 5rem 2rem;
}

.footer-brand-section {
  max-width: 1400px;
  margin: 0 auto 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(201,168,76,0.1);
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
}

.footer-brand .brand-name {
  font-family: 'Cinzel', serif; 
  font-size: 1rem;
  letter-spacing: 0.2em; 
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

.footer-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
  opacity: 0.95;
}

.footer-brand .brand-tagline {
  font-family: 'Amiri', serif; 
  font-size: 0.85rem;
  color: rgba(201,168,76,0.4); 
  font-style: italic;
  margin-bottom: 1.2rem; 
  line-height: 1.6;
}

.footer-social {
  display: flex; 
  gap: 0.8rem;
}

.social-icon {
  width: 36px; 
  height: 36px;
  border: 1px solid rgba(201,168,76,0.2);
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: rgba(201,168,76,0.5); 
  text-decoration: none;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.social-icon:hover {
  border-color: var(--gold); 
  color: var(--gold);
  background: rgba(201,168,76,0.08);
}

.footer-col h4 {
  font-family: 'Cinzel', serif; 
  font-size: 0.7rem;
  letter-spacing: 0.25em; 
  text-transform: uppercase;
  color: var(--gold); 
  margin-bottom: 1.4rem;
  font-weight: 600;
}

.footer-col ul { 
  list-style: none; 
  display: flex; 
  flex-direction: column; 
  gap: 0.6rem; 
}

.footer-col ul a {
  font-size: 0.92rem; 
  color: rgba(245,232,192,0.5);
  text-decoration: none; 
  font-style: italic;
  transition: color 0.3s;
  line-height: 1.4;
}

.footer-col ul a:hover { 
  color: var(--gold-light); 
}

.footer-bottom {
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  flex-wrap: wrap; 
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.78rem; 
  color: rgba(245,232,192,0.25);
  font-style: italic;
}

.footer-bottom-links {
  display: flex; 
  gap: 1.5rem; 
  list-style: none;
}

.footer-bottom-links a {
  font-size: 0.72rem; 
  color: rgba(245,232,192,0.25);
  text-decoration: none; 
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.footer-bottom-links a:hover { 
  color: var(--gold); 
}

/* ══════════════════════════════════════════════════════════════════
   HOMEPAGE-SPECIFIC STYLES
   (These remain for index.html compatibility)
   ══════════════════════════════════════════════════════════════════ */

/* ── HERO ── */
#hero {
  position: relative; 
  height: 100vh; 
  min-height: 640px;
  display: flex; 
  align-items: center; 
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #081d15 0%, #0d2e1f 25%, #0a2719 50%, #0d2e1f 75%, #081d15 100%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#geo-canvas {
  position: absolute; 
  inset: 0;
  width: 100%; 
  height: 100%;
  opacity: 0.8;
}

.hero-overlay {
  position: absolute; 
  inset: 0;
  background: 
    radial-gradient(ellipse 800px 400px at 50% 20%, rgba(201,168,76,0.03) 0%, transparent 50%),
    radial-gradient(ellipse 600px 300px at 30% 70%, rgba(201,168,76,0.02) 0%, transparent 50%),
    radial-gradient(ellipse 600px 300px at 80% 80%, rgba(201,168,76,0.025) 0%, transparent 50%),
    radial-gradient(ellipse at center, rgba(13,43,31,0.4) 0%, rgba(13,43,31,0.75) 70%, rgba(13,43,31,0.95) 100%);
}

.hero-content {
  position: relative; 
  z-index: 2;
  text-align: center; 
  padding: 0 2rem;
  max-width: 860px;
}

.hero-bismillah {
  font-family: 'Amiri', serif; 
  font-size: 2.2rem;
  color: var(--gold); 
  letter-spacing: 0.1em;
  margin-bottom: 1.4rem;
  opacity: 0; 
  transform: translateY(20px);
  animation: fadeUp 1s ease 0.3s forwards;
}

.hero-divider {
  display: flex; 
  align-items: center; 
  gap: 1rem;
  justify-content: center; 
  margin-bottom: 1.8rem;
  opacity: 0; 
  animation: fadeUp 1s ease 0.6s forwards;
}

.hero-divider span {
  display: inline-block; 
  height: 1px;
  width: 80px; 
  background: var(--gold); 
  opacity: 0.5;
}

.hero-divider .diamond {
  width: 6px; 
  height: 6px;
  background: var(--gold); 
  transform: rotate(45deg);
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 600; 
  line-height: 1.15;
  color: var(--ivory);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  opacity: 0; 
  animation: fadeUp 1s ease 0.8s forwards;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 4px 12px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
}

.hero-title em {
  font-style: normal; 
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-style: italic; 
  font-weight: 300;
  color: rgba(245,232,192,0.7);
  letter-spacing: 0.06em;
  margin-bottom: 2.8rem;
  opacity: 0; 
  animation: fadeUp 1s ease 1s forwards;
}

.hero-actions {
  display: flex; 
  gap: 1.2rem; 
  justify-content: center; 
  flex-wrap: wrap;
  opacity: 0; 
  animation: fadeUp 1s ease 1.2s forwards;
}

.hero-scroll {
  position: absolute; 
  bottom: 2.5rem; 
  left: 50%;
  transform: translateX(-50%);
  display: flex; 
  flex-direction: column;
  align-items: center; 
  gap: 0.5rem;
  opacity: 0; 
  animation: fadeUp 1s ease 1.8s forwards;
  cursor: pointer;
}

.hero-scroll span {
  font-family: 'Cinzel', serif; 
  font-size: 0.6rem;
  letter-spacing: 0.3em; 
  color: rgba(201,168,76,0.5);
  text-transform: uppercase;
}

.scroll-line {
  width: 1px; 
  height: 50px;
  background: linear-gradient(to bottom, rgba(201,168,76,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── ABOUT ── */
#about {
  background: var(--ivory);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem; 
  align-items: center;
  padding: 7rem 7rem;
}

.about-visual {
  position: relative;
}

.about-frame {
  width: 100%; 
  aspect-ratio: 3/4;
  background: var(--emerald-mid);
  position: relative; 
  overflow: hidden;
}

.about-frame::before {
  content: '';
  position: absolute; 
  inset: 0;
  background: 
    repeating-linear-gradient(60deg, transparent, transparent 14px, rgba(201,168,76,0.04) 14px, rgba(201,168,76,0.04) 15px),
    repeating-linear-gradient(-60deg, transparent, transparent 14px, rgba(201,168,76,0.04) 14px, rgba(201,168,76,0.04) 15px);
}

.about-frame-inner {
  position: absolute; 
  inset: 0;
  display: flex; 
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  gap: 1rem; 
  padding: 2rem;
}

.about-placeholder-icon {
  width: 80px; 
  height: 80px; 
  opacity: 0.3;
}

.about-placeholder-text {
  font-family: 'Amiri', serif; 
  font-size: 1.1rem;
  color: rgba(201,168,76,0.4); 
  text-align: center;
  font-style: italic;
}

.about-gold-border {
  position: absolute; 
  top: 1.5rem; 
  left: 1.5rem;
  right: -1.5rem; 
  bottom: -1.5rem;
  border: 1px solid rgba(201,168,76,0.35);
  pointer-events: none; 
  z-index: -1;
}

.about-badge {
  position: absolute; 
  bottom: -2rem; 
  right: -2rem;
  width: 110px; 
  height: 110px;
  background: var(--gold);
  display: flex; 
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  text-align: center;
}

.about-badge .num {
  font-family: 'Cinzel', serif; 
  font-size: 1.8rem;
  font-weight: 700; 
  color: var(--emerald-deep);
  line-height: 1;
}

.about-badge .lbl {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.65rem; 
  color: var(--emerald-deep);
  letter-spacing: 0.1em; 
  line-height: 1.3;
}

.about-text { 
  display: flex; 
  flex-direction: column; 
  gap: 1.5rem; 
}

.about-stats {
  display: grid; 
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem; 
  margin-top: 1rem;
}

.stat-card {
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
}

.stat-card .stat-num {
  font-family: 'Cinzel', serif; 
  font-size: 1.8rem;
  color: var(--emerald-mid); 
  font-weight: 700;
}

.stat-card .stat-lbl {
  font-size: 0.82rem; 
  color: var(--text-mid);
  letter-spacing: 0.05em; 
  font-style: italic;
}

/* ── COLLECTIONS ── */
#collections {
  background: var(--emerald-deep);
  padding: 7rem 3rem;
  position: relative; 
  overflow: hidden;
}

#collections::before {
  content: '';
  position: absolute; 
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 30px, rgba(201,168,76,0.02) 30px, rgba(201,168,76,0.02) 31px),
    repeating-linear-gradient(-45deg, transparent, transparent 30px, rgba(201,168,76,0.02) 30px, rgba(201,168,76,0.02) 31px);
}

#collections .section-title { 
  color: var(--ivory); 
}

#collections .section-label { 
  color: var(--gold); 
}

#collections .section-body { 
  color: rgba(245,232,192,0.65); 
}

.collections-header {
  text-align: center; 
  max-width: 680px;
  margin: 0 auto 4.5rem;
}

.collections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px; 
  max-width: 1200px; 
  margin: 0 auto;
}

.collection-card {
  position: relative; 
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--emerald-mid);
  cursor: pointer;
}

.collection-card-bg {
  position: absolute; 
  inset: 0;
  background: linear-gradient(135deg, var(--emerald-mid) 0%, var(--emerald-deep) 100%);
  transition: transform 0.7s ease;
}

.collection-card:hover .collection-card-bg { 
  transform: scale(1.05); 
}

.collection-pattern {
  position: absolute; 
  inset: 0; 
  opacity: 0.06;
}

.collection-card-content {
  position: absolute; 
  inset: 0;
  display: flex; 
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}

.collection-num {
  font-family: 'Cinzel', serif; 
  font-size: 0.65rem;
  letter-spacing: 0.35em; 
  color: var(--gold);
  margin-bottom: 0.75rem; 
  display: block;
}

.collection-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 400; 
  color: var(--ivory);
  line-height: 1.2; 
  margin-bottom: 0.6rem;
}

.collection-desc {
  font-size: 0.92rem; 
  color: rgba(245,232,192,0.6);
  line-height: 1.6; 
  font-style: italic;
  margin-bottom: 1.4rem;
  max-height: 0; 
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
}

.collection-card:hover .collection-desc {
  max-height: 100px; 
  opacity: 1;
}

.collection-link {
  display: inline-flex; 
  align-items: center; 
  gap: 0.5rem;
  font-family: 'Cinzel', serif; 
  font-size: 0.68rem;
  letter-spacing: 0.2em; 
  text-transform: uppercase;
  color: var(--gold); 
  text-decoration: none;
  transition: gap 0.3s ease;
}

.collection-link:hover { 
  gap: 0.9rem; 
}

.collection-link svg { 
  transition: transform 0.3s ease; 
}

.collection-link:hover svg { 
  transform: translateX(4px); 
}

/* ── QUOTE ── */
#quote {
  background: var(--ivory-warm);
  padding: 7rem 3rem;
  text-align: center; 
  position: relative;
}

#quote::before, #quote::after {
  content: '';
  position: absolute; 
  left: 50%;
  transform: translateX(-50%);
  width: 1px; 
  background: rgba(201,168,76,0.3);
}

#quote::before { 
  top: 0; 
  height: 3rem; 
}

#quote::after  { 
  bottom: 0; 
  height: 3rem; 
}

.quote-arabic {
  font-family: 'Amiri', serif; 
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--emerald-mid); 
  line-height: 2;
  margin-bottom: 1.5rem; 
  direction: rtl;
}

.quote-english {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-style: italic; 
  font-weight: 300;
  color: var(--text-mid); 
  max-width: 600px;
  margin: 0 auto 1rem;
}

.quote-source {
  font-family: 'Cinzel', serif; 
  font-size: 0.7rem;
  letter-spacing: 0.25em; 
  color: var(--gold);
  text-transform: uppercase;
}

/* ── EVENTS ── */
#events {
  background: var(--ivory);
  padding: 7rem 7rem;
}

.events-header {
  display: flex; 
  justify-content: space-between;
  align-items: flex-end; 
  margin-bottom: 3.5rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Homepage events grid (on index.php) */
.homepage-events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Visit section grid */
.visit-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* About page grids */
.about-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

/* Media page grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

/* Publications page grids */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
}

.publications-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.publication-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  padding: 2rem;
  background: var(--ivory);
  border-radius: 3px;
  align-items: start;
}

/* Contact page grids */
.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.contact-info-grid {
  display: grid;
  gap: 1.5rem;
}

/* Support page grids */
.donation-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.donation-amounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.donation-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.donation-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.donation-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Collections page grid */
.collections-intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* Education page grid */
.education-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.event-card {
  border: 1px solid rgba(201,168,76,0.2);
  padding: 2rem;
  position: relative; 
  overflow: hidden;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  background: white;
}

.event-card::before {
  content: '';
  position: absolute; 
  inset: 0;
  background: linear-gradient(135deg, rgba(45,110,78,0.03), transparent);
  opacity: 0; 
  transition: opacity 0.4s ease;
}

.event-card:hover { 
  border-color: rgba(201,168,76,0.5); 
  box-shadow: 0 8px 40px rgba(0,0,0,0.07); 
}

.event-card:hover::before { 
  opacity: 1; 
}

.event-date-badge {
  display: inline-flex; 
  flex-direction: column;
  align-items: center;
  background: var(--emerald-deep);
  color: var(--gold); 
  padding: 0.7rem 1rem;
  margin-bottom: 1.2rem; 
  min-width: 60px;
}

.event-date-badge .day {
  font-family: 'Cinzel', serif; 
  font-size: 1.5rem;
  font-weight: 700; 
  line-height: 1;
}

.event-date-badge .month {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem; 
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.event-type {
  font-family: 'Cinzel', serif; 
  font-size: 0.6rem;
  letter-spacing: 0.3em; 
  text-transform: uppercase;
  color: var(--gold); 
  margin-bottom: 0.5rem;
}

.event-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem; 
  font-weight: 600;
  color: var(--emerald-deep); 
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.event-meta {
  font-size: 0.82rem; 
  color: var(--text-mid);
  font-style: italic; 
  display: flex;
  align-items: center; 
  gap: 0.4rem;
}

.event-empty {
  grid-column: 1 / -1; 
  text-align: center;
  padding: 4rem; 
  border: 1px dashed rgba(201,168,76,0.25);
}

.event-empty p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; 
  font-style: italic;
  color: var(--text-mid); 
  opacity: 0.6;
}

/* ── VISIT ── */
#visit {
  background: var(--emerald-deep);
  display: grid; 
  grid-template-columns: 1fr 1fr;
  padding: 0;
}

.visit-info {
  padding: 6rem 5rem;
  display: flex; 
  flex-direction: column; 
  gap: 2rem;
}

.visit-map-placeholder {
  background: var(--emerald-mid);
  display: flex; 
  align-items: center; 
  justify-content: center;
  flex-direction: column; 
  gap: 1rem;
  min-height: 500px; 
  position: relative; 
  overflow: hidden;
}

.visit-map-placeholder::before {
  content: '';
  position: absolute; 
  inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 20px,
    rgba(201,168,76,0.03) 20px, rgba(201,168,76,0.03) 21px
  );
}

.map-pin-icon {
  width: 48px; 
  height: 48px; 
  color: var(--gold); 
  opacity: 0.5;
}

.map-placeholder-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; 
  color: rgba(201,168,76,0.4);
  font-size: 1rem;
}

#visit .section-label { 
  color: var(--gold); 
}

#visit .section-title { 
  color: var(--ivory); 
}

.visit-detail {
  display: flex; 
  gap: 1rem; 
  align-items: flex-start;
}

.visit-detail-icon {
  width: 36px; 
  height: 36px; 
  flex-shrink: 0;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.25);
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: var(--gold);
}

.visit-detail-text .vd-label {
  font-family: 'Cinzel', serif; 
  font-size: 0.65rem;
  letter-spacing: 0.25em; 
  text-transform: uppercase;
  color: var(--gold); 
  margin-bottom: 0.2rem;
}

.visit-detail-text .vd-value {
  font-size: 0.95rem; 
  color: rgba(245,232,192,0.75);
  font-style: italic; 
  line-height: 1.5;
}

.visit-detail-text .vd-value a {
  color: rgba(245,232,192,0.75);
  text-decoration: none;
  transition: color 0.3s;
}

.visit-detail-text .vd-value a:hover {
  color: var(--gold-light);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE - TABLET (768px)
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  nav {
    padding: 1rem 2rem;
  }
  
  nav.scrolled {
    padding: 0.7rem 2rem;
  }

  .nav-logo-img {
    height: 34px;
  }

  .nav-logo .logo-main {
    font-size: 0.95rem;
    letter-spacing: 0.12em;
  }

  .nav-logo .logo-sub {
    font-size: 0.5rem;
    letter-spacing: 0.15em;
  }

  .nav-links {
    display: none;
  }

  .nav-links.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 43, 31, 0.98);
    backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    gap: 1.8rem;
    padding: 6rem 2rem 3rem;
    z-index: 1001;
    overflow-y: auto;
  }

  .nav-links.mobile-open li {
    width: 100%;
    text-align: center;
  }

  .nav-links.mobile-open a {
    display: block;
    font-size: 1.1rem !important;
    padding: 0.9rem 1rem !important;
    color: rgba(245,232,192,0.95) !important;
    width: 100%;
  }

  nav.menu-open {
    background: transparent;
  }

  .hamburger {
    display: flex;
  }

  footer {
    padding: 3.5rem 2rem 2rem;
  }

  .footer-brand-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-col {
    min-width: 0;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.2rem;
  }
  
  nav.scrolled {
    padding: 0.7rem 1.2rem;
  }

  .nav-logo-img {
    height: 32px;
  }

  .nav-logo-text {
    gap: 0.2rem;
  }

  .nav-logo .logo-main {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
  }

  .nav-logo .logo-sub {
    font-size: 0.55rem;
    letter-spacing: 0.15em;
  }

  .nav-links {
    display: none;
  }

  .nav-links.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 43, 31, 0.98);
    backdrop-filter: blur(20px);
    justify-content: center;
    align-items: center;
    gap: 1.8rem;
    padding: 6rem 2rem 3rem;
    z-index: 1001;
    overflow-y: auto;
  }

  .nav-links.mobile-open li {
    width: 100%;
    text-align: center;
  }

  .nav-links.mobile-open a {
    display: block;
    font-size: 1.1rem !important;
    padding: 0.9rem 1rem !important;
    color: rgba(245,232,192,0.95) !important;
    width: 100%;
  }

  nav.menu-open {
    background: transparent;
  }

  .hamburger {
    display: flex;
  }

  section {
    padding: 4rem 1.2rem;
  }

  .section-standard {
    padding: 4rem 1.2rem;
  }

  .page-hero {
    padding: 8rem 1.2rem 3rem;
  }

  .page-hero .section-title {
    font-size: clamp(2rem, 4vw, 3rem);
  }

  .section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }

  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .card-grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  #about {
    grid-template-columns: 1fr;
    padding: 4rem 1.2rem;
    gap: 2.5rem;
  }

  .about-visual {
    order: -1;
  }

  .about-frame {
    aspect-ratio: 4/3;
  }

  .about-badge {
    width: 90px;
    height: 90px;
    bottom: -1.5rem;
    right: -1.5rem;
  }

  .about-badge .num {
    font-size: 1.5rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  #collections {
    padding: 4rem 1.2rem;
  }

  .collections-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .collection-card {
    aspect-ratio: 3/4;
  }

  #quote {
    padding: 4rem 1.2rem;
  }

  .quote-arabic {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  }

  .quote-english {
    font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  }

  #events {
    padding: 4rem 1.2rem;
  }

  .events-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .homepage-events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .visit-section-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-intro-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }

  .publications-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
  }

  .publication-item {
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .contact-form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .donation-info-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .donation-amounts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .donation-types-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .donation-form-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .donation-form-row-2 {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .collections-intro-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .education-intro-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  #visit {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .visit-info {
    padding: 3rem 1.2rem;
  }

  .visit-map-placeholder {
    min-height: 250px;
  }

  footer {
    padding: 3rem 1.5rem 2rem;
  }

  .footer-brand-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
  }

  .footer-logo {
    height: 60px;
    margin-bottom: 1rem;
  }

  .footer-col h4 {
    font-size: 0.65rem;
    margin-bottom: 1rem;
  }

  .footer-col ul a {
    font-size: 0.88rem;
  }

  #hero {
    min-height: 500px;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .hero-bismillah {
    font-size: 1.5rem;
  }

  .hero-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  }

  .hero-actions {
    gap: 0.8rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE - MOBILE (640px)
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  nav {
    padding: 0.9rem 1rem;
  }

  nav.scrolled {
    padding: 0.6rem 1rem;
  }

  .nav-logo-img {
    height: 28px;
  }

  .nav-logo .logo-main {
    font-size: 0.8rem;
  }

  .nav-logo .logo-sub {
    font-size: 0.5rem;
  }

  section {
    padding: 3rem 1rem;
  }

  .section-standard {
    padding: 3rem 1rem;
  }

  .section-label {
    font-size: 0.6rem;
    margin-bottom: 0.8rem;
  }

  .section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 1.5rem;
  }

  .page-hero {
    padding: 7rem 1rem 2.5rem;
  }

  .page-hero .section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  }

  .card-grid-3,
  .card-grid-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #about {
    padding: 3rem 1rem;
    gap: 2rem;
  }

  .about-badge {
    width: 80px;
    height: 80px;
    bottom: -1rem;
    right: -1rem;
  }

  .about-badge .num {
    font-size: 1.2rem;
  }

  .about-badge .lbl {
    font-size: 0.55rem;
  }

  #collections {
    padding: 3rem 1rem;
  }

  .collections-header {
    margin-bottom: 2.5rem;
  }

  .collection-card {
    aspect-ratio: 2.5/4;
  }

  .collection-name {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
  }

  #quote {
    padding: 3rem 1rem;
  }

  .quote-arabic {
    font-size: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.8;
    margin-bottom: 1rem;
  }

  #events {
    padding: 3rem 1rem;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .homepage-events-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .visit-section-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-intro-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .values-grid,
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .media-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .publications-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .publication-item {
    grid-template-columns: 80px 1fr;
    gap: 1.2rem;
    padding: 1.2rem;
  }

  .donation-amounts-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .event-card {
    padding: 1.5rem;
  }

  .event-title {
    font-size: 1.1rem;
  }

  .event-meta {
    font-size: 0.75rem;
  }

  #visit {
    padding: 3rem 1rem;
  }

  .visit-info {
    padding: 2.5rem 1rem;
  }

  .visit-map-placeholder {
    min-height: 200px;
  }

  footer {
    padding: 2.5rem 1rem 1.5rem;
  }

  .footer-brand-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-brand {
    padding-bottom: 1rem;
  }

  .footer-logo {
    height: 50px;
    margin-bottom: 0.8rem;
  }

  .footer-brand .brand-name {
    font-size: 0.9rem;
  }

  .footer-brand .brand-tagline {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .footer-col h4 {
    font-size: 0.65rem;
    margin-bottom: 0.55rem;
    line-height: 1.15;
  }

  .footer-col ul {
    gap: 0.35rem;
  }

  .footer-col ul a {
    font-size: 0.85rem;
    line-height: 1.2;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.55rem;
  }

  .footer-bottom p {
    font-size: 0.7rem;
  }

  .footer-bottom-links {
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-bottom-links a {
    font-size: 0.65rem;
  }

  #hero {
    min-height: 450px;
  }

  .hero-bismillah {
    font-size: 1.2rem;
  }

  .hero-title {
    font-size: clamp(1.3rem, 3.5vw, 2rem);
  }

  .hero-subtitle {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    margin-bottom: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.8rem;
  }

  .btn-primary,
  .btn-outline {
    font-size: 0.7rem;
    padding: 0.8rem 1.8rem;
    width: 100%;
  }

  .page-hero-sub {
    font-size: 1rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE - SMALL MOBILE (480px)
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  nav {
    padding: 0.8rem 0.8rem;
  }

  nav.scrolled {
    padding: 0.6rem 0.8rem;
  }

  .nav-logo {
    gap: 0.5rem;
  }

  .nav-logo-img {
    height: 24px;
  }

  .nav-logo .logo-main {
    font-size: 0.7rem;
  }

  .nav-logo .logo-sub {
    display: none;
  }

  .hamburger {
    padding: 2px;
    width: 36px;
    height: 36px;
  }

  .hamburger span {
    width: 20px;
    height: 1.2px;
  }

  section {
    padding: 2.5rem 0.8rem;
  }

  .section-standard {
    padding: 2.5rem 0.8rem;
  }

  .section-label {
    font-size: 0.55rem;
  }

  .section-title {
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    margin-bottom: 1.2rem;
  }

  .page-hero {
    padding: 6.5rem 0.8rem 2rem;
  }

  .ornament-divider {
    gap: 0.8rem;
  }

  .ornament-divider .line {
    max-width: 80px;
  }

  #about {
    padding: 2.5rem 0.8rem;
  }

  .about-badge {
    width: 70px;
    height: 70px;
    bottom: -0.8rem;
    right: -0.8rem;
  }

  .about-badge .num {
    font-size: 1rem;
  }

  .about-badge .lbl {
    font-size: 0.5rem;
  }

  #collections {
    padding: 2.5rem 0.8rem;
  }

  .collections-header {
    margin-bottom: 2rem;
    max-width: 100%;
  }

  .collection-name {
    font-size: clamp(0.95rem, 1.8vw, 1.4rem);
  }

  #quote {
    padding: 2.5rem 0.8rem;
  }

  .quote-arabic {
    font-size: clamp(0.9rem, 1.8vw, 1.4rem);
    line-height: 1.6;
  }

  #events {
    padding: 2.5rem 0.8rem;
  }

  .homepage-events-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .publication-item {
    grid-template-columns: 70px 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .event-card {
    padding: 1.2rem;
  }

  .event-date-badge {
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
  }

  .event-title {
    font-size: 1rem;
  }

  #visit {
    padding: 2.5rem 0.8rem;
  }

  .visit-info {
    padding: 2rem 0.8rem;
  }

  footer {
    padding: 2rem 0.8rem 1.2rem;
  }

  .footer-brand-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-brand {
    padding-bottom: 0.8rem;
  }

  .footer-logo {
    height: 45px;
  }

  .footer-brand .brand-name {
    font-size: 0.85rem;
  }

  .footer-brand .brand-tagline {
    font-size: 0.75rem;
  }

  .social-icon {
    width: 30px;
    height: 30px;
  }

  .footer-col h4 {
    font-size: 0.55rem;
    margin-bottom: 0.45rem;
    line-height: 1.1;
  }

  .footer-col ul {
    gap: 0.28rem;
  }

  .footer-col ul a {
    font-size: 0.75rem;
    line-height: 1.15;
  }

  .footer-bottom {
    gap: 0.45rem;
  }

  .footer-bottom-links {
    gap: 0.55rem;
  }

  #hero {
    min-height: 400px;
  }

  .hero-bismillah {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .hero-divider {
    margin-bottom: 1.2rem;
  }

  .hero-divider span {
    width: 50px;
  }

  .hero-title {
    font-size: clamp(1.1rem, 3vw, 1.8rem);
  }

  .hero-subtitle {
    font-size: clamp(0.8rem, 1.3vw, 0.95rem);
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    gap: 0.6rem;
  }

  .btn-primary,
  .btn-outline {
    font-size: 0.65rem;
    padding: 0.7rem 1.4rem;
  }

  .btn-primary span {
    font-size: 0.65rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
   TOUCH & MOBILE OPTIMIZATIONS
   ══════════════════════════════════════════════════════════════════ */

@media (hover: none) and (pointer: coarse) {
  /* Touch devices - optimize for touch */
  a, button, .btn-primary, .btn-outline, .filter-pill, .social-icon {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hamburger {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Prevent text selection on buttons */
button, .btn-primary, .btn-outline, .hamburger {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ══════════════════════════════════════════════════════════════════
   LIGHTBOX MODAL
   ══════════════════════════════════════════════════════════════════ */

#fatwa-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.lightbox-controls {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 1rem 2rem;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  z-index: 10001;
}

.lightbox-controls button {
  background: var(--gold);
  color: var(--emerald-deep);
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.lightbox-controls button:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

#lightbox-count {
  color: white;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  min-width: 80px;
  text-align: center;
}