/* =============================================================================
   COMPONENTS.CSS — Al Itqan Decor V2
   Reusable UI components: buttons, cards, FAB, header
============================================================================= */

/* ── Primary WhatsApp Button ─────────────────────────────────────────────── */
.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  min-height: 56px;
  background: var(--color-whatsapp);
  color: #fff;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  box-shadow: var(--shadow-md);
  transition: background var(--duration-base) var(--ease-out),
              transform  var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.btn-wa svg { flex-shrink: 0; width: 20px; height: 20px; }
.btn-wa:hover  { background: var(--color-whatsapp-hover); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-wa:active { transform: translateY(0); box-shadow: var(--shadow-md); }

/* Header-sized compact variant */
.btn-wa--sm {
  padding: var(--sp-2) var(--sp-4);
  min-height: auto;
  font-size: var(--text-sm);
  border-radius: var(--r-sm);
}

/* ── Secondary / Outlined Button ──────────────────────────────────────────── */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  min-height: 56px;
  background: transparent;
  color: var(--color-charcoal);
  border: 1.5px solid var(--color-charcoal);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  transition: background var(--duration-base) var(--ease-out),
              color     var(--duration-base) var(--ease-out);
}
.btn-outline svg { flex-shrink: 0; width: 20px; height: 20px; }
.btn-outline:hover { background: var(--color-charcoal); color: var(--color-bone); }

/* Bone variant for dark backgrounds */
.btn-outline--bone {
  color: var(--color-bone);
  border-color: rgba(250,250,247,0.4);
}
.btn-outline--bone:hover { background: var(--color-bone); color: var(--color-charcoal); }

/* ── Text CTA (arrow link) ───────────────────────────────────────────────── */
.link-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-charcoal);
  transition: color var(--duration-base) var(--ease-out);
}
.link-cta svg { width: 18px; height: 18px; transition: transform var(--duration-base) var(--ease-out); }
.link-cta:hover { color: var(--color-terracotta); }
html[dir="rtl"] .link-cta:hover svg { transform: translateX(-4px); }
html[dir="ltr"] .link-cta:hover svg { transform: translateX(4px); }

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-bone);
  border-radius: var(--r-lg);
  padding: var(--sp-7);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--duration-slow) var(--ease-out),
              transform  var(--duration-slow) var(--ease-out);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

/* ── Floating WhatsApp FAB ───────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);    /* Always bottom-right regardless of RTL */
  width: 56px;
  height: 56px;
  border-radius: var(--r-full);
  background: var(--color-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-float);
  z-index: 200;
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.fab svg { width: 28px; height: 28px; }
.fab:hover { transform: scale(1.07); box-shadow: 0 12px 32px rgba(37,211,102,0.40); }
@media (min-width: 768px) {
  .fab { width: 64px; height: 64px; bottom: var(--sp-6); right: var(--sp-6); }
  .fab svg { width: 32px; height: 32px; }
}

/* ── Sticky Header ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: var(--color-bone);
  border-block-end: 1px solid rgba(168,163,156,0.2);
  transition: box-shadow var(--duration-base) var(--ease-out);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .site-header { height: 72px; } }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo img { height: 48px; display: block; }
@media (min-width: 768px) { .header-logo img { height: 64px; } }

.header-actions { display: flex; align-items: center; gap: var(--sp-4); }

.lang-toggle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  transition: color var(--duration-base);
}
.lang-toggle:hover { color: var(--color-terracotta); }

/* ── Service Card (extends .card) ────────────────────────────────────────── */
.service-card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-terracotta);
  margin-block-end: var(--sp-5);
}
.service-card__title { margin-block-end: var(--sp-1); }
.service-card__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-block-end: var(--sp-5);
  font-family: var(--font-body-en);
}
.service-card__list { margin-block-end: var(--sp-6); }
.service-card__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-block-end: var(--sp-3);
  font-size: var(--text-base);
  color: var(--text-secondary);
}
.service-card__list li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-terracotta);
  margin-block-start: 2px;
}

/* ── Pillar (Why Us) ─────────────────────────────────────────────────────── */
.pillar__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--color-terracotta);
  opacity: 0.6;
  margin-block-end: var(--sp-3);
  letter-spacing: -0.03em;
}
.pillar__title { margin-block-end: var(--sp-2); }
.pillar__body  { color: var(--text-secondary); }

/* ── Gallery Tile ─────────────────────────────────────────────────────────── */
.gallery-tile {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--color-charcoal-soft);
  transition: transform var(--duration-slow) var(--ease-out);
}
.gallery-tile:hover { transform: translateY(-6px); }

.gallery-tile__img-wrap {
  position: relative;
  padding-block-start: 62.5%;  /* 16:10 */
  overflow: hidden;
}
.gallery-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}
.gallery-tile:hover .gallery-tile__img { transform: scale(1.04); }

.gallery-tile__body { padding: var(--sp-4) var(--sp-5); }
.gallery-tile__tag {
  display: inline-block;
  background: var(--color-terracotta);
  color: var(--color-bone);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2em 0.7em;
  border-radius: var(--r-full);
  margin-block-end: var(--sp-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gallery-tile__caption { color: var(--color-bone); font-size: var(--text-base); font-weight: 600; margin-block-end: var(--sp-1); }
.gallery-tile__loc     { color: var(--color-stone-light); font-size: var(--text-sm); }

/* ── Testimonial Card ────────────────────────────────────────────────────── */
.testi-card { position: relative; }
.testi-card__stars {
  display: flex;
  gap: 3px;
  color: var(--color-terracotta);
  margin-block-end: var(--sp-4);
}
.testi-card__stars svg { width: 18px; height: 18px; fill: currentColor; }
.testi-card__quote {
  font-size: var(--text-lg);
  font-style: italic;
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  margin-block-end: var(--sp-5);
}
.testi-card__divider {
  width: 40px;
  height: 2px;
  background: var(--color-terracotta);
  margin-block-end: var(--sp-4);
}
.testi-card__name     { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); margin-block-end: var(--sp-1); }
.testi-card__meta     { color: var(--text-secondary); font-size: var(--text-sm); }

/* ── Process Step ─────────────────────────────────────────────────────────── */
.process-step__num {
  width: 52px;
  height: 52px;
  border-radius: var(--r-full);
  border: 2px solid var(--color-terracotta);
  color: var(--color-terracotta);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-block-end: var(--sp-4);
  background: var(--color-bone-warm);
  flex-shrink: 0;
}
.process-step__title { margin-block-end: var(--sp-2); }
.process-step__body  { color: var(--text-secondary); }

/* ── FAQ Accordion ───────────────────────────────────────────────────────── */
.faq-item { border-block-end: 1px solid rgba(184,149,106,0.2); }
.faq-item:first-child { border-block-start: 1px solid rgba(184,149,106,0.2); }

.faq-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  text-align: start;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
}
.faq-btn__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--color-terracotta);
  transition: transform var(--duration-slow) var(--ease-out);
}
.faq-item.is-open .faq-btn__icon { transform: rotate(180deg); }

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out),
              padding    var(--duration-slow) var(--ease-out);
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}
.faq-item.is-open .faq-body {
  max-height: 600px;
  padding-block-end: var(--sp-5);
}
