/* Tarek Taha — facelift of the original Zoho theme (navy, blue, Poppins) */
:root {
  --black: #000;
  --navy: #04131D;       /* original theme base */
  --navy-2: #091A26;     /* original alternate section */
  --card: #0E2333;
  --line: rgba(255, 255, 255, .09);
  --white: #FFFFFF;
  --text: #E6ECF2;
  --muted: #A4B0BE;      /* lifted from the old #626878 for readability */
  --blue: #369EEA;       /* original accent */
  --blue-dark: #1685D7;

  --sans: "Poppins", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --arabic: "IBM Plex Sans Arabic", "Poppins", Tahoma, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: #6BB9F2; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

[lang="ar"] { font-family: var(--arabic); }

h1, h2, h3 { color: var(--white); margin: 0; line-height: 1.15; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 600; margin-bottom: clamp(28px, 4vw, 48px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff;
  font-weight: 500; font-size: .98rem; line-height: 1;
  padding: .95em 1.6em; border-radius: 999px; text-decoration: none;
  transition: background-color .15s;
}
.btn:hover { background: var(--blue-dark); color: #fff; }

.link { color: var(--blue); font-size: .95rem; }

/* ---------- header (over the hero) ---------- */
.top { position: absolute; inset: 0 0 auto 0; z-index: 10; padding-block: 26px; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wordmark { color: var(--white); font-size: 1.5rem; font-weight: 500; text-decoration: none; letter-spacing: .01em; }
.wordmark:hover { color: var(--white); }
.top nav { display: flex; gap: clamp(18px, 3.4vw, 44px); }
.top nav a { color: var(--white); text-decoration: none; font-size: 1.02rem; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.top nav a:hover { color: var(--blue); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: var(--black);
  min-height: min(100vh, 980px);
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-photo {
  position: absolute; z-index: -2;
  top: 0; right: 0; height: 100%; width: 58%;
  object-fit: cover; object-position: 30% 15%;
}
/* blend the photo into the black, and the hero into the navy page */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, #000 42%, rgba(0,0,0,.75) 52%, rgba(0,0,0,0) 72%),
    linear-gradient(180deg, rgba(0,0,0,0) 70%, var(--navy) 100%);
}
.hero-inner { width: 100%; padding-top: 130px; padding-bottom: 110px; }
.hero-text { max-width: 600px; }
.hello { font-style: italic; font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--white); margin: 0 0 .3em; }
.hero h1 { font-size: clamp(2.9rem, 7vw, 5.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.role { display: block; color: var(--blue); }
.bio { color: var(--muted); font-size: 1.02rem; margin: 1.3em 0 0; max-width: 34em; }
.bio + .bio { margin-top: .8em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 2em; }
.hero-mail { color: var(--white); text-decoration: none; border-bottom: 1px solid rgba(54,158,234,.7); padding-bottom: 2px; }
.hero-mail:hover { color: var(--blue); }

.socials { list-style: none; padding: 0; margin: 2em 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.socials a {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--white);
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  transition: background-color .15s, color .15s;
}
.socials a:hover { background: var(--blue); color: #fff; box-shadow: none; }
.socials svg { width: 19px; height: 19px; fill: currentColor; }

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-alt { background: var(--navy-2); }

/* books */
.book {
  display: grid;
  grid-template-columns: minmax(160px, 300px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 36px);
}
.book + .book { margin-top: 28px; }
.cover { width: 100%; border-radius: 8px; box-shadow: 0 20px 40px -18px rgba(0,0,0,.8); }
.book-body { display: flex; flex-direction: column; min-height: 100%; }
.book h3 { font-family: var(--arabic); font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 600; }
.book-en { color: var(--muted); font-size: .95rem; margin: .4em 0 1.2em; text-align: right; }
.ar p { margin: 0 0 1em; color: var(--text); font-size: 1.06rem; line-height: 1.95; }
.buy {
  margin-top: auto; padding-top: 1.2em;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 22px;
}
.price { color: var(--blue); font-size: 1.35rem; font-weight: 600; }
.soon {
  color: var(--blue); font-weight: 500;
  padding: .7em 1.4em; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--blue);
}

/* reviews */
.section-alt h2 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3em 1em; }
#reviews-h [lang="ar"] { font-size: .62em; font-weight: 500; color: var(--muted); }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.review {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 20px;
}
.review figcaption { display: flex; align-items: center; gap: 12px; color: var(--white); font-weight: 500; }
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(54,158,234,.16); color: var(--blue); font-weight: 600;
  font-family: var(--arabic);
}
.review blockquote { margin: 18px 0 0; color: var(--text); }
.review blockquote p { margin: 0 0 .8em; font-size: 1.02rem; line-height: 1.9; }
.clamp { max-height: 15.3em; overflow: hidden; position: relative; }
.clamp::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4em;
  background: linear-gradient(rgba(14,35,51,0), var(--card));
}
.review.open .clamp { max-height: none; }
.review.open .clamp::after { display: none; }
.review-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.more { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; font-size: .95rem; font-weight: 500; }
.more:hover { text-decoration: underline; }

/* events */
.sub { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 500; margin-bottom: 22px; color: var(--white); }
.photos { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 16px; }
.photos img { width: 100%; height: clamp(260px, 32vw, 440px); object-fit: cover; border-radius: var(--radius); }
.photos img:nth-child(3) { object-position: 50% 70%; }

.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: clamp(48px, 7vw, 80px); }
.video { margin: 0; }
.video figcaption { color: var(--white); font-weight: 500; font-size: 1.05rem; margin-bottom: 12px; }
.video iframe, .yt { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); display: block; }
.yt { position: relative; padding: 0; overflow: hidden; cursor: pointer; background: #000; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .8; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.play::after {
  content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
  border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent;
}

/* contact */
.contact { text-align: center; }
.contact h2 { justify-content: center; margin-bottom: .5em; }
.contact p { color: var(--muted); margin: 0; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px; margin-top: 1.8em !important; }

/* footer */
.foot { background: var(--black); padding-block: 28px; color: var(--muted); font-size: .92rem; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.foot p { margin: 0; }
.socials-sm { margin: 0; }
.socials-sm a { width: 38px; height: 38px; }
.socials-sm svg { width: 16px; height: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .reviews { grid-template-columns: 1fr 1fr; }
  .videos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .top { padding-block: 18px; }
  .top nav { width: 100%; justify-content: space-between; gap: 8px; }
  .hero { display: block; min-height: 0; }
  .hero-photo {
    position: relative; width: 100%; height: 72vh; max-height: 560px; object-position: 50% 20%;
    -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
  }
  .hero::before { background: linear-gradient(180deg, rgba(0,0,0,.55) 0, rgba(0,0,0,0) 140px); }
  .hero-inner { padding-top: 0; padding-bottom: 72px; margin-top: -120px; position: relative; }
  .book { grid-template-columns: 1fr; }
  .cover { max-width: 230px; justify-self: center; }
  .book h3, .book-en { text-align: center; }
  .buy { justify-content: center; }
  .reviews, .videos { grid-template-columns: 1fr; }
  .photos { grid-template-columns: 1fr 1fr; }
  .photos img { height: 230px; }
  .photos img:nth-child(2) { grid-column: 1 / -1; order: -1; height: auto; aspect-ratio: 4 / 3; }
  .foot-inner { justify-content: center; text-align: center; }
}
