/* ============================================================
   Home page layout only.

   Loaded through $page_css from index.php. Every class is
   prefixed "hm-" and scoped inside .hm-page, so nothing here
   can reach another page.

   Brand palette reused: #D32F2F red, #F7941D orange,
   #553216 brown, #FAF3ED cream, #2B2D42 navy.
   ============================================================ */

.hm-page {
  --hm-red: #D32F2F;
  --hm-orange: #F7941D;
  --hm-brown: #553216;
  --hm-cream: #FAF3ED;
  --hm-navy: #2B2D42;
  --hm-line: #e7ded5;
  --hm-body: #5b5954;
}

.hm-page p { color: var(--hm-body); line-height: 1.85; }

/* ---------- Banner ---------- */
.hm-banner img { width: 100%; height: auto; display: block; }

/* ---------- Trust strip under the banner ---------- */
.hm-trust {
  background: var(--hm-navy);
  padding: 16px 0;
}
.hm-trust__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.hm-trust__item {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff; font-size: 14px; font-weight: 600; text-align: left;
}
.hm-trust__item::before {
  content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: var(--hm-orange) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") no-repeat center / 12px 12px;
}

/* ---------- Section shell ---------- */
.hm-sec { padding: 72px 0; }
.hm-sec--cream { background: var(--hm-cream); }
.hm-sec--tight { padding: 52px 0; }
.hm-head { max-width: 800px; margin: 0 auto 44px; text-align: center; }
.hm-head--left { margin-left: 0; text-align: left; }
.hm-head h1, .hm-head h2, .hm-head h3, .hm-head h4 {
  font-size: 30px; font-weight: 700; color: var(--hm-brown); margin: 0 0 14px; line-height: 1.3;
}
.hm-head h4 { font-size: 26px; }
.hm-head .color-1 { color: var(--hm-red); }
.hm-rule { width: 66px; height: 3px; background: var(--hm-orange); border-radius: 2px; margin: 0 auto 20px; }
.hm-head--left .hm-rule { margin-left: 0; }
.hm-head p { margin: 0; font-size: 15.5px; }

/* ---------- Top three service cards ---------- */
.hm-top { padding: 56px 0 66px; }
.hm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hm-card {
  background: #fff; border: 1px solid var(--hm-line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column; height: 100%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hm-card:hover {
  transform: translateY(-5px); border-color: transparent;
  box-shadow: 0 16px 34px rgba(85, 50, 22, .15);
}
.hm-card__media { overflow: hidden; }
.hm-card__media img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  display: block; transition: transform .35s ease;
}
.hm-card:hover .hm-card__media img { transform: scale(1.07); }
.hm-card__body { padding: 22px 22px 24px; flex: 1; border-top: 3px solid var(--hm-orange); }
.hm-card__body h4 {
  font-size: 15.5px; font-weight: 700; color: var(--hm-navy);
  margin: 0 0 10px; line-height: 1.4; letter-spacing: .01em;
}
.hm-card__body p { font-size: 14.5px; margin: 0; }

