/* =========================================================
   Reaya Medical — base, header, footer, utilities
   Design language adapted from the "Asting" theme (orange accent,
   deep dark tones, warm light backgrounds, pill buttons)
   ========================================================= */
:root {
  --primary: #13a89e; --secondary: #1d6fdc; --dark: #0b2545; --darker: #081a33;
  --light: #eef7f7; --heading: #0b2545; --text: #5a6b7d; --body-bg: #fff;
  --btn-radius: 35px; --card-radius: 12px; --base-size: 16px;
  --font: "Cairo", "Segoe UI", Tahoma, sans-serif; --font-heading: var(--font);
  --shadow: 0 10px 40px rgba(11, 37, 69, .08); --shadow-lg: 0 20px 60px rgba(11, 37, 69, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--base-size); line-height: 1.8; color: var(--text); background: var(--body-bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s, background .25s, border-color .25s; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--heading); margin: 0 0 .5em; line-height: 1.35; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.skip-link { position: absolute; inset-inline-start: -999px; top: 10px; z-index: 10000; background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 6px; }
.skip-link:focus { inset-inline-start: 10px; }
.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 15px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: 13px 32px; border-radius: var(--btn-radius); font-weight: 700; font-size: .98rem; line-height: 1.4; border: 2px solid transparent; cursor: pointer; transition: all .3s var(--ease); white-space: nowrap; }
.btn-primary { background: var(--s-accent, var(--primary)); color: var(--s-btn-text, #fff); border-color: var(--s-accent, var(--primary)); }
.btn-primary:hover { background: var(--dark); border-color: var(--dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,.15); }
.btn-outline { background: transparent; color: var(--s-accent, var(--primary)); border-color: var(--s-accent, var(--primary)); }
.btn-outline:hover { background: var(--s-accent, var(--primary)); color: var(--s-btn-text, #fff); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline-light:hover { background: #fff; color: var(--dark); border-color: #fff; }
.btn-block { width: 100%; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- preloader ---------- */
#preloader { position: fixed; inset: 0; background: #fff; z-index: 99999; display: flex; align-items: center; justify-content: center; transition: opacity .45s, visibility .45s; }
#preloader.done { opacity: 0; visibility: hidden; }
.loader { width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--light); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= HEADER ================= */
#site-header { position: relative; z-index: 1000; }
.topbar { background: var(--tb-bg, var(--dark)); color: var(--tb-color, #c6d7e6); font-size: .86rem; }
.tb-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 46px; flex-wrap: wrap; }
.tb-items { display: flex; flex-wrap: wrap; gap: 6px 26px; list-style: none; }
.tb-items li, .tb-items a { display: inline-flex; align-items: center; gap: 8px; }
.tb-items i { color: var(--primary); }
.tb-items a:hover { color: #fff; }
.tb-social { display: flex; gap: 6px; list-style: none; }
.tb-social a { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.tb-social a:hover { background: var(--primary); color: #fff; }

.main-header { background: var(--h-bg, #fff); box-shadow: 0 2px 20px rgba(0,0,0,.05); }
.main-header.fixed { position: fixed; top: 0; inset-inline: 0; animation: slideDown .45s var(--ease); box-shadow: 0 6px 30px rgba(0,0,0,.1); }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: none; } }
.hdr { display: flex; align-items: center; gap: 24px; min-height: 88px; }
.logo { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { height: var(--logo-h, 52px); width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text b { font-family: var(--font-heading); font-size: 1.3rem; color: var(--logo-color, var(--heading)); font-weight: 800; }
.logo-text small { font-size: .78rem; color: var(--logo-sub, var(--text)); }

.nav { flex: 1; display: flex; justify-content: center; }
.menu { list-style: none; display: flex; align-items: center; }
.menu > li { position: relative; }
.menu > li > a { display: flex; align-items: center; gap: 5px; padding: 31px 12px; font-weight: 700; font-size: .96rem; color: var(--h-color, var(--heading)); position: relative; }
.menu > li > a::after { content: ""; position: absolute; bottom: 24px; inset-inline-start: 12px; width: 0; height: 2px; background: var(--h-hover, var(--primary)); transition: width .3s var(--ease); }
.menu > li:hover > a, .menu > li.active > a { color: var(--h-hover, var(--primary)); }
.menu > li:hover > a::after, .menu > li.active > a::after { width: calc(100% - 24px); }
.menu > li > a i { font-size: .75rem; }
.menu .sub { position: absolute; top: 100%; inset-inline-start: 0; min-width: 250px; list-style: none; background: var(--h-sub-bg, #fff); box-shadow: var(--shadow-lg); border-top: 3px solid var(--primary); border-radius: 0 0 10px 10px; padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s var(--ease); }
.menu li:hover > .sub, .menu li:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.menu .sub a { display: block; padding: 9px 22px; color: var(--h-sub-color, var(--heading)); font-weight: 600; font-size: .93rem; }
.menu .sub a:hover, .menu .sub li.active a { color: var(--primary); padding-inline-start: 28px; }
.sub-toggle { display: none; }

.hdr-actions { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.lang-switch { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: .9rem; color: var(--h-color, var(--heading)); border: 1px solid rgba(0,0,0,.1); padding: 8px 16px; border-radius: 30px; }
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }
.hdr-cta { background: var(--cta-bg, var(--primary)); border-color: var(--cta-bg, var(--primary)); color: var(--cta-color, #fff); padding: 11px 24px; }
.burger { display: none; width: 46px; height: 46px; border: 0; border-radius: 10px; background: var(--light); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { width: 22px; height: 2px; background: var(--heading); border-radius: 2px; }

.m-drawer { position: fixed; inset: 0; background: rgba(6,20,40,.55); z-index: 2000; opacity: 0; visibility: hidden; transition: all .35s; }
.m-drawer.open { opacity: 1; visibility: visible; }
.m-panel { position: absolute; top: 0; inset-inline-start: 0; width: min(340px, 86vw); height: 100%; background: #fff; overflow-y: auto; padding: 22px; transform: translateX(100%); transition: transform .4s var(--ease); }
[dir="ltr"] .m-panel { transform: translateX(-100%); }
.m-drawer.open .m-panel { transform: none; }
.m-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.m-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--light); cursor: pointer; font-size: 1.1rem; color: var(--heading); }
.m-menu { flex-direction: column; align-items: stretch; margin-bottom: 22px; }
.m-menu > li { border-bottom: 1px solid #eee; }
.m-menu > li > a { padding: 13px 0; }
.m-menu > li > a::after, .m-menu > li > a i { display: none; }
.m-menu .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; display: none; padding: 0 0 10px; min-width: 0; }
.m-menu .sub-open > .sub { display: block; }
.m-menu .sub-toggle { display: flex; position: absolute; top: 8px; inset-inline-end: 0; width: 34px; height: 34px; align-items: center; justify-content: center; border: 0; background: var(--light); border-radius: 8px; cursor: pointer; color: var(--heading); }

@media (max-width: 1199px) {
  .nav { display: none; }
  .burger { display: flex; }
  .hdr { min-height: 78px; }
}
@media (max-width: 767px) {
  .tb-items li:nth-child(n+3) { display: none; }
  .hdr-cta { display: none; }
  .logo-text small { display: none; }
  .lang-switch span { display: none; }
}

/* ================= FOOTER ================= */
.site-footer-inner { position: relative; background: var(--f-bg, var(--darker)); color: var(--f-text, #a6bbd0); overflow: hidden; }
.f-grid { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 40px; padding-top: 90px; padding-bottom: 60px; }
.f-col { flex: 1 1 220px; min-width: 0; }
.f-logo { margin-bottom: 20px; }
.f-logo .logo-text b { color: var(--f-title, #fff); }
.f-title { color: var(--f-title, #fff); font-size: 1.18rem; margin-bottom: 26px; padding-bottom: 14px; position: relative; }
.f-title::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; width: 40px; height: 3px; border-radius: 3px; background: var(--f-accent, var(--primary)); }
.f-links { list-style: none; }
.f-links li { margin-bottom: 10px; }
.f-links a { color: var(--f-link, #c6d7e6); display: inline-flex; align-items: center; gap: 8px; }
.f-links a i { color: var(--f-accent, var(--primary)); font-size: .8rem; }
[dir="ltr"] .f-links a i, [dir="ltr"] .crumbs i, [dir="ltr"] .more i { transform: scaleX(-1); }
.f-links a:hover { color: var(--f-accent, var(--primary)); padding-inline-start: 4px; }
.f-contact { list-style: none; }
.f-contact li { margin-bottom: 14px; }
.f-contact li, .f-contact a { display: flex; gap: 12px; align-items: flex-start; }
.f-contact i { color: var(--f-accent, var(--primary)); margin-top: 6px; width: 16px; text-align: center; }
.f-contact a:hover { color: var(--f-accent, var(--primary)); }
.f-social { display: flex; gap: 10px; list-style: none; margin-top: 22px; }
.f-social a { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,.07); color: #fff; }
.f-social a:hover { background: var(--f-accent, var(--primary)); transform: translateY(-3px); }
.f-news { display: flex; background: rgba(255,255,255,.07); border-radius: var(--btn-radius); padding: 5px; margin-top: 10px; }
.f-news input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; padding: 10px 16px; outline: none; }
.f-news .btn { padding: 10px 18px; }
.f-ok { color: var(--f-accent, var(--primary)); font-size: .9rem; margin-top: 8px; }
.f-bottom { position: relative; z-index: 2; background: var(--fb-bg, rgba(0,0,0,.2)); color: var(--fb-color, #8aa0b8); font-size: .9rem; }
.fb-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding-block: 20px; }
.fb-row p { margin: 0; }
.fb-row ul { display: flex; gap: 22px; list-style: none; }
.fb-row a:hover { color: var(--f-accent, var(--primary)); }

/* ================= FLOATING ================= */
.wa-float { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 900; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 25px rgba(37,211,102,.4); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.to-top { position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 900; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(15px); transition: all .3s; box-shadow: var(--shadow); }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--dark); }

/* ================= LIGHTBOX ================= */
.lightbox { position: fixed; inset: 0; z-index: 5000; background: rgba(5,16,32,.92); display: flex; align-items: center; justify-content: center; padding: 40px; }
.lightbox figure { margin: 0; max-width: 1100px; text-align: center; }
.lightbox img { max-height: 80vh; margin: auto; border-radius: 10px; }
.lightbox figcaption { color: #fff; margin-top: 14px; }
.lightbox button { position: absolute; width: 50px; height: 50px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 1.1rem; }
.lightbox button:hover { background: var(--primary); }
.lb-close { top: 20px; inset-inline-end: 20px; }
.lb-prev { top: 50%; inset-inline-start: 20px; transform: translateY(-50%); }
.lb-next { top: 50%; inset-inline-end: 20px; transform: translateY(-50%); }
[dir="ltr"] .lb-prev i, [dir="ltr"] .lb-next i, [dir="ltr"] .sl-arrow i { transform: scaleX(-1); }

/* ================= ANIMATION / PREVIEW ================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in, .no-anim .reveal { opacity: 1; transform: none; }
.is-preview [data-sid] { cursor: pointer; }
.is-preview [data-sid]:hover, .is-preview #site-header:hover, .is-preview #site-footer:hover { outline: 2px dashed var(--primary); outline-offset: -2px; }
.pv-hl { outline: 3px solid var(--primary) !important; outline-offset: -3px; }
@media (max-width: 767px) { .hide-m { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }
