/* ============================================================
   LAYOUT — All sections + RTL overrides
   ============================================================ */

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-image: url('../img/hero_bg.webp'),
    linear-gradient(160deg, #0a1223 0%, #1e3a5f 50%, #0d2137 100%);
  background-size: cover;
  background-position: center 40%;
  background-attachment: fixed;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(10, 18, 35, 0.72) 0%,
    rgba(10, 18, 35, 0.52) 55%,
    rgba(10, 18, 35, 0.28) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: var(--z-hero);
  padding: 120px 48px 160px;
  max-width: var(--container);
  margin-inline: auto;
  width: 100%;
}

.hero__eyebrow {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 20px;
  animation: fadeSlideUp 0.8s var(--ease-out) both;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: normal;
  color: var(--color-white);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  max-width: 680px;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.12s both;
}

.hero__subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 36px;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.22s both;
}

.hero__pills {
  margin-bottom: 40px;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.32s both;
}

.hero__ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.42s both;
}

/* Trust bar */
.hero__trust {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-hero);
  background: rgba(10, 18, 35, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(201, 185, 154, 0.2);
}

.hero__trust-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 22px 48px;
  display: flex;
  align-items: center;
  gap: 0;
}

.trust-item {
  flex: 1;
  padding-inline: 24px;
  border-right: 1px solid rgba(201, 185, 154, 0.2);
  animation: fadeSlideUp 0.8s var(--ease-out) 0.52s both;
}

.trust-item:first-child { padding-left: 0; }
.trust-item:last-child  { border-right: none; }

.trust-item__num {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--color-white);
  line-height: 1;
  margin-bottom: 4px;
}

.trust-item__label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* Hero keyframes */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── SERVICES OVERVIEW (03) ──────────────────────────────── */
.services-overview {
  background: var(--color-cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── NOTARY DETAILS (04) ─────────────────────────────────── */
.notary-details {
  background: var(--color-white);
}

/* ── INHERITANCE (05) ────────────────────────────────────── */
.inheritance {
  background: var(--color-sage);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  gap: 0;
  align-items: start;
}

.two-col__text {}

.two-col__divider {
  display: flex;
  justify-content: center;
  padding-top: 60px;
}

.two-col__divider-line {
  width: 1px;
  height: 240px;
  background: linear-gradient(to bottom, transparent 0%, var(--color-gold) 30%, var(--color-gold) 70%, transparent 100%);
}

.two-col__content h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 36px);
  color: var(--color-navy);
  margin-bottom: 16px;
  font-weight: normal;
}

.two-col__content p {
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 28px;
}

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  counter-reset: steps;
}

.steps-list__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  counter-increment: steps;
}

.steps-list__num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-navy);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
}

.steps-list__text {
  padding-top: 6px;
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.65;
}

/* ── REAL ESTATE (06) ────────────────────────────────────── */
.real-estate {
  background: var(--color-white);
}

.real-estate .two-col {
  direction: ltr; /* explicitly keep LTR even in RTL context */
}

/* Mirror: on desktop, content then divider then text */
.two-col--mirror .two-col__content { order: 3; }
.two-col--mirror .two-col__divider  { order: 2; }
.two-col--mirror .two-col__text     { order: 1; }

/* ── WHY US (07) ─────────────────────────────────────────── */
.why-us {
  background: var(--color-navy);
}

.why-us .section-eyebrow {
  color: var(--color-gold);
}

.why-us .section-eyebrow::before {
  background: var(--color-gold);
}

.why-us .section-title {
  color: var(--color-white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* ── ABOUT (08) ──────────────────────────────────────────── */
.about {
  background: var(--color-cream);
}

.about__inner {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 80px;
  align-items: start;
}

.about__photo-wrap {
  position: relative;
}

.about__photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: block;
  background: var(--color-warm);
}

/* Placeholder for missing photo */
.about__photo-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, var(--color-warm) 0%, var(--color-sage) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 14px;
  letter-spacing: 0.06em;
}

.about__photo-accent {
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 120px;
  height: 120px;
  border: 2px solid var(--color-gold);
  border-radius: var(--radius);
  z-index: -1;
}

.about__content {}

.about__name {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.5vw, 42px);
  color: var(--color-navy);
  margin-bottom: 6px;
  font-weight: normal;
}

.about__role {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: 28px;
}

.about__bio {
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 36px;
}

.about__facts {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--color-warm);
  padding-top: 32px;
  margin-top: 4px;
}

