/* =====================================================
   Bakri Care — Public Site Stylesheet
   Theme: Forest green + gold + ivory (image-matched)
   ===================================================== */

:root {
  --bc-green-900: #07301f;
  --bc-green-800: #0a3d2e;
  --bc-green-700: #0e5037;
  --bc-green-600: #155c43;
  --bc-green-500: #1f7a5a;
  --bc-green-100: #e7f0ec;
  --bc-gold-700: #a78449;
  --bc-gold-600: #c9a875;
  --bc-gold-500: #d8b986;
  --bc-gold-300: #ebd6a8;
  --bc-ivory:    #f6f1e7;
  --bc-cream:    #fbf8f1;
  --bc-text:     #1a2b22;
  --bc-muted:    #5c6b63;
  --bc-white:    #ffffff;
  --bc-shadow:   0 12px 40px rgba(7, 48, 31, 0.10);
  --bc-shadow-lg:0 24px 60px rgba(7, 48, 31, 0.18);
  --bc-radius:   18px;
  --bc-radius-sm:12px;
  --bc-trans:    cubic-bezier(.4,.0,.2,1);
  --bc-font-en:  'Inter', 'Segoe UI', system-ui, sans-serif;
  --bc-font-ar:  'IBM Plex Sans Arabic', 'Tajawal', 'Segoe UI', sans-serif;
  --bc-font-display: 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--bc-font-en);
  background: var(--bc-cream);
  color: var(--bc-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body[dir="rtl"] { font-family: var(--bc-font-ar); }

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============== Top Bar ============== */
.topbar {
  background: var(--bc-green-900);
  color: var(--bc-gold-300);
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar a { color: var(--bc-gold-300); transition: color .2s; }
.topbar a:hover { color: var(--bc-white); }
.topbar .topbar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar .topbar-info span { display: inline-flex; align-items: center; gap: 6px; }
.topbar .topbar-info i { color: var(--bc-gold-600); }
.topbar .topbar-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(232,201,135,.35);
  padding: 4px 12px; border-radius: 999px;
  transition: all .25s var(--bc-trans);
}
.lang-switch:hover { background: var(--bc-gold-600); color: var(--bc-green-900); border-color: var(--bc-gold-600); }
.lang-switch i { font-size: 12px; }

/* ============== Header / Logo Bar ============== */
.site-header {
  background: var(--bc-cream);
  position: relative; z-index: 10;
  box-shadow: 0 2px 24px rgba(7,48,31,.06);
  transition: all .3s var(--bc-trans);
}
.header-top {
  padding: 28px 0 22px;
  text-align: center;
  background:
    radial-gradient(ellipse at center top, rgba(232,201,135,.18) 0%, transparent 60%),
    linear-gradient(180deg, #fbf8f1 0%, #f6f1e7 100%);
  border-bottom: 1px solid rgba(167,132,73,.18);
  position: relative;
}
.header-top::before, .header-top::after {
  content: ''; position: absolute; bottom: 0; height: 2px; width: 32%;
  background: linear-gradient(90deg, transparent, var(--bc-gold-600), transparent);
}
.header-top::before { left: 0; }
.header-top::after  { right: 0; }
.header-logo { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .4s var(--bc-trans); }
.header-logo object,
.header-logo svg { height: 160px; width: auto; pointer-events: none; transition: filter .4s; }
.header-logo:hover { transform: scale(1.03); }
.header-logo:hover object,
.header-logo:hover svg { filter: drop-shadow(0 8px 24px rgba(167,132,73,.25)); }
@media (max-width: 720px) {
  .header-top { padding: 14px 0 10px; }
  .header-logo object, .header-logo svg { height: 78px; }
}
@media (max-width: 480px) {
  .header-top { padding: 12px 0 8px; }
  .header-logo object, .header-logo svg { height: 64px; }
}

/* ============== Nav ============== */
.site-nav {
  background: var(--bc-green-800);
  padding: 0;
}
.site-nav .container { display: flex; align-items: center; justify-content: center; }
.nav-list {
  display: flex; gap: 0; list-style: none;
  flex-wrap: wrap; justify-content: center;
}
.nav-list a {
  display: block;
  padding: 18px 26px;
  color: var(--bc-cream);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .3px;
  position: relative;
  transition: color .25s;
}
.nav-list a::after {
  content: ''; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  width: 0; height: 2px; background: var(--bc-gold-600);
  transition: width .3s var(--bc-trans);
}
.nav-list a:hover, .nav-list a.active { color: var(--bc-gold-300); }
.nav-list a:hover::after, .nav-list a.active::after { width: 30px; }

.nav-toggle {
  display: none;
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--bc-gold-500); font-size: 22px;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(232,201,135,.10);
  border: 1.5px solid rgba(232,201,135,.45);
  align-items: center; justify-content: center;
  transition: all .25s var(--bc-trans);
}
.nav-toggle:hover, .nav-toggle:focus {
  background: var(--bc-gold-600); color: var(--bc-green-900);
  border-color: var(--bc-gold-600);
}
body[dir="rtl"] .nav-toggle { right: auto; left: 16px; }

/* ============== Hero ============== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; align-items: center;
  background:
    linear-gradient(135deg, rgba(7,48,31,.78) 0%, rgba(10,61,46,.55) 60%, rgba(167,132,73,.35) 100%),
    radial-gradient(ellipse at 80% 20%, rgba(232,201,135,.25), transparent 50%),
    var(--bc-green-900);
  color: var(--bc-cream);
  overflow: hidden;
  padding: 100px 0 80px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 30%, rgba(232,201,135,.15) 0%, transparent 30%),
    radial-gradient(circle at 85% 70%, rgba(31,122,90,.30) 0%, transparent 35%);
  animation: heroFloat 18s ease-in-out infinite alternate;
}
@keyframes heroFloat {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-30px,-20px) scale(1.06); }
}

.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 60px; align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 13px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--bc-gold-500); font-weight: 600;
  padding: 6px 16px; border: 1px solid rgba(232,201,135,.4);
  border-radius: 999px; margin-bottom: 22px;
}
.hero-title {
  font-family: var(--bc-font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700; line-height: 1.12;
  margin-bottom: 22px; color: var(--bc-cream);
}
.hero-title span { color: var(--bc-gold-500); font-style: italic; }
.hero-sub { font-size: 18px; line-height: 1.75; opacity: .92; margin-bottom: 32px; max-width: 560px; }
body[dir="rtl"] .hero-sub { font-size: 17px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: all .3s var(--bc-trans);
  position: relative; overflow: hidden;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--bc-gold-600), var(--bc-gold-700));
  color: var(--bc-green-900);
  box-shadow: 0 10px 28px rgba(167,132,73,.45);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(167,132,73,.55); }
.btn-ghost {
  background: rgba(255,255,255,.10);
  color: var(--bc-cream);
  border: 1px solid rgba(232,201,135,.5);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(232,201,135,.18); border-color: var(--bc-gold-500); }
.btn-dark {
  background: var(--bc-green-800); color: var(--bc-cream);
  box-shadow: 0 10px 26px rgba(7,48,31,.30);
}
.btn-dark:hover { background: var(--bc-green-700); transform: translateY(-2px); }

/* Hero visual: phone mockup style image */
.hero-visual {
  position: relative; perspective: 1400px;
  animation: visualIn 1.2s var(--bc-trans) .25s both;
}
@keyframes visualIn {
  0% { opacity: 0; transform: translateY(40px) rotateY(-10deg); }
  100% { opacity: 1; transform: translateY(0) rotateY(-4deg); }
}
.hero-card {
  background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(246,241,231,.94));
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: var(--bc-shadow-lg);
  border: 1px solid rgba(232,201,135,.35);
  color: var(--bc-text);
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform .5s var(--bc-trans);
}
.hero-card:hover { transform: rotateY(0deg) rotateX(0deg); }
.hero-card h3 {
  font-family: var(--bc-font-display);
  color: var(--bc-green-800);
  font-size: 22px; margin-bottom: 18px;
}
.hero-card .feat-list { list-style: none; }
.hero-card .feat-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(167,132,73,.25);
  font-size: 15px;
}
.hero-card .feat-list li:last-child { border-bottom: 0; }
.hero-card .feat-list i {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--bc-gold-600); color: var(--bc-green-900);
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.hero-card .feat-list strong { color: var(--bc-green-800); display: block; margin-bottom: 2px; }

