/* Ported from the prototype's faq.css — kept in the 'legacy' cascade layer so Tailwind utilities can override it. */
@layer legacy {
/* =========================================================
   الأترجة — الأسئلة الشائعة (shared FAQ component)
   Used as-is by how.html («كيف تعمل الأترجة؟») and contact.html.
   Markup: <section class="hw-faq atmo" id="faq"> … (see how.html);
   behaviour in faq.js.
   ========================================================= */

.hw-faq{
  --hw-forest:  var(--bg-mid);
  --hw-ink:     var(--u-forest);
  --hw-ivory:   var(--u-ivory);
  --hw-gold:    var(--u-gold);
  --hw-gold-l:  var(--gold-light);
  --hw-gold-d:  var(--gold-deep);
  --hw-out:     cubic-bezier(.2,.7,.2,1);
}
.hw-faq .hw-wrap{ max-width:var(--max); margin:0 auto; padding:0 34px; }
.hw-faq .hw-up{ opacity:0; transform:translateY(30px); transition:opacity .9s var(--hw-out), transform .9s var(--hw-out); transition-delay:var(--d, 0s); }
.hw-faq .hw-up.is-seen{ opacity:1; transform:none; }

/* =========================================================
   7 — FAQ
   ---------------------------------------------------------
   From makro.framer.website ("We have the answers"): a centred
   headline with one word set on a highlight, then a single soft
   shell holding a category list on one side and a stack of white
   accordion cards on the other; the active category is the white
   tile. Here in RTL the categories sit on the right, the shell is
   warm sand, and the key word gets the site's hand-drawn gold ring.
   ========================================================= */

.hw-faq{ padding:110px 0 130px; color:var(--hw-ink); }

.fq-head{ max-width:680px; margin:0 auto; text-align:center; }
.fq-label{
  display:inline-flex; align-items:center; gap:9px;
  margin:0;
  padding:7px 16px;
  border-radius:99px;
  font-size:14px; font-weight:600;
  color:var(--hw-gold-d);
  background:rgba(255,255,255,.7);
  border:1px solid rgba(176,143,62,.22);
}
.fq-label span{ width:6px; height:6px; border-radius:50%; background:var(--hw-gold); box-shadow:0 0 0 3px rgba(212,175,90,.18); }

.fq-title{
  margin:20px 0 0;
  font-size:clamp(36px, 4.4vw, 60px);
  line-height:1.3;
  font-weight:700;
  letter-spacing:-1.2px;
  color:var(--hw-ink);
}
.fq-sub{
  max-width:560px;
  margin:18px auto 0;
  font-size:clamp(16px, 1.25vw, 18px);
  line-height:1.9;
  color:#56665F;
}

/* ---- the shell ----
   two joined sand panels, as in the reference: the category panel
   (right in RTL) is only as tall as its list and travels down beside
   the questions while the page scrolls (sticky); a concave corner
   above and below melts it into the questions column. how.js marks
   .is-floating once it has left the top and .is-end when it reaches
   the bottom, so the corners square off where the panels meet flush. */
.fq-shell{
  --sand:#EFE7D6;
  --r:30px;
  display:grid;
  grid-template-columns:300px minmax(0, 1fr);     /* RTL: first column is on the right */
  align-items:start;
  max-width:1160px;
  margin:58px auto 0;
  overflow:clip;                                  /* trims the corners at the ends, keeps sticky working */
}

/* ---- categories ---- */
.fq-side{
  position:sticky;
  top:104px;                                      /* clears the floating navbar */
  display:flex; flex-direction:column; gap:8px;
  padding:8px;
  padding-inline-end:0;                           /* the 8px seam comes from the list */
  background:var(--sand);
  border-start-start-radius:var(--r);
  border-end-start-radius:var(--r);
}
/* concave corners where the panel meets the questions column */
.fq-side::before, .fq-side::after{
  content:"";
  position:absolute;
  inset-inline-end:0;
  width:var(--r); height:var(--r);
  transition:opacity .2s var(--ease);
}
.fq-side::before{
  bottom:100%;
  background:radial-gradient(circle at 100% 0, transparent calc(var(--r) - .5px), var(--sand) var(--r));
  opacity:0;
}
.fq-side::after{
  top:100%;
  background:radial-gradient(circle at 100% 100%, transparent calc(var(--r) - .5px), var(--sand) var(--r));
}
.fq-shell.is-floating .fq-side::before{ opacity:1; }
.fq-shell.is-end .fq-side::after{ opacity:0; }
.fq-tabs{
  position:relative;
  display:flex; flex-direction:column;
  padding:0;
}
.fq-thumb{
  position:absolute; inset-inline:0; top:0;
  height:var(--th, 72px);
  border-radius:22px;
  background:#FFFDF8;
  box-shadow:0 14px 30px -24px rgba(18,60,53,.55);
  transform:translateY(var(--ty, 0px));
  transition:transform .55s var(--hw-out), height .55s var(--hw-out);
}
.fq-tab{
  position:relative; z-index:1;
  display:flex; align-items:center; gap:12px;
  height:72px;
  padding:0 22px;
  border:0;
  background:none;
  font:inherit; font-size:17px; font-weight:500;
  text-align:start;
  color:#7D8A84;
  cursor:pointer;
  transition:color .35s var(--ease);
}
.fq-tab svg{ width:19px; height:19px; color:#A8B3AD; transition:color .35s var(--ease); }
.fq-tab em{
  margin-inline-start:auto;
  min-width:26px; height:26px; padding:0 8px;
  display:grid; place-items:center;
  border-radius:99px;
  font-style:normal; font-size:12.5px; font-weight:600;
  color:#8F9A94;
  background:rgba(18,60,53,.05);
  transition:color .35s var(--ease), background .35s var(--ease);
}
.fq-tab:hover{ color:var(--hw-ink); }
.fq-tab.is-on{ color:var(--hw-ink); font-weight:600; }
.fq-tab.is-on svg{ color:var(--hw-gold-d); }
.fq-tab.is-on em{ color:var(--hw-gold-d); background:rgba(212,175,90,.18); }
.fq-tab:focus-visible{ outline:2px solid var(--hw-gold); outline-offset:-4px; border-radius:22px; }


/* ---- the accordion ---- */
.fq-list{
  display:flex; flex-direction:column; gap:8px;
  padding:8px;
  background:var(--sand);
  border-radius:var(--r);
  border-start-start-radius:0;                    /* joins the category panel */
}
.fq-shell.is-floating .fq-list{ border-start-start-radius:var(--r); }
.fq-shell.is-end .fq-list{ border-end-start-radius:0; }   /* panel sits flush at the bottom */
.fq-item{
  border-radius:22px;
  background:#FFFDF8;
  border:1px solid transparent;
  transition:border-color .4s var(--ease), box-shadow .4s var(--ease), opacity .45s var(--hw-out), transform .45s var(--hw-out);
}
.fq-item[hidden]{ display:none; }
.fq-item:hover{ border-color:rgba(176,143,62,.22); }
.fq-item.is-open{ box-shadow:0 20px 40px -32px rgba(18,60,53,.55); }
/* entering after a category switch */
.fq-item.is-enter{ opacity:0; transform:translateY(14px); }

.fq-item h3{ margin:0; }
.fq-q{
  width:100%;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  min-height:96px;
  padding:22px 34px;
  border:0;
  background:none;
  font:inherit; font-size:clamp(17px, 1.45vw, 21px); font-weight:500; line-height:1.6;
  text-align:start;
  color:#3E4E48;
  cursor:pointer;
  transition:color .35s var(--ease);
}
.fq-q:hover, .fq-item.is-open .fq-q{ color:var(--hw-ink); }
.fq-item.is-open .fq-q{ font-weight:600; }
.fq-q:focus-visible{ outline:2px solid var(--hw-gold); outline-offset:-4px; border-radius:22px; }

/* plus that turns into a minus */
.fq-ico{
  position:relative; flex:none;
  width:38px; height:38px;
  border-radius:50%;
  background:#F4EEE1;
  transition:background .4s var(--ease), transform .5s var(--hw-out);
}
.fq-ico::before, .fq-ico::after{
  content:"";
  position:absolute; top:50%; left:50%;
  width:14px; height:1.6px; margin:-.8px 0 0 -7px;
  border-radius:2px;
  background:var(--hw-ink);
  transition:transform .5s var(--hw-out), background .4s var(--ease);
}
.fq-ico::after{ transform:rotate(90deg); }
.fq-q:hover .fq-ico{ background:#EFE4C9; }
.fq-item.is-open .fq-ico{ background:var(--hw-forest); transform:rotate(180deg); }
.fq-item.is-open .fq-ico::before, .fq-item.is-open .fq-ico::after{ background:var(--hw-gold-l); }
.fq-item.is-open .fq-ico::after{ transform:rotate(0deg); }

/* height animates through a 0fr → 1fr grid row */
.fq-a{
  display:grid;
  grid-template-rows:0fr;
  transition:grid-template-rows .55s var(--hw-out);
}
.fq-a > div{ overflow:hidden; }
.fq-a p{
  max-width:640px;
  margin:0;
  padding:0 34px 30px;
  font-size:16.5px; line-height:2;
  color:#56665F;
  opacity:0;
  transform:translateY(-6px);
  transition:opacity .35s var(--ease), transform .45s var(--hw-out);
}
.fq-item.is-open .fq-a{ grid-template-rows:1fr; }
.fq-item.is-open .fq-a p{ opacity:1; transform:none; transition-delay:.12s; }

/* ---- after the questions: still unsure? ---- */
.fq-contact{
  position:relative;
  overflow:hidden;
  display:flex; align-items:stretch; justify-content:space-between;
  min-height:330px;
  border-radius:22px;
  background:#FFFDF8;
}
.fq-contact-text{
  position:relative; z-index:1;
  align-self:center;
  max-width:470px;
  padding:44px 40px;
}
.fq-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 14px 6px 12px;
  border-radius:99px;
  font-size:14px; font-weight:500;
  color:var(--hw-ink);
  background:#F4EEE1;
  border:1px solid rgba(176,143,62,.16);
}
.fq-chip svg{ width:16px; height:16px; color:var(--hw-gold-d); }
.fq-contact h3{
  margin:22px 0 0;
  font-size:clamp(22px, 2vw, 28px);
  line-height:1.45;
  font-weight:600;
  color:var(--hw-ink);
}
.fq-contact p{ margin:12px 0 0; font-size:15.5px; line-height:1.95; color:#56665F; }

.fq-cta{
  display:inline-flex; align-items:center; gap:14px;
  height:54px;
  margin-top:28px;
  padding-inline:5px 24px;
  border-radius:16px;
  font-size:16px; font-weight:600;
  color:var(--hw-ivory);
  background:var(--hw-forest);
  box-shadow:0 16px 30px -20px rgba(18,60,53,.8);
  transition:background .35s var(--ease), transform .35s var(--ease);
}
.fq-cta-ico{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:12px;
  color:var(--hw-forest);
  background:linear-gradient(140deg, var(--hw-gold-l), var(--hw-gold));
  transition:transform .4s var(--hw-out);
}
.fq-cta-ico svg{ width:18px; height:18px; }
.fq-cta:hover{ background:#0E322C; transform:translateY(-2px); }
.fq-cta:hover .fq-cta-ico{ transform:translateX(-3px); }

/* the photo's white studio ground multiplies into the card, so she
   reads as a cut-out standing at the card's far edge */
.fq-contact-img{
  align-self:flex-end;
  width:300px; height:330px;
  margin-inline-end:24px;
  object-fit:cover;
  object-position:62% 30%;
  /* lift the light-grey studio ground to white, then multiply it away */
  filter:brightness(1.1) contrast(1.06);
  mix-blend-mode:multiply;
  -webkit-mask-image:radial-gradient(70% 85% at 55% 40%, #000 58%, transparent 92%);
          mask-image:radial-gradient(70% 85% at 55% 40%, #000 58%, transparent 92%);
}


/* FAQ: categories become a row of chips above the questions */
@media (max-width:860px){
  .hw-faq{ padding:80px 0 96px; }
  .fq-shell{ grid-template-columns:minmax(0, 1fr); margin-top:40px; --r:26px; }
  .fq-side{ position:static; min-width:0; padding:8px 8px 0; border-radius:var(--r) var(--r) 0 0; }
  .fq-side::before, .fq-side::after{ display:none; }
  .fq-shell .fq-list, .fq-shell.is-floating .fq-list, .fq-shell.is-end .fq-list{ border-radius:0 0 var(--r) var(--r); }
  .fq-tabs{
    flex-direction:row; gap:6px;
    overflow-x:auto; scrollbar-width:none;
  }
  .fq-tabs::-webkit-scrollbar{ display:none; }
  .fq-thumb{ display:none; }
  .fq-tab{ flex:none; height:50px; padding:0 16px; border-radius:16px; font-size:15.5px; transition:color .35s var(--ease), background .35s var(--ease); }
  .fq-tab.is-on{ background:#FFFDF8; box-shadow:0 12px 26px -22px rgba(18,60,53,.55); }
  .fq-tab em{ display:none; }
  .fq-contact{ flex-direction:column; min-height:0; }
  .fq-contact-text{ padding:30px 22px 8px; max-width:none; }
  .fq-contact-img{ align-self:center; width:240px; height:250px; margin:0; }
  .fq-q{ min-height:80px; padding:18px 22px; }
  .fq-a p{ padding:0 22px 24px; font-size:15.5px; }
  .fq-ico{ width:34px; height:34px; }
}
@media (max-width:640px){ .hw-faq .hw-wrap{ padding:0 18px; } }
@media (prefers-reduced-motion:reduce){
  .hw-faq .hw-up{ opacity:1 !important; transform:none !important; }
  .fq-thumb, .fq-item, .fq-a, .fq-a p, .fq-ico, .fq-ico::before, .fq-ico::after{ transition-duration:.01s !important; }
}

}
