/*
Theme Name: MAG Arabic Grows
Theme URI: https://myarabicgrows.com
Author: MAG Arabic Grows
Author URI: https://myarabicgrows.com
Description: Modern Arabic Desert theme for MAG Arabic Grows — dark, elegant, with sand-gold tones, Arabic calligraphy accents, and desert dune aesthetics.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: mag-arabic-grows
Tags: arabic, desert, modern, dark, gold, landing-page, education
*/

:root {
  --sand: #C8A96E;
  --sand-light: #E8D5A3;
  --sand-pale: #F5EDD8;
  --dune: #8B6914;
  --desert-dark: #1A1208;
  --desert-mid: #2E1F0A;
  --night: #0D0A05;
  --gold: #D4A017;
  --gold-bright: #F0C040;
  --terracotta: #B55A2A;
  --cream: #FAF3E0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--cream);
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1000; opacity: 0.4;
}

/* NAV */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 4rem;
  background: linear-gradient(to bottom, rgba(13,10,5,0.95) 0%, transparent 100%);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(200,169,110,0.15);
  animation: fadeDown 1s ease both;
}
@keyframes fadeDown { from { opacity:0; transform:translateY(-20px) } to { opacity:1; transform:none } }

.site-branding a {
  font-family: 'Amiri', serif;
  font-size: 1.6rem;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
  text-decoration: none;
}
.site-branding .tagline {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  color: var(--sand-light); font-size: 0.75rem; display: block;
  letter-spacing: 0.2em; text-transform: uppercase; margin-top: -4px;
}

.main-navigation ul { display:flex; gap: 2.5rem; list-style: none; margin:0; padding:0; }
.main-navigation ul li { list-style: none; }
.main-navigation a {
  color: var(--sand-light); text-decoration: none; font-size: 0.82rem;
  letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600;
  position: relative; padding-bottom: 4px; transition: color 0.3s;
}
.main-navigation a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 100%;
  height: 1px; background: var(--gold); transition: right 0.3s;
}
.main-navigation a:hover { color: var(--gold-bright); }
.main-navigation a:hover::after { right: 0; }
.main-navigation a.nav-cta {
  background: linear-gradient(135deg, var(--gold) 0%, var(--dune) 100%);
  color: var(--night) !important; padding: 0.45rem 1.2rem;
  border-radius: 2px; font-weight: 600;
}
.main-navigation a.nav-cta::after { display: none; }
.main-navigation a.nav-cta:hover { opacity: 0.85; }

/* MOBILE TOGGLE */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none;
  border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--sand-light); border-radius: 2px; }

/* MOBILE MENU */
.mobile-menu {
  display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 800;
  background: rgba(13,10,5,0.98); border-bottom: 1px solid rgba(200,169,110,0.2);
  padding: 1.5rem 2rem; backdrop-filter: blur(8px);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin:0; padding:0; }
.mobile-menu ul li { border-bottom: 1px solid rgba(200,169,110,0.1); }
.mobile-menu ul li a { display: block; padding: 0.9rem 0; color: var(--sand-light); text-decoration: none; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; transition: color 0.2s; }
.mobile-menu ul li a:hover { color: var(--gold); }

/* HERO */
.hero-section {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(139,105,20,0.4) 0%, transparent 70%),
    linear-gradient(180deg, #0D0A05 0%, #1A1208 40%, #2E1F0A 70%, #3D2C0D 100%);
}
.hero-stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 15%, rgba(240,192,64,0.8) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 75% 8%, rgba(240,192,64,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 20%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(2px 2px at 50% 12%, rgba(255,255,230,0.9) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 18%, rgba(240,192,64,0.9) 0%, transparent 100%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.7 } to { opacity: 1 } }
.hero-moon {
  position: absolute; top: 8%; right: 12%;
  width: 80px; height: 80px; border-radius: 50%;
  box-shadow: -12px 0 0 6px rgba(240,192,64,0.9), -12px 0 30px 6px rgba(240,192,64,0.3);
  animation: moonGlow 3s ease-in-out infinite alternate;
}
@keyframes moonGlow { from { opacity:0.8 } to { box-shadow: -12px 0 0 6px rgba(240,192,64,1), -12px 0 50px 15px rgba(240,192,64,0.4); } }
.hero-dunes { position: absolute; bottom: 0; left: 0; right: 0; height: 55%; }
.hero-dune { position: absolute; bottom: 0; left: -5%; right: -5%; animation: duneShift 20s ease-in-out infinite alternate; }
.hero-dune:nth-child(2) { animation-duration: 25s; animation-delay: -5s; }
.hero-dune:nth-child(3) { animation-duration: 30s; animation-delay: -10s; }
@keyframes duneShift { from{transform:translateX(-1%)} to{transform:translateX(1%)} }
.hero-content {
  position: relative; z-index: 10; text-align: center; padding: 0 2rem;
  animation: heroReveal 1.2s cubic-bezier(0.16,1,0.3,1) 0.3s both;
}
@keyframes heroReveal { from{opacity:0;transform:translateY(40px)} to{opacity:1;transform:none} }
.hero-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1rem; color: var(--gold); letter-spacing: 0.4em;
  text-transform: uppercase; margin-bottom: 1.2rem;
}
.hero-arabic {
  font-family: 'Amiri', serif; font-size: clamp(3rem,8vw,7rem);
  color: var(--gold-bright); line-height: 1; margin-bottom: 0.5rem;
  text-shadow: 0 0 60px rgba(240,192,64,0.4);
}
.hero-title {
  font-family: 'Playfair Display', serif; font-size: clamp(2.5rem,6vw,5.5rem);
  font-weight: 900; color: var(--cream); line-height: 1.05; margin-bottom: 1.5rem;
}
.hero-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold) 0%, var(--sand-light) 50%, var(--gold) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub { font-size: 1.05rem; color: var(--sand-light); max-width: 520px; margin: 0 auto 2.5rem; line-height: 1.8; font-weight: 300; opacity: 0.85; }
.hero-btns { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }

/* BUTTONS */
.btn-primary, .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--dune) 100%);
  color: var(--night); text-decoration: none; padding: 0.9rem 2.5rem;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; border-radius: 2px; transition: all 0.3s;
  box-shadow: 0 8px 30px rgba(212,160,23,0.35); border: none; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(212,160,23,0.5); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent; color: var(--sand-light); text-decoration: none;
  padding: 0.9rem 2.5rem; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid rgba(200,169,110,0.4); border-radius: 2px; transition: all 0.3s;
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(212,160,23,0.07); }

/* SECTIONS */
.mag-section { padding: 6rem 4rem; }
.section-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 0.9rem;
  color: var(--gold); letter-spacing: 0.4em; text-transform: uppercase;
  margin-bottom: 0.8rem; display: block;
}
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(2rem,4vw,3.2rem); font-weight: 700; color: var(--cream); line-height: 1.15; margin-bottom: 1.5rem; }
.section-title em { font-style: italic; color: var(--gold); }

/* PROGRAMS GRID */
.programs-section { background: linear-gradient(180deg, var(--night) 0%, var(--desert-dark) 50%, var(--night) 100%); }
.programs-header { text-align: center; max-width: 600px; margin: 0 auto 4rem; }
.programs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; max-width: 1200px; margin: 0 auto; }
.program-card {
  position: relative; overflow: hidden; padding: 3rem 2.5rem;
  background: var(--desert-mid); border: 1px solid rgba(200,169,110,0.1); cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.program-card::before { content:''; position:absolute; inset:0; background: linear-gradient(135deg,rgba(212,160,23,0.08) 0%,transparent 60%); opacity:0; transition:opacity 0.4s; }
.program-card:hover { transform:translateY(-6px); border-color:rgba(200,169,110,0.4); z-index:2; }
.program-card:hover::before { opacity:1; }
.card-number { font-family:'Playfair Display',serif; font-size:4rem; font-weight:900; color:rgba(212,160,23,0.12); line-height:1; margin-bottom:1rem; }
.card-icon { font-family:'Amiri',serif; font-size:2.5rem; color:var(--gold); margin-bottom:1rem; display:block; }
.card-title { font-family:'Playfair Display',serif; font-size:1.6rem; font-weight:700; color:var(--cream); margin-bottom:0.3rem; }
.card-subtitle { font-family:'Cormorant Garamond',serif; font-style:italic; font-size:0.85rem; color:var(--gold); letter-spacing:0.15em; margin-bottom:1rem; display:block; }
.card-text { color:var(--sand-light); font-size:0.9rem; line-height:1.8; opacity:0.8; }
.card-link { display:inline-flex; align-items:center; gap:0.4rem; margin-top:1.5rem; color:var(--gold); font-size:0.78rem; font-weight:600; letter-spacing:0.2em; text-transform:uppercase; text-decoration:none; border-bottom:1px solid transparent; transition:border-color 0.3s, gap 0.3s; }
.card-link:hover { border-color:var(--gold); gap:0.7rem; }

/* GEO DIVIDER */
.geo-divider { padding:2rem 4rem; display:flex; align-items:center; gap:1.5rem; }
.geo-divider::before, .geo-divider::after { content:''; flex:1; height:1px; background:linear-gradient(to right,transparent,rgba(200,169,110,0.3),transparent); }
.geo-divider span { color:var(--gold); font-size:1rem; opacity:0.6; }

/* ABOUT */
.about-section { display:grid; grid-template-columns:1fr 1fr; gap:5rem; align-items:center; background:var(--desert-dark); }
.about-visual { position:relative; aspect-ratio:3/4; max-height:500px; }
.about-frame { width:100%; height:100%; border:1px solid rgba(200,169,110,0.3); position:relative; overflow:hidden; background:linear-gradient(135deg,var(--desert-mid) 0%,#1a1208 100%); }
.about-frame-deco { position:absolute; top:-1px; right:-1px; width:60px; height:60px; border-top:2px solid var(--gold); border-right:2px solid var(--gold); }
.about-frame-deco2 { position:absolute; bottom:-1px; left:-1px; width:60px; height:60px; border-bottom:2px solid var(--gold); border-left:2px solid var(--gold); }
.about-badge { position:absolute; bottom:-1.5rem; right:-1.5rem; width:100px; height:100px; background:linear-gradient(135deg,var(--gold) 0%,var(--dune) 100%); border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; font-family:'Playfair Display',serif; box-shadow:0 10px 30px rgba(212,160,23,0.4); }
.about-badge strong { font-size:1.6rem; color:var(--night); font-weight:900; line-height:1; }
.about-badge small { font-size:0.55rem; color:var(--desert-mid); letter-spacing:0.1em; text-transform:uppercase; font-family:'Nunito Sans',sans-serif; font-weight:600; }
.about-stats { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; margin-top:2.5rem; }
.stat { border-left:2px solid var(--gold); padding-left:1rem; }
.stat strong { display:block; font-family:'Playfair Display',serif; font-size:2rem; font-weight:900; color:var(--gold-bright); line-height:1; }
.stat span { font-size:0.78rem; color:var(--sand); letter-spacing:0.1em; text-transform:uppercase; }

/* CONTACT STRIP */
.contact-strip { background:linear-gradient(135deg,var(--dune) 0%,var(--desert-mid) 50%,var(--dune) 100%); padding:5rem 4rem; text-align:center; position:relative; overflow:hidden; }
.contact-strip h2 { font-family:'Playfair Display',serif; font-size:clamp(2rem,5vw,3.5rem); color:var(--cream); margin-bottom:1rem; }
.contact-strip p { color:var(--sand-light); margin-bottom:2rem; opacity:0.85; }

/* FOOTER */
.site-footer { background:var(--night); border-top:1px solid rgba(200,169,110,0.1); padding:4rem 4rem 2rem; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:3rem; margin-bottom:3rem; }
.footer-logo-text { font-family:'Amiri',serif; font-size:1.8rem; color:var(--gold-bright); margin-bottom:0.5rem; }
.footer-tagline { font-family:'Cormorant Garamond',serif; font-style:italic; font-size:0.9rem; color:var(--sand); margin-bottom:1rem; opacity:0.7; }
.footer-col h4 { font-family:'Playfair Display',serif; font-size:1rem; color:var(--cream); margin-bottom:1rem; font-weight:700; }
.footer-col ul { list-style:none; }
.footer-col ul li { margin-bottom:0.6rem; }
.footer-col ul li a { color:var(--sand); text-decoration:none; font-size:0.85rem; opacity:0.7; transition:opacity 0.2s, color 0.2s; }
.footer-col ul li a:hover { opacity:1; color:var(--gold); }
.footer-bottom { border-top:1px solid rgba(200,169,110,0.1); padding-top:2rem; display:flex; justify-content:space-between; align-items:center; }
.footer-bottom p { font-size:0.78rem; color:var(--sand); opacity:0.5; }

/* WordPress core compatibility */
.site { display:flex; flex-direction:column; min-height:100vh; }
.site-content { flex:1; padding-top:80px; }
img { max-width:100%; height:auto; }
a { color:var(--gold); }
p { line-height:1.8; margin-bottom:1em; }
h1,h2,h3,h4,h5,h6 { font-family:'Playfair Display',serif; color:var(--cream); }

/* WP Editor */
.entry-content { max-width:800px; margin:0 auto; padding:4rem 2rem; }
.entry-content p { color:var(--sand-light); }
.entry-content h2 { color:var(--gold-bright); margin-bottom:1rem; }

/* RESPONSIVE */
@media(max-width:900px){
  .site-header { padding:1rem 1.5rem; }
  .main-navigation { display:none; }
  .nav-toggle { display:flex; }
  .programs-grid, .about-section, .footer-grid { grid-template-columns:1fr; }
  .mag-section { padding:4rem 1.5rem; }
}

/* ═══════════════════════════════════════════════
   MAG CUSTOM NAV — overrides everything
   ═══════════════════════════════════════════════ */

/* Hide ALL old nav styles & plugin injections */
.main-navigation,
#site-navigation ul,
.woocommerce-cart-icon,
.cart-contents,
.site-header-cart,
.wpmenucart,
a[class*="cart"],
li[class*="cart"] {
  display: none !important;
}

/* LOGO */
.mag-logo-link {
  display: flex; align-items: center; gap: 0.8rem; text-decoration: none;
}
.mag-logo-img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(200,169,110,0.5), 0 4px 20px rgba(212,160,23,0.4), 0 8px 30px rgba(0,0,0,0.5);
}
.mag-logo-text-wrap {
  display: flex; flex-direction: column;
}
.mag-logo-initials {
  font-family: 'Amiri', serif;
  font-size: 1.5rem; color: var(--gold-bright);
  line-height: 1; letter-spacing: 0.05em;
}
.mag-logo-sub {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 0.7rem; color: var(--sand-light); letter-spacing: 0.18em;
  text-transform: uppercase; opacity: 0.75;
}

/* MAG CUSTOM NAV */
.mag-nav {
  display: flex !important;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
}
.mag-nav-link {
  color: var(--sand-light); text-decoration: none; font-size: 0.82rem;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  padding: 0.5rem 0.7rem; position: relative;
  transition: color 0.3s; white-space: nowrap;
}
.mag-nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 0.7rem; right: 100%;
  height: 1px; background: var(--gold); transition: right 0.3s;
}
.mag-nav-link:hover { color: var(--gold-bright); }
.mag-nav-link:hover::after { right: 0.7rem; }

/* Dropdown */
.mag-nav-dropdown { position: relative; }
.mag-dropdown-menu {
  position: absolute; top: calc(100% + 0.8rem); left: 0;
  background: rgba(13,10,5,0.97); border: 1px solid rgba(200,169,110,0.2);
  min-width: 140px; padding: 0.5rem 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all 0.25s; z-index: 999;
  backdrop-filter: blur(10px);
}
.mag-nav-dropdown:hover .mag-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mag-dropdown-menu a {
  display: block; padding: 0.7rem 1.2rem;
  color: var(--sand-light); text-decoration: none;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 600; transition: color 0.2s, background 0.2s;
}
.mag-dropdown-menu a:hover { color: var(--gold-bright); background: rgba(200,169,110,0.07); }
.mag-arrow { font-size: 0.65rem; opacity: 0.7; margin-left: 2px; }

/* Login CTA button */
.mag-nav-cta {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, var(--gold) 0%, var(--dune) 100%);
  color: var(--night) !important; text-decoration: none;
  padding: 0.45rem 1.2rem; font-size: 0.8rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: 2px; margin-left: 0.5rem;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 15px rgba(212,160,23,0.3);
}
.mag-nav-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* Mobile toggle */
.mag-nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.mag-nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--sand-light); border-radius: 2px; transition: all 0.3s;
}