.about__fact {
  flex: 1;
  padding-right: 28px;
  border-right: 1px solid var(--color-warm);
  margin-right: 28px;
}

.about__fact:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.about__fact-num {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--color-navy);
  line-height: 1;
  margin-bottom: 4px;
}

.about__fact-label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

/* ── REVIEWS (09) ────────────────────────────────────────── */
.reviews {
  background: var(--color-cream);
  padding-block: 96px 80px;
  overflow: hidden;
}

.reviews__header {
  margin-bottom: 56px;
}

/* Desktop carousel wrapper — clips to exactly 3 visible cards */
.reviews-marquee-wrap {
  overflow: hidden;
  max-width: 1200px;
  margin-inline: auto;
}

/* Desktop: transform-driven track */
.reviews-marquee {
  display: flex;
  gap: 28px;
  width: max-content;
  transition: transform 0.5s var(--ease);
}

/* Hide loop duplicates on desktop */
.review-slide[aria-hidden="true"] { display: none; }

/* ── FORM (10) ───────────────────────────────────────────── */
.contact-form-section {
  background: var(--color-footer);
}

.contact-form-section .section-eyebrow {
  color: var(--color-gold);
}

.contact-form-section .section-eyebrow::before {
  background: var(--color-gold);
}

.contact-form-section .section-title {
  color: var(--color-white);
}

.contact-form-section .section-subtitle {
  color: rgba(255,255,255,0.55);
}

.form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.form-aside__title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--color-white);
  margin-bottom: 20px;
  font-weight: normal;
}

.form-aside__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-aside__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: rgba(255,255,255,0.62);
  line-height: 1.55;
}

.form-aside__item::before {
  content: '';
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-gold);
  margin-top: 9px;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── CONTACTS (11) ───────────────────────────────────────── */
.contacts-section {
  background: var(--color-white);
}

.contacts-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contacts-map {
  border-radius: var(--radius);
  overflow: hidden;
  height: 360px;
  box-shadow: var(--shadow-sm);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  background: var(--color-footer);
  padding: 40px 0;
  border-top: 1px solid rgba(201, 185, 154, 0.12);
}

.footer__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__logo {
  font-family: var(--font-serif);
  font-size: 18px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.02em;
}

