/* =========================================================
   Phase HOME-3 — home sections after the hero (services, areas,
   estimate, reviews, why, FAQ, articles). Shared section kit: almk-.
   Markup: template-parts/home/*.php · JS: assets/js/home-sections.js
   ========================================================= */

/* ---------- Section kit ---------- */
.almk { position: relative; padding: 80px 0; direction: rtl; text-align: right; color: var(--alm-navy); }
.almk--white { background: #fff; }
.almk--sand  { background: var(--alm-sand, #F6F1E8); }
.almk-head { max-width: 760px; margin: 0 0 36px; }
.almk-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px;
  color: #A97E25; font-weight: 900; font-size: .92rem;
}
.almk-kicker::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--alm-gold); }
.almk-title { margin: 0 0 10px; color: var(--alm-navy); font-weight: 1000; font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.25rem); line-height: 1.4; }
.almk-sub { margin: 0; color: var(--alm-slate, #5b6b7d); font-weight: 700; font-size: 1.03rem; line-height: 1.9; }
.almk-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--alm-navy); font-weight: 900; text-decoration: none;
  border-bottom: 2px solid var(--alm-gold); padding-bottom: 2px;
}
.almk-link .alm-icon { width: 17px; height: 17px; transition: transform .2s ease; }
.almk-link:hover { color: #A97E25; }
.almk-link:hover .alm-icon { transform: translateX(-4px); }
.almk a:focus-visible, .almk button:focus-visible, .almk summary:focus-visible, .almk input:focus-visible, .almk select:focus-visible { outline: 3px solid var(--alm-gold); outline-offset: 2px; }

/* reveal (only when JS is on and motion allowed) */
.almk-js .almk-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.almk-js .almk-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Services ---------- */
.almsv__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.almsv-card {
  position: relative; display: grid; grid-template-columns: 132px 1fr; align-items: stretch;
  border-radius: 20px; overflow: hidden; background: #fff;
  border: 1px solid rgba(16, 32, 51, .1); box-shadow: 0 10px 30px rgba(16, 32, 51, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.almsv-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(16, 32, 51, .12); border-color: rgba(201, 154, 58, .5); }
.almsv-card__img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 150px; }
.almsv-card__body { padding: 16px 16px 16px 40px; display: flex; flex-direction: column; gap: 6px; }
.almsv-card__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(201, 154, 58, .14); color: #A97E25; }
.almsv-card__icon .alm-icon { width: 19px; height: 19px; }
.almsv-card__title { margin: 0; font-size: 1.08rem; font-weight: 1000; line-height: 1.5; }
.almsv-card__title a { color: var(--alm-navy); text-decoration: none; }
.almsv-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.almsv-card__text { margin: 0; color: var(--alm-slate, #5b6b7d); font-weight: 700; font-size: .92rem; line-height: 1.75; }
.almsv-card__arrow { position: absolute; bottom: 14px; inset-inline-end: 14px; color: #A97E25; }
.almsv-card__arrow .alm-icon { width: 18px; height: 18px; transition: transform .2s ease; }
.almsv-card:hover .almsv-card__arrow .alm-icon { transform: translateX(-4px); }

.almsv__types { margin-top: 28px; padding: 22px; border-radius: 22px; background: var(--alm-sand, #F6F1E8); }
.almsv__types-title { margin: 0 0 14px; font-size: 1.05rem; font-weight: 1000; color: var(--alm-navy); }
.almsv__types-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.almsv__types-list li { display: flex; gap: 10px; align-items: flex-start; }
.almsv__types-list b { display: block; font-weight: 1000; color: var(--alm-navy); margin-bottom: 2px; }
.almsv__types-list span { font-weight: 700; color: var(--alm-slate, #5b6b7d); font-size: .9rem; line-height: 1.7; }
.almsv__types-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: #A97E25; box-shadow: 0 6px 16px rgba(16, 32, 51, .07); }
.almsv__types-icon .alm-icon { width: 20px; height: 20px; }

/* ---------- Areas ---------- */
.almar__head { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.almar__head > div { max-width: 700px; }
.almar__search {
  display: flex; align-items: center; gap: 8px; min-width: 280px;
  padding: 0 14px; border-radius: 16px; background: #fff; border: 1px solid rgba(16, 32, 51, .14);
  box-shadow: 0 8px 22px rgba(16, 32, 51, .06);
}
.almar__search .alm-icon { width: 19px; height: 19px; color: #A97E25; flex: none; }
.almar__search input { flex: 1; border: 0; outline: 0; background: none; padding: 14px 0; font: inherit; font-weight: 800; color: var(--alm-navy); min-width: 0; }
.almar__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.almar-group { padding: 22px; border-radius: 22px; background: #fff; border: 1px solid rgba(16, 32, 51, .08); }
.almar-group__title { margin: 0 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 1.1rem; font-weight: 1000; }
.almar-group__title a { color: var(--alm-navy); text-decoration: none; }
.almar-group__title a:hover { color: #A97E25; }
.almar-group__count { flex: none; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: var(--alm-navy); color: #fff; font-size: .82rem; font-weight: 900; }
.almar-group__note { margin: 0 0 14px; color: var(--alm-slate, #5b6b7d); font-weight: 700; font-size: .9rem; line-height: 1.75; }
.almar-group__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.almar-group__list a {
  display: inline-block; padding: 7px 12px; border-radius: 999px; text-decoration: none;
  background: var(--alm-sand, #F6F1E8); color: var(--alm-navy); font-weight: 850; font-size: .9rem;
  border: 1px solid transparent; transition: border-color .2s ease, background .2s ease;
}
.almar-group__list a:hover { border-color: var(--alm-gold); background: #fff; }
.almar-group__list li.is-match a { background: var(--alm-navy); color: #fff; }
.almar__empty { margin: 18px 0 0; padding: 14px 18px; border-radius: 14px; background: #fff; font-weight: 800; }
.almar__empty a, .almar__foot a:not(.almk-link) { color: #1b8f4c; font-weight: 900; }
.almar__foot { margin: 22px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-weight: 800; color: var(--alm-slate, #5b6b7d); }

/* ---------- Estimate ---------- */
.almes__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.almes__factors { list-style: none; margin: 24px 0 22px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.almes__factors li { display: flex; gap: 10px; align-items: flex-start; }
.almes__factors b { display: block; font-weight: 1000; color: var(--alm-navy); }
.almes__factors span { font-weight: 700; color: var(--alm-slate, #5b6b7d); font-size: .9rem; line-height: 1.65; }
.almes__factor-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(201, 154, 58, .14); color: #A97E25; }
.almes__factor-icon .alm-icon { width: 20px; height: 20px; }

.almes-form {
  padding: 26px; border-radius: 26px; background: var(--alm-navy); color: #fff;
  box-shadow: 0 30px 60px rgba(16, 32, 51, .25);
  background-image: radial-gradient(500px 260px at 100% 0%, rgba(201, 154, 58, .22), transparent 60%);
}
.almes-form__title { margin: 0 0 16px; font-weight: 1000; font-size: 1.2rem; }
.almes-form__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.almes-field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: .88rem; color: rgba(255, 255, 255, .8); }
.almes-field input, .almes-field select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-weight: 800;
}
.almes-field select option { color: var(--alm-navy); }
.almes-field input::placeholder { color: rgba(255, 255, 255, .45); }
.almes-field input[aria-invalid="true"] { border-color: #ff8a8a; }
.almes-extras { margin: 4px 0 16px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.almes-extras legend { width: 100%; margin-bottom: 8px; font-weight: 800; font-size: .88rem; color: rgba(255, 255, 255, .8); }
.almes-extras label {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .2); font-weight: 800; font-size: .9rem;
}
.almes-extras input { accent-color: var(--alm-gold); }
.almes-extras label:has(input:checked) { background: rgba(201, 154, 58, .2); border-color: var(--alm-gold); }
.almes-form__error { margin: 0 0 10px; color: #ffb3b3; font-weight: 800; font-size: .9rem; }
.almes-form__submit {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px; border: 0; border-radius: 16px; cursor: pointer; font: inherit; font-weight: 1000; font-size: 1.05rem;
  background: linear-gradient(135deg, #F1D58E, var(--alm-gold) 55%, #A97E25); color: var(--alm-navy);
  box-shadow: 0 14px 30px rgba(201, 154, 58, .35); transition: transform .2s ease;
}
.almes-form__submit:hover { transform: translateY(-2px); }
.almes-form__submit .alm-icon { width: 20px; height: 20px; }
.almes-form__alt { margin: 14px 0 4px; text-align: center; font-weight: 800; color: rgba(255, 255, 255, .8); }
.almes-form__alt a { color: #F1D58E; font-weight: 1000; text-decoration: none; }
.almes-form__note { margin: 0; text-align: center; font-size: .8rem; font-weight: 700; color: rgba(255, 255, 255, .5); }

/* ---------- Reviews ---------- */
.almrv__head { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.almrv__nav { display: flex; gap: 8px; }
.almrv__btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(16, 32, 51, .15); background: #fff; cursor: pointer;
  display: grid; place-items: center; color: var(--alm-navy); transition: background .2s ease;
}
.almrv__btn .alm-icon { width: 20px; height: 20px; transform: rotate(-90deg); }
.almrv__btn--next .alm-icon { transform: rotate(90deg); }
.almrv__btn:hover { background: var(--alm-sand, #F6F1E8); }
.almrv__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin;
}
.almrv__row > * { scroll-snap-align: start; }
.almrv-google {
  display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 24px; border-radius: 22px; text-decoration: none;
  background: var(--alm-navy); color: #fff; min-height: 220px;
}
.almrv-google__g { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #4285F4; font-weight: 1000; font-size: 1.25rem; font-family: Arial, sans-serif; }
.almrv-google__score { font-size: 2.6rem; font-weight: 1000; line-height: 1; margin-top: 6px; }
.almrv-google__stars { color: #F5B82E; letter-spacing: 2px; }
.almrv-google__text { font-weight: 900; }
.almrv-google__cta { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; color: #F1D58E; font-weight: 900; font-size: .9rem; }
.almrv-google__cta .alm-icon { width: 16px; height: 16px; }
.almrv-google:hover { color: #fff; }
.almrv-card { margin: 0; padding: 22px; border-radius: 22px; background: var(--alm-sand, #F6F1E8); display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
.almrv-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.almrv-card__stars { color: #F5B82E; letter-spacing: 1px; }
.almrv-card__tag { padding: 4px 10px; border-radius: 999px; background: #fff; font-weight: 900; font-size: .8rem; color: #A97E25; }
.almrv-card__text { margin: 0; flex: 1; font-weight: 750; line-height: 1.9; color: var(--alm-navy); }
.almrv-card__who { display: flex; align-items: center; gap: 10px; }
.almrv-card__avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--alm-navy); color: #fff; font-weight: 1000; }
.almrv-card__who b { display: block; font-weight: 1000; }
.almrv-card__who small { color: var(--alm-slate, #5b6b7d); font-weight: 800; }

/* ---------- Why ---------- */
.almwy__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.almwy__media { position: relative; margin: 0; }
.almwy__media img { width: 100%; height: auto; display: block; border-radius: 26px; box-shadow: 0 30px 60px rgba(16, 32, 51, .2); aspect-ratio: 3 / 4; object-fit: cover; }
.almwy__badge {
  position: absolute; bottom: 18px; inset-inline-start: 18px; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px; background: #fff; color: var(--alm-navy); font-weight: 900; font-size: .9rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}
.almwy__promises { list-style: none; margin: 24px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.almwy__promises li { display: flex; gap: 12px; padding: 16px; border-radius: 18px; background: #fff; }
.almwy__promises h3 { margin: 0 0 4px; font-size: 1rem; font-weight: 1000; color: var(--alm-navy); }
.almwy__promises p { margin: 0; color: var(--alm-slate, #5b6b7d); font-weight: 700; font-size: .9rem; line-height: 1.7; }
.almwy__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--alm-navy); color: var(--alm-gold); }
.almwy__icon .alm-icon { width: 20px; height: 20px; }
.almwy__facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.almwy__facts div { padding: 14px 10px; border-radius: 16px; text-align: center; border: 1px dashed rgba(169, 126, 37, .5); }
.almwy__facts dt { font-size: 1.45rem; font-weight: 1000; color: var(--alm-navy); line-height: 1.2; }
.almwy__facts dd { margin: 4px 0 0; font-size: .82rem; font-weight: 800; color: var(--alm-slate, #5b6b7d); line-height: 1.5; }

/* ---------- FAQ ---------- */
.almfq__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; align-items: start; }
.almfq-item { border-radius: 18px; background: var(--alm-sand, #F6F1E8); border: 1px solid transparent; transition: border-color .2s ease, background .2s ease; }
.almfq-item[open] { background: #fff; border-color: rgba(201, 154, 58, .45); box-shadow: 0 12px 30px rgba(16, 32, 51, .07); }
.almfq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 1000; color: var(--alm-navy); line-height: 1.6; }
.almfq-item summary::-webkit-details-marker { display: none; }
.almfq-item summary i { flex: none; position: relative; width: 26px; height: 26px; border-radius: 50%; background: #fff; }
.almfq-item summary i::before, .almfq-item summary i::after { content: ""; position: absolute; top: 50%; left: 50%; width: 11px; height: 2px; margin: -1px 0 0 -5.5px; background: #A97E25; border-radius: 2px; transition: transform .2s ease; }
.almfq-item summary i::after { transform: rotate(90deg); }
.almfq-item[open] summary i { background: var(--alm-sand, #F6F1E8); }
.almfq-item[open] summary i::after { transform: rotate(0); }
.almfq-item__a { padding: 0 18px 16px; }
.almfq-item__a p { margin: 0; color: var(--alm-slate, #5b6b7d); font-weight: 700; line-height: 1.9; }
.almfq-item__a a { color: var(--alm-navy); font-weight: 900; text-decoration: underline; text-decoration-color: var(--alm-gold); text-underline-offset: 3px; }

/* ---------- Articles ---------- */
.almbl__head { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.almbl__row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.almbl-card a { display: flex; flex-direction: column; height: 100%; border-radius: 20px; overflow: hidden; background: #fff; text-decoration: none; color: var(--alm-navy); transition: transform .2s ease, box-shadow .2s ease; }
.almbl-card a:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(16, 32, 51, .1); color: var(--alm-navy); }
.almbl-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.almbl-card__title { padding: 16px 16px 8px; font-weight: 1000; line-height: 1.7; flex: 1; }
.almbl-card__more { padding: 0 16px 16px; display: inline-flex; align-items: center; gap: 6px; color: #A97E25; font-weight: 900; font-size: .9rem; }
.almbl-card__more .alm-icon { width: 16px; height: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .almsv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .almsv__types-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .almk { padding: 56px 0; }
  .almar__grid { grid-template-columns: 1fr; }
  .almes__grid, .almwy__grid { grid-template-columns: 1fr; gap: 28px; }
  .almwy__media { max-width: 420px; }
  .almwy__media img { aspect-ratio: 4 / 3; }
  .almwy__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .almfq__list { grid-template-columns: 1fr; }
  .almbl__row { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(250px, 80%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .almbl-card { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .almk { padding: 44px 0; }
  .almk-head { margin-bottom: 24px; }
  .almsv__grid { grid-template-columns: 1fr; gap: 12px; }
  .almsv-card { grid-template-columns: 104px 1fr; }
  .almsv-card__img { min-height: 124px; }
  .almsv-card__body { padding: 12px 12px 12px 34px; }
  .almsv-card__icon { display: none; }
  .almsv__types { padding: 16px; }
  .almsv__types-list { grid-template-columns: 1fr; }
  .almar__search { min-width: 0; width: 100%; }
  .almar-group { padding: 16px; }
  .almes__factors { grid-template-columns: 1fr; }
  .almes-form { padding: 20px 16px; border-radius: 22px; }
  .almes-form__row2 { grid-template-columns: 1fr; }
  .almrv__nav { display: none; }
  .almrv__row { grid-auto-columns: 84%; }
  .almwy__promises { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .almk *, .almk *::before, .almk *::after { transition: none !important; animation: none !important; }
  .almk-js .almk-reveal { opacity: 1; transform: none; }
}