/* Hero scroll cue */
.scroll-cue {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: var(--bc-gold-500); font-size: 12px; letter-spacing: 2px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 3; animation: scrollBob 2.4s ease-in-out infinite;
}
@keyframes scrollBob {
  0%,100% { transform: translate(-50%, 0); opacity: .9; }
  50%     { transform: translate(-50%, 8px); opacity: .55; }
}

/* ============== Stats Strip ============== */
.stats {
  background: var(--bc-cream);
  padding: 60px 0;
  border-top: 1px solid rgba(167,132,73,.15);
  border-bottom: 1px solid rgba(167,132,73,.15);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  text-align: center;
}
.stat-item { padding: 12px; }
.stat-num {
  font-family: var(--bc-font-display);
  font-size: 56px; font-weight: 700; color: var(--bc-green-800);
  line-height: 1; margin-bottom: 8px;
}
.stat-num::after { content: '+'; color: var(--bc-gold-600); }
.stat-label { color: var(--bc-muted); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }

/* ============== Sections ============== */
.section { padding: 100px 0; position: relative; }
.section-light { background: var(--bc-cream); }
.section-ivory { background: var(--bc-ivory); }
.section-dark {
  background: linear-gradient(180deg, var(--bc-green-900), var(--bc-green-800));
  color: var(--bc-cream);
}
.section-header { text-align: center; margin-bottom: 64px; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--bc-gold-700); font-weight: 700;
  padding: 5px 14px; border: 1px solid rgba(167,132,73,.35);
  border-radius: 999px; margin-bottom: 18px;
}
.section-dark .section-eyebrow { color: var(--bc-gold-500); border-color: rgba(232,201,135,.4); }
.section-title {
  font-family: var(--bc-font-display);
  font-size: clamp(28px, 3.6vw, 44px); font-weight: 700;
  color: var(--bc-green-800); margin-bottom: 14px;
}
.section-dark .section-title { color: var(--bc-cream); }
.section-sub { color: var(--bc-muted); max-width: 700px; margin: 0 auto; font-size: 17px; }
.section-dark .section-sub { color: rgba(246,241,231,.85); }