.footer__copy {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

.footer__lang {
  font-size: 13px;
  color: var(--color-gold);
  letter-spacing: 0.05em;
  transition: color var(--t-fast) var(--ease);
}

.footer__lang:hover {
  color: var(--color-gold-dark);
}

/* ============================================================
   RTL OVERRIDES — [dir="rtl"]
   ============================================================ */

[dir="rtl"] .section-eyebrow::before {
  margin-right: 0;
  margin-left: 10px;
}

[dir="rtl"] .nav__links {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav__link::after {
  transform-origin: right;
}

[dir="rtl"] .hero__content {
  text-align: right;
}

[dir="rtl"] .hero__pills {
  direction: rtl;
}

[dir="rtl"] .hero__ctas {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero__trust-inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .trust-item {
  text-align: right;
}

[dir="rtl"] .two-col {
  direction: rtl;
}

[dir="rtl"] .two-col--mirror {
  direction: ltr;
}

[dir="rtl"] .about__inner {
  direction: rtl;
}

[dir="rtl"] .form-layout {
  direction: rtl;
}

[dir="rtl"] .footer__inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .accordion__trigger {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .contact-item {
  text-align: right;
}

[dir="rtl"] .reviews__nav {
  flex-direction: row-reverse;
}

/* Normalize RTL carousel to LTR layout so translateX direction is consistent */
[dir="rtl"] .reviews-marquee-wrap {
  direction: ltr;
}
[dir="rtl"] .review-slide {
  direction: rtl;
}

[dir="rtl"] .gold-list li {
  flex-direction: row-reverse;
}

[dir="rtl"] .steps-list__item {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .service-card {
  text-align: right;
}

[dir="rtl"] .feature-card {
  text-align: right;
}

[dir="rtl"] .contacts-inner {
  direction: rtl;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .container { padding-inline: 32px; }
  .nav__inner { padding-inline: 32px; }
  .hero__content { padding-inline: 32px; }
  .hero__trust-inner { padding-inline: 32px; }
  .footer__inner { padding-inline: 32px; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .about__inner { grid-template-columns: 300px 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .container { padding-inline: 20px; }
  .nav__inner { padding-inline: 20px; }
  .hero__content { padding: 100px 20px 120px; }
  .hero__trust-inner {
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
  }
  .footer__inner { padding-inline: 20px; }

  .section { padding-block: 64px; }
  .section--lg { padding-block: 80px; }

  /* Hero: one-screen fit on mobile */
  .hero {
    background-attachment: scroll;
    justify-content: flex-start;
    min-height: 0;
    height: 100vh;       /* fallback */
    height: 100dvh;      /* dynamic — accounts for browser chrome */
  }
  .hero__content {
    flex: 1;
    min-height: 0;
    padding: 78px 20px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  /* Tighten hero element spacing on mobile */
  .hero__eyebrow   { margin-bottom: 12px; }
  .hero__title     { margin-bottom: 14px; }
  .hero__subtitle  { margin-bottom: 16px; font-size: 14px; }
  .hero__pills     { margin-bottom: 20px; }
  .hero__trust {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    flex-shrink: 0;
  }

  /* Nav: show mobile controls (lang + burger), hide desktop links */
  .nav__links { display: none; }
  .nav__mobile-controls { display: flex; }

  .services-grid { grid-template-columns: 1fr; gap: 20px; }
  .features-grid { grid-template-columns: 1fr; }

  /* Reviews: touch scroll-snap on mobile */
  .reviews-marquee-wrap {
    overflow-x: auto;
    overflow-y: visible;
    padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .reviews-marquee-wrap::-webkit-scrollbar { display: none; }
  .reviews-marquee {
    transition: none;
    transform: none !important;
    scroll-snap-type: x mandatory;
    padding-inline: 20px;
    gap: 16px;
  }
  .review-slide {
    width: 82vw;
    scroll-snap-align: start;
  }
  /* Show duplicates on mobile for seamless loop feel */
  .review-slide[aria-hidden="true"] { display: flex; }

  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .two-col__divider { display: none; }
  .two-col--mirror .two-col__content { order: 1; }
  .two-col--mirror .two-col__text    { order: 2; }

  .about__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__photo-wrap { max-width: none; width: 100%; }
  .about__photo-accent { display: none; }
  /* About facts: compact 3-column card grid on mobile */
  .about__facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: none;
    padding-top: 0;
    margin-top: 28px;
    border: 1px solid var(--color-warm);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }
  .about__fact {
    flex: none;
    padding: 20px 12px;
    text-align: center;
    border-right: 1px solid var(--color-warm);
    border-bottom: none;
    padding-right: 12px;
    margin-right: 0;
    background: var(--color-cream);
  }
  .about__fact:last-child {
    border-right: none;
    padding-bottom: 20px;
  }
  .about__fact-num { font-size: 26px; }
  .about__fact-label { font-size: 11px; }

  .form-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contacts-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Trust bar 2×2 grid items */
  .trust-item {
    flex: none;
    padding: 11px 14px;
    border-right: none;
    border-bottom: 1px solid rgba(201, 185, 154, 0.2);
  }
  .trust-item:nth-child(odd)  { border-right: 1px solid rgba(201, 185, 154, 0.2); }
  .trust-item:nth-child(3),
  .trust-item:nth-child(4)    { border-bottom: none; }
  .trust-item:first-child     { padding-left: 14px; }
  .trust-item__num            { font-size: 18px; }
  .trust-item__label          { font-size: 10px; }

  .hero__title { font-size: clamp(26px, 7.5vw, 40px); }
}

/* Desktop: exactly 3 review cards fill the 1200px wrap */
@media (min-width: 769px) {
  .review-slide {
    /* (100vw - 2 gaps) / 3, capped so 3 fit in max-width 1200px */
    width: min(381px, calc((100vw - 56px) / 3));
  }
}

/* Desktop: compact hero for short screens (laptops ~768px tall) */
@media (min-width: 769px) and (max-height: 780px) {
  .hero__content { padding: 88px 48px 120px; }
  .hero__title   { font-size: clamp(32px, 4.5vw, 54px); margin-bottom: 16px; }
  .hero__subtitle { margin-bottom: 22px; }
  .hero__pills   { margin-bottom: 26px; }
}

@media (max-width: 480px) {
  .hero__ctas { flex-direction: column; align-items: flex-start; }
  /* Both LTR and RTL: override specificity with combined selector */
  [dir="rtl"] .footer__inner,
  [dir="ltr"] .footer__inner,
  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
}

