/*
Theme Name: ISRAND
Theme URI: https://isrand.org
Author: ISRAND DDT Division
Author URI: https://isrand.org
Description: Official theme for Ibn-e-Sina Research & Development Organisation. Trilingual (English, Dari, Pashto) with full RTL support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
Text Domain: isrand
*/

/* ============================================================
   DESIGN TOKENS
============================================================ */
:root {
  --navy:        #1a2d5a;
  --navy-deep:   #0d1a36;
  --navy-mid:    #2E5090;
  --gold:        #D4AF37;
  --gold-light:  #e8c84a;
  --gold-muted:  rgba(212,175,55,0.15);
  --cream:       #f5f0e8;
  --cream-dark:  #ece5d5;
  --text:        #1a1a2e;
  --text-light:  #4a5568;
  --white:       #ffffff;
  --border:      rgba(255,255,255,0.08);
  --border-gold: rgba(212,175,55,0.2);

  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:   'IBM Plex Mono', monospace;

  --radius-clip: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  --transition:  0.3s cubic-bezier(0.16,1,0.3,1);
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--navy-deep);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* RTL support for Dari & Pashto */
body.rtl,
html[dir="rtl"] body {
  direction: rtl;
  font-family: 'Noto Naskh Arabic', 'Noto Sans Arabic', var(--font-sans);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }

/* ============================================================
   TYPOGRAPHY
============================================================ */
h1 { font-family: var(--font-serif); font-size: clamp(2.4rem,5vw,4.2rem); font-weight: 900; line-height: 1.08; }
h2 { font-family: var(--font-serif); font-size: clamp(1.8rem,3vw,2.8rem); font-weight: 700; line-height: 1.15; }
h3 { font-family: var(--font-serif); font-size: clamp(1.2rem,2vw,1.6rem); font-weight: 700; line-height: 1.25; }
h4 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; line-height: 1.3; }
p  { line-height: 1.75; }

.text-gold    { color: var(--gold); }
.text-muted   { color: rgba(255,255,255,0.6); }
.text-navy    { color: var(--navy); }

/* ============================================================
   LAYOUT UTILITIES
============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
}
.container--wide  { max-width: 1400px; }
.container--narrow{ max-width: 800px; }

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

.flex       { display: flex; }
.flex-center{ display: flex; align-items: center; justify-content: center; }
.flex-between{display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.section        { padding-block: 6rem; }
.section--cream { background: var(--cream); color: var(--text); }
.section--navy  { background: var(--navy); }
.section--deep  { background: var(--navy-deep); }

/* ============================================================
   SECTION EYEBROW
============================================================ */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.eyebrow__line {
  width: 32px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.eyebrow__text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.section--cream .eyebrow__text { color: var(--navy-mid); }
.section--cream .eyebrow__line { background: var(--navy-mid); }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--gold);
  color: var(--navy-deep);
  clip-path: var(--radius-clip);
}
.btn--primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(212,175,55,0.3);
  color: var(--navy-deep);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }
.btn--outline-dark {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(26,45,90,0.3);
}
.btn--outline-dark:hover { border-color: var(--navy); background: var(--navy); color: var(--white); }

/* ============================================================
   CARDS
============================================================ */
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.card:hover { border-color: var(--border-gold); background: rgba(255,255,255,0.07); }
.card:hover::before { transform: scaleX(1); }

.card--cream {
  background: var(--white);
  border: 1px solid rgba(26,45,90,0.08);
}
.card--cream:hover { box-shadow: 0 8px 40px rgba(0,0,0,0.1); }

/* ============================================================
   STATUS BADGES
============================================================ */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
}
.badge--completed { background: rgba(46,80,144,0.12); color: var(--navy-mid); }
.badge--active    { background: rgba(212,175,55,0.15); color: #7a6000; }
.badge--upcoming  { background: rgba(255,255,255,0.1);  color: rgba(255,255,255,0.6); }

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gridScroll {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.1); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   SCROLLBAR
============================================================ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--navy-deep); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: 4rem; }
  h1 { font-size: clamp(2rem,8vw,2.8rem); }
  h2 { font-size: clamp(1.5rem,6vw,2rem); }
}
