/* ============================================
   Huthaifa Alqeisi — Jewelry Expert & Consultant
   Global Stylesheet
   --------------------------------------------
   Color Palette:
     Gold:  #c9a94d  (accent)
     Black: #0b0b0b  (dark background)
     White: #ffffff  (light background)
   ============================================ */

/* ---------- CSS Reset & Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light theme (default) */
  --bg: #fdfdfb;
  --bg-alt: #f5f1e8;
  --text: #141414;
  --text-muted: #555;
  --gold: #c9a94d;
  --gold-light: #e6c878;
  --gold-dark: #a8893a;
  --border: rgba(0, 0, 0, 0.08);
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --nav-bg: rgba(253, 253, 251, 0.85);
  --overlay: rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] {
  --bg: #0b0b0b;
  --bg-alt: #141414;
  --text: #f5f1e8;
  --text-muted: #b5b0a2;
  --gold: #d4b45c;
  --gold-light: #f0d88a;
  --gold-dark: #a8893a;
  --border: rgba(255, 255, 255, 0.1);
  --card: #1a1a1a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(11, 11, 11, 0.85);
  --overlay: rgba(0, 0, 0, 0.7);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  transition: background 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* English (LTR) explicit sizing — elegant, modern, readable */
body[dir="ltr"] {
  font-family: 'Lato', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.2px;
}

body[dir="ltr"] h1,
body[dir="ltr"] h2,
body[dir="ltr"] h3,
body[dir="ltr"] h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

body[dir="ltr"] h1 { font-size: 24px; }
body[dir="ltr"] h2 { font-size: 22px; }
body[dir="ltr"] h3 { font-size: 20px; }
body[dir="ltr"] h4 { font-size: 18px; }

/* Arabic language — Tajawal (Montserrat Arabic) */
body[dir="rtl"] {
  font-family: 'Tajawal', 'Cairo', 'Amiri', sans-serif;
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.8;
  letter-spacing: 0;
}

body[dir="rtl"] h1,
body[dir="rtl"] h2,
body[dir="rtl"] h3,
body[dir="rtl"] h4 {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  letter-spacing: 0;
  font-weight: 700;
}

body[dir="rtl"] .logo-name {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  letter-spacing: 1px;
}

body[dir="rtl"] .logo-sub,
body[dir="rtl"] .nav-links a {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  letter-spacing: 0.5px;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Amiri', serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

/* English nav slightly larger */
body[dir="ltr"] .nav-links a {
  font-size: 15px;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 34px;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gold);
  transition: left 0.4s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  color: #0b0b0b;
}

.btn-filled {
  background: var(--gold);
  color: #0b0b0b;
}

.btn-filled:hover {
  background: var(--gold-dark);
  color: #fff;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 18px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, padding 0.3s ease;
}

.navbar.scrolled {
  padding: 12px 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Logo: image + text combo ---------- */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 52px;
  width: auto;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: drop-shadow(0 0 6px rgba(201,169,77,0.3));
}

.navbar.scrolled .logo-img {
  height: 42px;
}

.logo-link:hover .logo-img {
  transform: scale(1.08) rotate(-3deg);
  filter: drop-shadow(0 0 12px rgba(201,169,77,0.6));
}

/* Dark theme: brighten the logo slightly */
[data-theme="dark"] .logo-img {
  filter: drop-shadow(0 0 8px rgba(212,180,92,0.5)) brightness(1.1);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1.5px;
}

.logo-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Legacy .logo class kept for backward compat */
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
}

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

.nav-links a {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding: 6px 0;
}

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

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

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

.nav-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.control-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.control-btn:hover {
  background: var(--gold);
  color: #0b0b0b;
  border-color: var(--gold);
  transform: rotate(15deg);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

/* ---------- Hero Sections ---------- */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(var(--overlay), var(--overlay)),
    url('https://images.unsplash.com/photo-1515562141207-7a88fb7ce338?w=800&q=75&fm=webp') center/cover;
  color: #fff;
}