/* ============== Services flip cards ============== */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  perspective: 1600px;
}
.flip-card {
  position: relative; min-height: 320px;
  cursor: pointer;
}
.flip-card-inner {
  position: relative; width: 100%; height: 100%;
  min-height: 320px;
  transition: transform .9s var(--bc-trans);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
body[dir="rtl"] .flip-card:hover .flip-card-inner,
body[dir="rtl"] .flip-card.flipped .flip-card-inner { transform: rotateY(-180deg); }

.flip-face {
  position: absolute; inset: 0;
  border-radius: var(--bc-radius);
  padding: 36px 30px;
  backface-visibility: hidden;
  display: flex; flex-direction: column; justify-content: center;
  box-shadow: var(--bc-shadow);
  border: 1px solid rgba(167,132,73,.18);
}
.flip-front {
  background: var(--bc-white);
  text-align: center;
}
.flip-front .flip-icon {
  width: 78px; height: 78px;
  background: linear-gradient(135deg, var(--bc-green-700), var(--bc-green-800));
  color: var(--bc-gold-500);
  font-size: 30px;
  border-radius: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 14px 28px rgba(7,48,31,.20);
  transition: transform .4s var(--bc-trans), background .3s;
}
.flip-card:hover .flip-icon { transform: rotate(-6deg) scale(1.05); }
.flip-front h3 {
  font-family: var(--bc-font-display);
  color: var(--bc-green-800); font-size: 22px; margin-bottom: 10px;
}
.flip-front p { color: var(--bc-muted); font-size: 15px; }
.flip-front .flip-hint {
  margin-top: 18px; font-size: 12px; letter-spacing: 2px;
  color: var(--bc-gold-700); text-transform: uppercase;
}

.flip-back {
  background: linear-gradient(155deg, var(--bc-green-800), var(--bc-green-700));
  color: var(--bc-cream);
  transform: rotateY(180deg);
}
body[dir="rtl"] .flip-back { transform: rotateY(-180deg); }
.flip-back h3 {
  color: var(--bc-gold-500); font-family: var(--bc-font-display);
  font-size: 22px; margin-bottom: 14px;
}
.flip-back p { font-size: 15px; line-height: 1.7; margin-bottom: 18px; opacity: .92; }
.flip-back .tag-list { font-size: 13px; opacity: .85; margin-bottom: 22px; }
.flip-back .tag-list span { display: inline-block; }
.flip-back .btn { align-self: flex-start; padding: 10px 22px; font-size: 13px; }

/* ============== Timeline ============== */
.timeline {
  position: relative;
  margin: 60px auto 0; max-width: 980px;
}
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--bc-gold-300), var(--bc-gold-700));
  border-radius: 4px;
}
.tl-item {
  position: relative; width: 50%; padding: 24px 60px;
  opacity: 0; transform: translateY(40px);
  transition: opacity .8s var(--bc-trans), transform .8s var(--bc-trans);
}
.tl-item.visible { opacity: 1; transform: translateY(0); }
.tl-item:nth-child(odd) { left: 0; text-align: right; }
.tl-item:nth-child(even) { left: 50%; text-align: left; }
/* RTL: mirror sides so odd appears on the right and even on the left */
body[dir="rtl"] .tl-item:nth-child(odd)  { left: 50%; text-align: left; }
body[dir="rtl"] .tl-item:nth-child(even) { left: 0;   text-align: right; }

