/* ========================================================
   ALHABSYI.ORG - LUXURY ISLAMIC HERITAGE STYLESHEET
   Deep Emerald, Royal Gold Metallic & Glassmorphism Design
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cinzel:wght@400;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Reem+Kufi:wght@500;600;700&display=swap');

:root {
  --bg-deep: #03120c;
  --bg-card: rgba(6, 25, 18, 0.85);
  --bg-card-hover: rgba(9, 36, 26, 0.95);
  --emerald-primary: #0a3d2c;
  --emerald-light: #125e44;
  --gold-primary: #d4af37;
  --gold-light: #f6e6b4;
  --gold-dark: #996515;
  --gold-gradient: linear-gradient(135deg, #fceec5 0%, #d4af37 50%, #8c5b10 100%);
  --gold-border: rgba(212, 175, 55, 0.35);
  --gold-glow: 0 0 25px rgba(212, 175, 55, 0.25);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-gold: #f3e5ab;
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-arabic: 'Amiri', 'Traditional Arabic', serif;
  --font-kufi: 'Reem Kufi', sans-serif;
}

/* Base Reset & Setup */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(18, 94, 68, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 100% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(10, 61, 44, 0.3) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4af37' fill-opacity='0.025'%3E%3Cpath d='M40 0l40 40-40 40L0 40zM40 10L10 40l30 30 30-30z'/%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

/* Typography Classes */
.font-brand {
  font-family: var(--font-serif);
}

.font-arabic {
  font-family: var(--font-arabic);
}

.font-kufi {
  font-family: var(--font-kufi);
}

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

.text-gold-light {
  color: var(--gold-light);
}

.gold-gradient-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gold-border {
  border-color: var(--gold-border);
}

/* Glassmorphism & Islamic Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gold-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), var(--gold-glow);
}

.card-figure {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.card-figure::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gold-gradient);
  opacity: 0.7;
}

/* Three.js 3D Hero Canvas Container */
#hero-3d-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.hero-overlay a, 
.hero-overlay button, 
.hero-overlay input {
  pointer-events: auto;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 35%, var(--bg-deep) 90%),
              linear-gradient(to top, var(--bg-deep) 5%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Rub el Hizb & Islamic Ornaments */
.rub-el-hizb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 28px;
  height: 28px;
  color: var(--gold-primary);
}

/* Glowing Pulsing Aura */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

/* Timeline & Lineage Node */
.lineage-step {
  position: relative;
}

.lineage-step::before {
  content: '';
  position: absolute;
  top: 36px;
  bottom: -20px;
  left: 20px;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold-primary), transparent);
}

[dir="rtl"] .lineage-step::before {
  left: auto;
  right: 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #020c08;
}

::-webkit-scrollbar-thumb {
  background: #0d4330;
  border: 1px solid var(--gold-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* Buttons with Luxury Islamic Polish */
.btn-gold {
  background: var(--gold-gradient);
  color: #04140e;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.85rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: none;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.55);
  color: #020a07;
}

.btn-outline-gold {
  background: rgba(10, 36, 26, 0.5);
  color: var(--gold-light);
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.85rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--gold-border);
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Ambient Audio Waves Animation */
.sound-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.sound-wave span {
  display: block;
  width: 3px;
  background: var(--gold-primary);
  border-radius: 2px;
  animation: soundBounce 1.2s infinite ease-in-out;
}

.sound-wave span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.sound-wave span:nth-child(2) { height: 14px; animation-delay: 0.3s; }
.sound-wave span:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.sound-wave span:nth-child(4) { height: 16px; animation-delay: 0.4s; }

.sound-wave.paused span {
  animation: none;
  height: 4px;
  opacity: 0.5;
}

@keyframes soundBounce {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

/* Calligraphic Header Accents */
.ornament-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}

.ornament-line {
  height: 1px;
  width: 45px;
  background: linear-gradient(to right, transparent, var(--gold-primary));
}

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