@media (min-width: 769px) {
  .hero {
    background: linear-gradient(var(--overlay), var(--overlay)),
      url('https://images.unsplash.com/photo-1515562141207-7a88fb7ce338?w=1600&q=80&fm=webp') center/cover;
  }
}

.hero-small {
  height: auto;
  min-height: 72vh;
  padding-top: 140px;
  padding-bottom: 80px;
}

.hero-content {
  max-width: 860px;
  padding: 0 32px;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1.2s ease 0.3s forwards;
}

.hero-tagline,
.hero .hero-tagline {
  color: var(--gold-light);
  letter-spacing: 6px;
  font-size: 18px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  line-height: 1.25;
  color: #fff;
  margin-bottom: 24px;
}

.hero h1 span {
  color: var(--gold);
  font-style: italic;
}

.hero p {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: #e8e8e8;
  margin-bottom: 42px;
  font-weight: 300;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.9;
}

/* English: larger h1 for "Huthaifa Alqeisi" hero name */
body[dir="ltr"] .hero h1 {
  font-size: clamp(3.2rem, 7.5vw, 6.5rem);
  letter-spacing: -0.5px;
}

/* Arabic: disable letter-spacing on hero tagline (breaks Arabic glyphs) */
body[dir="rtl"] .hero-tagline {
  letter-spacing: 2px;
}
body[dir="rtl"] .hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.35;
}

/* ---------- Sections ---------- */
section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title small {
  color: var(--gold);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 15px;
  display: block;
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  color: var(--text);
}

.section-title .divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 20px auto;
}

/* ---------- Home: Intro ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.intro-image {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}

.intro-image img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.8s ease;
  filter: contrast(1.04) saturate(1.05) brightness(1.01);
  image-rendering: high-quality;
}

[data-theme="dark"] .intro-image {
  background: #1a1a1a;
}

.intro-image:hover img {
  transform: scale(1.03);
}


.intro-text h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  margin-bottom: 22px;
}

.intro-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ---------- Cards / Services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--card);
  padding: 40px 30px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

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

.card:hover::before {
  transform: scaleX(1);
}

/* Clickable card variant — full card is a link */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.card-link h3,
.card-link p { color: var(--text); }

.card-cta {
  display: inline-block;
  margin-top: 18px;
  padding: 8px 0;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, letter-spacing 0.3s ease;
}
.card-link:hover .card-cta {
  border-bottom-color: var(--gold);
  letter-spacing: 2.5px;
}

.card-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--gold);
  transition: all 0.4s ease;
}

.card:hover .card-icon {
  background: var(--gold);
  color: #0b0b0b;
  transform: rotate(360deg);
}

.card h3 {
  margin-bottom: 15px;
  font-size: 22px;
}

.card p {
  color: var(--text-muted);
  font-size: 16px;
}

/* ---------- Services Page ---------- */
.service-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 100px;
}

.service-item:nth-child(even) .service-image {
  order: 2;
}

.service-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-image {
  overflow: hidden;
}

.service-image:hover img {
  transform: scale(1.08);
}

.service-text h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--gold);
}

.service-text ul {
  list-style: none;
  margin-top: 20px;
}

.service-text ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  position: relative;
  padding-left: 25px;
}

body[dir="rtl"] .service-text ul li {
  padding-left: 0;
  padding-right: 25px;
}

.service-text ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold);
}

body[dir="rtl"] .service-text ul li::before {
  left: auto;
  right: 0;
}

/* ---------- Masterclass Page ---------- */
.masterclass-hero {
  background: linear-gradient(var(--overlay), var(--overlay)),
    url('https://images.unsplash.com/photo-1617038220319-276d3cfab638?w=800&q=75&fm=webp') center/cover;
}