/* Mobile nav drawer */
.mag-mobile-nav {
  display: none; position: fixed;
  top: 72px; left: 0; right: 0; z-index: 850;
  background: rgba(13,10,5,0.98);
  border-bottom: 1px solid rgba(200,169,110,0.2);
  backdrop-filter: blur(12px); padding: 1rem 0;
  flex-direction: column;
}
.mag-mobile-nav.open { display: flex; }
.mag-mobile-nav a {
  display: block; padding: 0.85rem 2rem;
  color: var(--sand-light); text-decoration: none;
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  border-bottom: 1px solid rgba(200,169,110,0.08);
  transition: color 0.2s, background 0.2s;
}
.mag-mobile-nav a:hover { color: var(--gold); background: rgba(200,169,110,0.05); }

/* ═══════════════════════════════════════════════
   HERO SPACING FIX — prevent text overlap
   ═══════════════════════════════════════════════ */
.hero-eyebrow {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 0.95rem; color: var(--gold); letter-spacing: 0.38em;
  text-transform: uppercase;
  margin-bottom: 2rem !important;  /* ← more gap below eyebrow */
  display: block; opacity: 0.9;
}
.hero-arabic {
  font-family: 'Amiri', serif;
  font-size: clamp(3.5rem, 9vw, 7.5rem) !important;
  color: var(--gold-bright); line-height: 1.1 !important;
  margin-bottom: 1.2rem !important;  /* ← gap between arabic & title */
  text-shadow: 0 0 60px rgba(240,192,64,0.4);
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 5.5rem) !important;
  font-weight: 900; color: var(--cream);
  line-height: 1.08 !important;
  margin-bottom: 1.8rem !important;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE UPDATES
   ═══════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .site-header { padding: 1rem 2rem; }
  .mag-nav { gap: 0; }
  .mag-nav-link { padding: 0.5rem 0.5rem; font-size: 0.75rem; }
}
@media (max-width: 900px) {
  .mag-nav { display: none !important; }
  .mag-nav-toggle { display: flex !important; }
}