.tl-dot {
  position: absolute; top: 32px; width: 28px; height: 28px;
  background: var(--bc-gold-600);
  border: 4px solid var(--bc-cream);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(167,132,73,.3);
}
.section-dark .tl-dot { border-color: var(--bc-green-900); box-shadow: 0 0 0 4px rgba(232,201,135,.25); }
.tl-item:nth-child(odd)  .tl-dot { right: -14px; }
.tl-item:nth-child(even) .tl-dot { left: -14px; }
body[dir="rtl"] .tl-item:nth-child(odd)  .tl-dot { right: auto; left: -14px; }
body[dir="rtl"] .tl-item:nth-child(even) .tl-dot { left: auto; right: -14px; }
.tl-num {
  display: inline-block;
  font-family: var(--bc-font-display);
  font-size: 60px; font-weight: 700;
  background: linear-gradient(135deg, var(--bc-gold-500), var(--bc-gold-700));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1; margin-bottom: 8px;
}
.tl-item h3 {
  font-family: var(--bc-font-display);
  color: var(--bc-cream); font-size: 22px; margin-bottom: 8px;
}
.tl-item p { opacity: .85; font-size: 15px; }

/* ============== About ============== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 60px; align-items: center;
}
.about-image {
  position: relative;
  border-radius: var(--bc-radius);
  overflow: hidden;
  box-shadow: var(--bc-shadow-lg);
  aspect-ratio: 4/3.2;
  background:
    radial-gradient(circle at 30% 30%, rgba(232,201,135,.4), transparent 60%),
    linear-gradient(135deg, var(--bc-green-700), var(--bc-green-900));
  display: flex; align-items: center; justify-content: center;
}
.about-image::after {
  content: '\f0fa'; /* fa-notes-medical */
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  font-size: 140px; color: rgba(232,201,135,.25);
}
.about-image .about-badge {
  position: absolute; bottom: 22px; left: 22px;
  background: var(--bc-cream); color: var(--bc-green-800);
  padding: 14px 20px; border-radius: 14px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--bc-shadow);
  font-weight: 600;
}
.about-image .about-badge i { color: var(--bc-gold-700); font-size: 22px; }
.about-text p { font-size: 17px; line-height: 1.8; color: var(--bc-muted); margin-bottom: 18px; }
.about-bullets {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px;
  margin-top: 26px; list-style: none;
}
.about-bullets li {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; color: var(--bc-green-800);
}
.about-bullets li i {
  color: var(--bc-gold-700); font-size: 18px;
  background: rgba(167,132,73,.12);
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============== Booking Form ============== */
.book-card {
  max-width: 920px; margin: 0 auto;
  background: var(--bc-white);
  border-radius: var(--bc-radius);
  padding: 48px;
  box-shadow: var(--bc-shadow-lg);
  border: 1px solid rgba(167,132,73,.18);
}
.book-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px;
}
.book-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 13px; font-weight: 600; color: var(--bc-green-800); letter-spacing: .3px;
}
.field input, .field select, .field textarea {
  font: inherit;
  padding: 13px 16px;
  border: 1.5px solid rgba(167,132,73,.25);
  border-radius: 12px;
  background: var(--bc-cream);
  color: var(--bc-text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--bc-green-700);
  background: var(--bc-white);
  box-shadow: 0 0 0 4px rgba(21,92,67,.12);
}
.field textarea { min-height: 110px; resize: vertical; }
.book-actions { margin-top: 12px; text-align: center; }
.form-message { margin-top: 18px; padding: 14px 18px; border-radius: 12px; display: none; }
.form-message.success { display: block; background: #e7f0ec; color: var(--bc-green-800); border: 1px solid var(--bc-green-500); }
.form-message.error   { display: block; background: #fdecea; color: #7a2418; border: 1px solid #d35a4a; }

/* ============== Contact ============== */
.contact-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.contact-card {
  background: var(--bc-white);
  border-radius: var(--bc-radius);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid rgba(167,132,73,.18);
  box-shadow: var(--bc-shadow);
  transition: transform .3s var(--bc-trans), box-shadow .3s;
}
.contact-card:hover { transform: translateY(-6px); box-shadow: var(--bc-shadow-lg); }
.contact-card .ico {
  width: 64px; height: 64px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--bc-green-700), var(--bc-green-800));
  color: var(--bc-gold-500);
  font-size: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px rgba(7,48,31,.20);
}
.contact-card h4 { color: var(--bc-green-800); font-family: var(--bc-font-display); margin-bottom: 6px; }
.contact-card p { color: var(--bc-muted); font-size: 15px; }

