/* ===========================
   GLOBAL CSS – ParaVolley Egypt
   =========================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Colors */
  --primary-bg: #FFF0F0;
  --white: #FFFFFF;
  --royal-blue: #C8102E;
  --royal-blue-dark: #8B0000;
  --royal-blue-light: #E8304A;
  --gold: #D4AF37;
  --gold-light: #f0d060;
  --gold-dark: #a88520;
  --dark: #1A1A2E;
  --dark-2: #2a2a4a;
  --text-muted: #7A4040;
  --text-body: #3D1A1A;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(200, 16, 46, 0.15);
  --shadow-sm: 0 2px 12px rgba(200, 16, 46, 0.08);
  --shadow-md: 0 8px 32px rgba(200, 16, 46, 0.12);
  --shadow-lg: 0 20px 60px rgba(200, 16, 46, 0.18);
  --shadow-gold: 0 0 30px rgba(212, 175, 55, 0.4);

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1280px;
  --container-pad: 0 24px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.2s ease;
  --trans-med: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-arabic: 'Cairo', 'Tajawal', sans-serif;
  --font-english: 'Inter', 'Outfit', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;
  --font-size-7xl: 4.5rem;
}

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

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

/* ---- RTL / LTR ---- */
body {
  background-color: var(--primary-bg);
  color: var(--text-body);
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  overflow-x: hidden;
}

body.lang-en {
  font-family: var(--font-english);
  direction: ltr;
  text-align: left;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

p { color: var(--text-body); }

a {
  text-decoration: none;
  color: inherit;
  transition: var(--trans-fast);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
}

/* ---- Container ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-pad);
  width: 100%;
}

/* ---- Section ---- */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--royal-blue), var(--gold));
  border-radius: 2px;
  margin: 12px auto 0;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  font-weight: 600;
  font-family: inherit;
  transition: var(--trans-med);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--royal-blue), var(--royal-blue-light));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(200, 16, 46, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200, 16, 46, 0.45);
  background: linear-gradient(135deg, var(--royal-blue-dark), var(--royal-blue));
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--dark);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--royal-blue);
  border-color: var(--royal-blue);
}

.btn-outline:hover {
  background: var(--royal-blue);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--royal-blue);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: 18px 44px;
  font-size: var(--font-size-lg);
}

/* ---- Glass Card ---- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--trans-med);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.badge-blue {
  background: rgba(200, 16, 46, 0.12);
  color: var(--royal-blue);
  border: 1px solid rgba(200, 16, 46, 0.2);
}

.badge-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-dark);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* ---- Gradient Text ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--royal-blue), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Wave Divider ---- */
.wave-divider {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--royal-blue) 0%, var(--royal-blue-dark) 50%, var(--dark) 100%);
  padding: 128px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero-title {
  font-size: var(--font-size-5xl);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
  position: relative;
}

.page-hero-subtitle {
  font-size: var(--font-size-xl);
  color: rgba(255, 255, 255, 0.8);
  position: relative;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
  position: relative;
}

.breadcrumb a { color: rgba(255, 255, 255, 0.8); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { color: rgba(255, 255, 255, 0.4); }

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children > *:nth-child(7) { transition-delay: 0.7s; }

/* ---- Grid Utilities ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }

/* ---- Flex Utilities ---- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-4 { gap: 16px; }
.gap-8 { gap: 32px; }

/* ---- Spacing Utilities ---- */
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mt-8 { margin-top: 32px; }
.mb-8 { margin-bottom: 32px; }

/* ---- Background Patterns ---- */
.bg-dots {
  background-image: radial-gradient(circle, rgba(0,87,184,0.08) 1px, transparent 1px);
  background-size: 30px 30px;
}

.bg-mesh {
  background: 
    linear-gradient(135deg, rgba(0,87,184,0.04) 25%, transparent 25%) -20px 0,
    linear-gradient(225deg, rgba(0,87,184,0.04) 25%, transparent 25%) -20px 0,
    linear-gradient(315deg, rgba(0,87,184,0.04) 25%, transparent 25%),
    linear-gradient(45deg, rgba(0,87,184,0.04) 25%, transparent 25%);
  background-size: 40px 40px;
  background-color: var(--primary-bg);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary-bg); }
::-webkit-scrollbar-thumb { background: var(--royal-blue); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--royal-blue-dark); }

/* ---- Selection ---- */
::selection { background: var(--royal-blue); color: var(--white); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  :root { --section-padding: 80px 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 64px 0;
    --container-pad: 0 20px;
  }
  .section-title { font-size: var(--font-size-3xl); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-hero-title { font-size: var(--font-size-4xl); }
  .btn-lg { padding: 14px 32px; font-size: var(--font-size-base); }
}

@media (max-width: 480px) {
  .section-title { font-size: var(--font-size-2xl); }
  .page-hero-title { font-size: var(--font-size-3xl); }
  .page-hero { padding: 110px 0 50px; }
}