.about-hero {
  background: linear-gradient(var(--overlay), var(--overlay)),
    url('https://images.unsplash.com/photo-1573408301185-9146fe634ad0?w=800&q=75&fm=webp') center/cover;
}

.services-hero {
  background: linear-gradient(var(--overlay), var(--overlay)),
    url('https://images.unsplash.com/photo-1605100804763-247f67b3557e?w=800&q=75&fm=webp') center/cover;
}

.contact-hero {
  background: linear-gradient(var(--overlay), var(--overlay)),
    url('https://images.unsplash.com/photo-1602173574767-37ac01994b2a?w=800&q=75&fm=webp') center/cover;
}

@media (min-width: 769px) {
  .masterclass-hero {
    background: linear-gradient(var(--overlay), var(--overlay)),
      url('https://images.unsplash.com/photo-1617038220319-276d3cfab638?w=1600&q=80&fm=webp') center/cover;
  }
  .about-hero {
    background: linear-gradient(var(--overlay), var(--overlay)),
      url('https://images.unsplash.com/photo-1573408301185-9146fe634ad0?w=1600&q=80&fm=webp') center/cover;
  }
  .services-hero {
    background: linear-gradient(var(--overlay), var(--overlay)),
      url('https://images.unsplash.com/photo-1605100804763-247f67b3557e?w=1600&q=80&fm=webp') center/cover;
  }
  .contact-hero {
    background: linear-gradient(var(--overlay), var(--overlay)),
      url('https://images.unsplash.com/photo-1602173574767-37ac01994b2a?w=1600&q=80&fm=webp') center/cover;
  }
}

.curriculum {
  background: var(--bg-alt);
}

.curriculum-list {
  max-width: 800px;
  margin: 0 auto;
}

.curriculum-item {
  display: flex;
  gap: 30px;
  padding: 30px;
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  transition: all 0.4s ease;
}

.curriculum-item:hover {
  border-color: var(--gold);
  transform: translateX(10px);
}

body[dir="rtl"] .curriculum-item:hover {
  transform: translateX(-10px);
}

.curriculum-number {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  min-width: 70px;
}

.curriculum-content h4 {
  font-size: 22px;
  margin-bottom: 10px;
}

.curriculum-content p {
  color: var(--text-muted);
}

/* ---------- About Page ---------- */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
  transform: translateX(-50%);
}

.timeline-item {
  padding: 20px 40px;
  position: relative;
  width: 50%;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--gold);
  border-radius: 50%;
  top: 30px;
}

.timeline-item:nth-child(odd)::after {
  right: -9px;
}

.timeline-item:nth-child(even)::after {
  left: -9px;
}

.timeline-year {
  color: var(--gold);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
}

.timeline-item h4 {
  font-size: 22px;
  margin: 10px 0;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 16px;
}

.stats {
  background: var(--bg-alt);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-item .stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  font-weight: 700;
  color: var(--gold);
  display: block;
}

.stat-item p {
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 14px;
}

/* ---------- Contact Page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--gold);
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.contact-detail {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.contact-detail-icon {
  color: var(--gold);
  font-size: 22px;
  min-width: 30px;
}

.contact-detail-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
}

.contact-detail-text span {
  color: var(--text-muted);
  font-size: 15px;
}

.contact-form {
  background: var(--card);
  padding: 40px;
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ---------- Footer ---------- */
.footer {
  background: #0b0b0b;
  color: #b5b0a2;
  padding: 70px 0 20px;
}