/* ============== Footer ============== */
.site-footer {
  background: var(--bc-green-900);
  color: rgba(246,241,231,.78);
  padding: 80px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h5 {
  color: var(--bc-gold-500); font-family: var(--bc-font-display);
  font-size: 17px; letter-spacing: 1px; margin-bottom: 18px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { transition: color .2s; }
.footer-grid a:hover { color: var(--bc-gold-300); }
.footer-grid .footer-brand { display: flex; align-items: flex-start; gap: 16px; flex-direction: column; }
.footer-grid .footer-brand svg { height: 80px; width: auto; }
.footer-grid .footer-brand p { font-size: 14px; opacity: .8; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(232,201,135,.12);
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-size: 13px; color: rgba(246,241,231,.55);
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px;
  background: rgba(232,201,135,.10); color: var(--bc-gold-500);
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  transition: all .25s var(--bc-trans);
}
.footer-social a:hover { background: var(--bc-gold-600); color: var(--bc-green-900); transform: translateY(-3px); }

/* ============== Floating buttons (WA + AI) ============== */
.float-btns {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 14px;
  z-index: 9000;
}
body[dir="rtl"] .float-btns { right: auto; left: 24px; }
.float-btn {
  width: 60px; height: 60px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--bc-white); font-size: 24px;
  box-shadow: 0 14px 30px rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform .3s var(--bc-trans), box-shadow .3s;
  position: relative;
}
.float-btn:hover { transform: scale(1.08) rotate(-4deg); box-shadow: 0 18px 36px rgba(0,0,0,.30); }
.float-btn-wa { background: linear-gradient(135deg, #25d366, #128c7e); }
.float-btn-ai { background: linear-gradient(135deg, var(--bc-gold-600), var(--bc-gold-700)); color: var(--bc-green-900); }
.float-btn-ai::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--bc-gold-500); opacity: .55;
  animation: pulseAI 2.2s ease-out infinite;
}
@keyframes pulseAI {
  0%   { transform: scale(1);   opacity: .6; }
  100% { transform: scale(1.4); opacity: 0; }
}
.float-tip {
  position: absolute; right: 72px; top: 50%; transform: translateY(-50%);
  background: var(--bc-green-800); color: var(--bc-cream);
  padding: 8px 14px; border-radius: 8px; font-size: 13px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .25s;
  box-shadow: var(--bc-shadow);
}
body[dir="rtl"] .float-tip { right: auto; left: 72px; }
.float-btn:hover .float-tip { opacity: 1; }

/* ============== AI Chat panel ============== */
.ai-panel {
  position: fixed; bottom: 100px; right: 24px;
  width: 380px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 140px);
  background: var(--bc-cream);
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0,0,0,.30);
  border: 1px solid rgba(167,132,73,.25);
  display: flex; flex-direction: column;
  z-index: 9100;
  transform: translateY(20px) scale(.95); opacity: 0; pointer-events: none;
  transition: all .3s var(--bc-trans);
  overflow: hidden;
}
body[dir="rtl"] .ai-panel { right: auto; left: 24px; }
.ai-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.ai-head {
  background: linear-gradient(135deg, var(--bc-green-800), var(--bc-green-700));
  color: var(--bc-cream);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.ai-head .ai-avatar {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--bc-gold-500), var(--bc-gold-700));
  color: var(--bc-green-900);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.ai-head h4 { font-family: var(--bc-font-display); font-size: 16px; }