/* ---------- Appointment box + form ---------- */
.hm-appt {
  background: linear-gradient(120deg, var(--hm-red), #a81f1f);
  border-radius: 12px; padding: 20px 22px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 10px 26px rgba(211, 47, 47, .24);
}
.hm-appt__icon {
  width: 58px; height: 58px; flex: none; border-radius: 50%;
  background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center;
}
.hm-appt__icon img { width: 34px; height: 34px; }
.hm-appt p { margin: 0; color: #ffe6e6; font-size: 14px; }
.hm-appt a {
  color: #fff; font-size: 22px; font-weight: 700; text-decoration: none; line-height: 1.2;
  display: block;
}
.hm-appt a:hover { color: #ffe0a8; }

.hm-form {
  background: var(--hm-navy); border-radius: 12px; padding: 24px 22px 26px; margin-top: 18px;
  box-shadow: 0 10px 30px rgba(43, 45, 66, .2);
}
.hm-form h4 {
  color: #fff; font-size: 19px; font-weight: 700; margin: 0 0 4px;
}
.hm-form__sub { color: #aeb5c9; font-size: 13.5px; margin: 0 0 18px; }
.hm-form .form-control {
  background: rgba(255, 255, 255, .96); border: 1px solid transparent;
  border-radius: 7px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 12px;
}
.hm-form .form-control:focus {
  border-color: var(--hm-orange); box-shadow: 0 0 0 3px rgba(247, 148, 29, .22); background: #fff;
}
.hm-form textarea.form-control { min-height: 96px; resize: vertical; }
.hm-form button {
  width: 100%; background: var(--hm-orange); border: 0; color: #fff;
  font-weight: 700; font-size: 14.5px; letter-spacing: .04em; text-transform: uppercase;
  padding: 13px 20px; border-radius: 7px; transition: background .18s ease;
}
.hm-form button:hover { background: #dd820f; }

/* ---------- Welcome split ---------- */
.hm-figure { position: relative; padding: 0 16px 16px 0; }
.hm-figure::before {
  content: ""; position: absolute; right: 0; bottom: 0; width: 70%; height: 70%;
  border: 3px solid var(--hm-orange); border-radius: 10px; z-index: 0;
}
.hm-figure img {
  position: relative; z-index: 1; width: 100%; height: auto;
  border-radius: 10px; box-shadow: 0 12px 30px rgba(85, 50, 22, .16);
}

/* ---------- Long copy block ---------- */
.hm-copy {
  background: #fff; border-left: 4px solid var(--hm-orange);
  border-radius: 0 12px 12px 0; padding: 30px 34px;
  box-shadow: 0 2px 16px rgba(85, 50, 22, .07);
}
.hm-copy p:last-child { margin-bottom: 0; }

/* ---------- Nine service tiles ---------- */
.hm-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hm-tile {
  position: relative; display: block; border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(85, 50, 22, .1); text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hm-tile:hover { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(85, 50, 22, .2); }
.hm-tile img {
  width: 100%; height: auto; aspect-ratio: 10 / 7; object-fit: cover;
  display: block; transition: transform .4s ease;
}
.hm-tile:hover img { transform: scale(1.08); }
.hm-tile__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 46px 18px 16px;
  background: linear-gradient(transparent, rgba(30, 20, 12, .88));
  color: #fff; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.hm-tile__label span { display: block; }
.hm-tile__label::after {
  content: ""; width: 22px; height: 22px; flex: none;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F7941D'%3E%3Cpath d='M12 4l-1.4 1.4L16.2 11H4v2h12.2l-5.6 5.6L12 20l8-8z'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0; transform: translateX(-6px); transition: .2s ease;
}
.hm-tile:hover .hm-tile__label::after { opacity: 1; transform: translateX(0); }
.hm-tile__label a { color: inherit; text-decoration: none; }

/* ---------- Why us ---------- */
.hm-why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.hm-why__item {
  background: #fff; border: 1px solid var(--hm-line); border-radius: 12px;
  padding: 26px 24px; display: flex; gap: 18px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.hm-why__item:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(85, 50, 22, .13); }
.hm-why__icon {
  width: 56px; height: 56px; flex: none; border-radius: 14px;
  background: var(--hm-cream); color: var(--hm-red);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.hm-why__item h5 {
  font-size: 15.5px; font-weight: 700; color: var(--hm-navy);
  margin: 0 0 9px; letter-spacing: .02em;
}
.hm-why__item p { font-size: 14.5px; margin: 0; }

/* ---------- Who we are ---------- */
.hm-who {
  background: #fff; border: 1px solid var(--hm-line); border-radius: 12px;
  overflow: hidden; height: 100%;
}
.hm-who img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.hm-who__body { padding: 24px 22px 26px; }
.hm-who__body h4 {
  font-size: 19px; font-weight: 700; color: var(--hm-brown); margin: 0 0 12px;
}
.hm-who__body p { font-size: 14.5px; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .hm-cards { grid-template-columns: repeat(2, 1fr); }
  .hm-tiles { grid-template-columns: repeat(2, 1fr); }
  .hm-why { grid-template-columns: 1fr; }
  .hm-trust__grid { grid-template-columns: repeat(2, 1fr); }
  .hm-figure { margin-top: 30px; }
  .hm-side { margin-top: 34px; }
}
@media (max-width: 575px) {
  .hm-cards, .hm-tiles { grid-template-columns: 1fr; }
  .hm-trust__grid { grid-template-columns: 1fr; gap: 10px; }
  .hm-trust__item { justify-content: flex-start; }
  .hm-sec { padding: 46px 0; }
  .hm-top { padding: 38px 0 46px; }
  .hm-head h1, .hm-head h2, .hm-head h3 { font-size: 23px; }
  .hm-head h4 { font-size: 21px; }
  .hm-copy { padding: 22px 20px; }
}