[data-theme="dark"] .footer {
  background: #050505;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  height: 160px;
  width: auto;
  margin-bottom: 16px;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

.footer-col h4 {
  color: var(--gold);
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-col p,
.footer-col a {
  color: #b5b0a2;
  font-size: 15px;
  display: block;
  margin-bottom: 10px;
}

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

/* ─── Social Icons — Luxury Edition ─────────────────────────── */
.social-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Base circle button */
.social-links a,
.social-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border-style: solid;
  border-width: 1.5px;
  border-color: #c9a94d;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b5b0a2;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  /* Idle soft pulse */
  animation: socialIdle 3.5s ease-in-out infinite;
  /* Base transition */
  transition: transform 0.3s ease,
              box-shadow 0.3s ease,
              border-color 0.3s ease,
              color 0.3s ease,
              background 0.3s ease;
}

/* Stagger entrance delay */
.social-links a:nth-child(1),
.social-icon:nth-child(1) { transition-delay: 0s;    animation-delay: 0s; }
.social-links a:nth-child(2),
.social-icon:nth-child(2) { transition-delay: 0.05s; animation-delay: 0.4s; }
.social-links a:nth-child(3),
.social-icon:nth-child(3) { transition-delay: 0.10s; animation-delay: 0.8s; }

/* Hover state */
.social-links a:hover,
.social-icon:hover {
  transform: scale(1.1) translateY(-3px);
  color: #c9a94d;
  border-color: #c9a94d;
  background: rgba(201,169,77,.07);
  box-shadow: 0 0 18px rgba(201,169,77,.4), 0 4px 14px rgba(0,0,0,.25);
  animation: none;
}

/* Click micro-press */
.social-links a:active,
.social-icon:active {
  transform: scale(0.95) translateY(-1px);
  transition: transform 0.1s ease;
}

/* ── Tooltip label ── */
.social-links a::before,
.social-icon::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #0b0b0b;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.71rem;
  letter-spacing: 0.6px;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 3px;
  border: 1px solid rgba(201,169,77,.35);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Tooltip arrow */
.social-links a::after,
.social-icon::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-style: solid;
  border-width: 5px;
  border-color: transparent;
  border-top-color: rgba(201,169,77,.35);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Show tooltip on hover */
.social-links a:hover::before,
.social-icon:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.social-links a:hover::after,
.social-icon:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Idle glow pulse */
@keyframes socialIdle {
  0%,100% { box-shadow: 0 0 0 0 rgba(201,169,77,0); }
  50%      { box-shadow: 0 0 0 4px rgba(201,169,77,.12); }
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  padding: 22px 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 10px;
}
.footer-legal a {
  color: #b5b0a2;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease;
}
.footer-legal a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: #c9a94d;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}
.footer-legal a:hover { color: #c9a94d; }
.footer-legal a:hover::after { transform: scaleX(1); }

@media (max-width: 600px) {
  .footer-legal { gap: 6px 14px; }
  .footer-legal a { font-size: 11.5px; letter-spacing: 0.5px; }
}

.footer-bottom {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 14px;
  color: #777;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .intro-grid,
  .service-item,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .service-item:nth-child(even) .service-image {
    order: 0;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 50px;
  }

  .timeline-item::after {
    left: 11px !important;
    right: auto !important;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    width: 100%;
    padding: 30px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 20px;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  section {
    padding: 70px 0;
  }

  .hero {
    min-height: 540px;
  }

  .hero-small {
    padding-top: 110px;
    padding-bottom: 60px;
    min-height: 60vh;
  }

  .hero-content {
    padding: 0 20px;
  }

  .curriculum-item {
    flex-direction: column;
    gap: 10px;
  }
}

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

  body[dir="rtl"] {
    font-size: 16px;
    line-height: 1.7;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 25px;
  }

  .intro-image img,
  .service-image img {
    height: 340px;
  }

  section {
    padding: 50px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .hero-content {
    padding: 0 16px;
  }

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

  .hero p {
    font-size: clamp(0.9rem, 2vw, 1.05rem);
  }

  body[dir="rtl"] h1,
  body[dir="rtl"] h2,
  body[dir="rtl"] h3,
  body[dir="rtl"] h4 {
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  }

  .card {
    padding: 24px 16px;
  }

  .intro-grid,
  .service-item,
  .contact-grid {
    gap: 24px;
  }
}