.ai-head p { font-size: 12px; opacity: .8; }
.ai-head .close { margin-left: auto; color: var(--bc-cream); font-size: 18px; opacity: .8; }
body[dir="rtl"] .ai-head .close { margin-left: 0; margin-right: auto; }
.ai-head .close:hover { opacity: 1; }
.ai-body {
  flex: 1; overflow-y: auto;
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--bc-cream);
}
.ai-msg {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 14px; line-height: 1.55;
  animation: msgIn .3s var(--bc-trans) both;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.ai-msg.bot {
  align-self: flex-start;
  background: var(--bc-white);
  border: 1px solid rgba(167,132,73,.18);
  color: var(--bc-text);
  border-top-left-radius: 4px;
}
body[dir="rtl"] .ai-msg.bot { border-top-left-radius: 16px; border-top-right-radius: 4px; }
.ai-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--bc-green-700), var(--bc-green-800));
  color: var(--bc-cream);
  border-top-right-radius: 4px;
}
body[dir="rtl"] .ai-msg.user { border-top-right-radius: 16px; border-top-left-radius: 4px; }
.ai-typing { font-size: 12px; color: var(--bc-muted); padding: 0 4px; display: none; }
.ai-typing.active { display: flex; gap: 4px; align-items: center; }
.ai-typing span {
  width: 6px; height: 6px; background: var(--bc-gold-700); border-radius: 50%;
  animation: typingDot 1.2s infinite ease-in-out;
}
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typingDot {
  0%, 80%, 100% { transform: scale(.5); opacity: .4; }
  40%           { transform: scale(1);  opacity: 1; }
}
.ai-input {
  padding: 12px;
  background: var(--bc-white);
  border-top: 1px solid rgba(167,132,73,.18);
  display: flex; gap: 8px;
}
.ai-input input {
  flex: 1; padding: 11px 14px;
  border: 1px solid rgba(167,132,73,.25);
  border-radius: 999px;
  background: var(--bc-cream);
  font: inherit; font-size: 14px;
}
.ai-input input:focus { outline: 0; border-color: var(--bc-green-700); }
.ai-input button {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--bc-green-700), var(--bc-green-800));
  color: var(--bc-gold-500);
  border-radius: 50%; font-size: 16px;
  transition: transform .2s;
}
.ai-input button:hover { transform: scale(1.08); }

/* ============== Reveal on scroll ============== */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--bc-trans), transform .9s var(--bc-trans); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-l { transform: translateX(-40px); }
.reveal-r { transform: translateX(40px); }
.reveal-l.visible, .reveal-r.visible { transform: translateX(0); }

/* ============== Responsive ============== */
@media (max-width: 1024px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .timeline::before { left: 18px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; left: 0; padding: 18px 18px 18px 60px; text-align: left; }
  body[dir="rtl"] .tl-item, body[dir="rtl"] .tl-item:nth-child(even) { padding: 18px 60px 18px 18px; text-align: right; }
  .tl-item:nth-child(odd) .tl-dot, .tl-item:nth-child(even) .tl-dot { left: 4px; right: auto; }
  body[dir="rtl"] .tl-item .tl-dot { left: auto; right: 4px; }
}
@media (max-width: 720px) {
  .topbar .topbar-info { display: none; }
  .header-logo svg { height: 70px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { padding: 0; }
  .site-nav .container { justify-content: flex-start; padding: 0; position: relative; }
  .nav-list {
    display: none; flex-direction: column; width: 100%; padding: 8px 0;
    border-top: 1px solid rgba(232,201,135,.18);
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 14px 22px; }
  .section { padding: 64px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-grid  { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; }
  .stats-grid    { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .stat-num      { font-size: 42px; }
  .book-card     { padding: 28px; }
  .book-grid     { grid-template-columns: 1fr; }
  .hero          { min-height: auto; padding: 60px 0; }
  .hero-card     { transform: none; }
  .ai-panel      { right: 12px; left: 12px; bottom: 96px; width: auto; height: 70vh; }
  .float-btns    { right: 14px; bottom: 14px; }
  body[dir="rtl"] .float-btns { left: 14px; right: auto; }
}
