/* ==========================================================================
   Hoa Mai Preschool — style dùng chung cho 13 trang con.
   Chỉ nạp ở trang tĩnh (is_page) — xem hoamai_assets() trong functions.php.
   Kế thừa biến màu từ hoamai.css.
   ========================================================================== */

/* --------------------------------------------------------------- Banner đầu trang */
.hm-phero {
  position: relative;
  background: var(--hm-green-d) center/cover no-repeat;
  color: #fff;
}
.hm-phero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(12,42,27,.88) 0%, rgba(12,42,27,.74) 45%, rgba(12,42,27,.42) 100%);
}
.hm-phero:not(.has-img) .hm-phero__veil {
  background: linear-gradient(120deg, var(--hm-green-d), var(--hm-green));
}
.hm-phero__inner {
  position: relative; z-index: 2;
  padding-block: clamp(2.5rem, 6vw, 4.25rem);
  max-width: 820px;
}
.hm-phero__eyebrow {
  display: block; font-size: .76rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--hm-yellow); margin-bottom: .7rem;
}
.hm-phero__title {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  font-weight: 800; color: #fff; line-height: 1.15; margin: 0 0 .7rem;
}
.hm-phero__desc { font-size: 1rem; line-height: 1.7; color: rgba(255,255,255,.85); margin: 0 0 1.1rem; max-width: 60ch; }
.hm-crumb { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .82rem; color: rgba(255,255,255,.72); }
.hm-crumb a { color: rgba(255,255,255,.9); text-decoration: none; }
.hm-crumb a:hover { color: var(--hm-yellow); }

/* --------------------------------------------------------------- Khung section */
.hm-sec { padding-block: clamp(2.75rem, 5.5vw, 4.5rem); background: #fff; }
.hm-sec--cream { background: var(--hm-cream-2); }
.hm-sec--cream2 { background: var(--hm-cream); }
.hm-sec--green { background: var(--hm-green); color: #fff; }
.hm-sec--green h2, .hm-sec--green h3 { color: #fff; }

.hm-lead { font-size: 1rem; line-height: 1.8; color: var(--hm-ink); }
.hm-lead p { margin: 0 0 1rem; }
.hm-muted { color: var(--hm-muted); }

/* --------------------------------------------------------------- 2 cột chữ + ảnh */
.hm-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 4.5vw, 3.5rem); align-items: center;
}
.hm-split--rev .hm-split__media { order: -1; }
.hm-split__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, #cfe6d8, #f0e7cc) center/cover no-repeat;
  border-radius: var(--hm-radius-lg);
  box-shadow: 0 16px 40px rgba(20,60,40,.13);
}
.hm-split__media--tall { aspect-ratio: 3 / 4; }

/* --------------------------------------------------------------- Lưới thẻ icon */
.hm-cards { display: grid; gap: clamp(1rem, 2vw, 1.5rem); list-style: none; margin: 0; padding: 0; }
.hm-cards--2 { grid-template-columns: repeat(2, 1fr); }
.hm-cards--3 { grid-template-columns: repeat(3, 1fr); }
.hm-cards--4 { grid-template-columns: repeat(4, 1fr); }

.hm-card {
  background: #fff; border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius); padding: 1.5rem 1.4rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hm-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20,60,40,.11); border-color: #cfe3d7; }
.hm-card__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--hm-cream); color: var(--hm-green); margin-bottom: .9rem;
}
.hm-card__ico .vs-ico { width: 26px; height: 26px; }
.hm-card h3 { font-size: 1.02rem; font-weight: 700; color: var(--hm-green-d); margin: 0 0 .45rem; }
.hm-card p { font-size: .87rem; line-height: 1.65; color: var(--hm-muted); margin: 0; }
.hm-card--flat { background: var(--hm-cream-2); border-color: transparent; }

/* --------------------------------------------------------------- Danh sách tick */
.hm-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.hm-checklist li { display: flex; align-items: flex-start; gap: .65rem; font-size: .92rem; line-height: 1.6; }
.hm-checklist .vs-ico {
  width: 22px; height: 22px; flex: none; margin-top: .1rem;
  padding: 3px; border-radius: 50%;
  background: var(--hm-green); color: #fff; stroke-width: 2.4;
}

/* --------------------------------------------------------------- Lưới ảnh */
.hm-photos { display: grid; gap: clamp(.8rem, 1.8vw, 1.25rem); list-style: none; margin: 0; padding: 0; }
.hm-photos--3 { grid-template-columns: repeat(3, 1fr); }
.hm-photos--4 { grid-template-columns: repeat(4, 1fr); }
.hm-photo {
  position: relative; display: block;
  aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: var(--hm-radius);
  background: linear-gradient(140deg, #cfe6d8, #eaf3ed) center/cover no-repeat;
  box-shadow: 0 2px 10px rgba(20,60,40,.07);
  transition: transform .22s ease, box-shadow .22s ease;
}
.hm-photo:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(20,60,40,.16); }
.hm-photo__cap {
  position: absolute; inset: auto 0 0 0;
  padding: 1.6rem .9rem .7rem;
  background: linear-gradient(to top, rgba(12,42,27,.82), transparent);
  color: #fff; font-size: .84rem; font-weight: 600;
}

/* --------------------------------------------------------------- Đội ngũ */
.hm-people { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); list-style: none; margin: 0; padding: 0; }
.hm-person {
  background: #fff; border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius); overflow: hidden; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hm-person:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20,60,40,.12); }
.hm-person__photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, #cfe6d8, #eaf3ed) center/cover no-repeat;
}
.hm-person__body { padding: 1rem .9rem 1.3rem; }
.hm-person__name { font-size: .98rem; font-weight: 700; color: var(--hm-green-d); margin: 0 0 .25rem; }
.hm-person__role { font-size: .82rem; color: var(--hm-muted); margin: 0; }

/* --------------------------------------------------------------- Bảng */
.hm-tablewrap { overflow-x: auto; border: 1px solid var(--hm-line); border-radius: var(--hm-radius); background: #fff; }
.hm-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .88rem; }
.hm-table th, .hm-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--hm-line); vertical-align: top; }
.hm-table thead th { background: var(--hm-green); color: #fff; font-weight: 600; white-space: nowrap; border-bottom: 0; }
.hm-table tbody tr:last-child th, .hm-table tbody tr:last-child td { border-bottom: 0; }
.hm-table tbody tr:nth-child(even) { background: var(--hm-cream-2); }
.hm-table tbody th { font-weight: 700; color: var(--hm-green-d); white-space: nowrap; background: var(--hm-cream); }
.hm-table .hm-price { font-weight: 700; color: var(--hm-green-d); white-space: nowrap; }
.hm-table caption { caption-side: bottom; padding: .8rem 1rem; font-size: .8rem; color: var(--hm-muted); text-align: left; }

/* --------------------------------------------------------------- Tab & chip lọc */
.hm-tabs { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; margin-bottom: 2rem; }
.hm-tab, .hm-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1.15rem; border-radius: 999px;
  border: 1px solid var(--hm-line); background: #fff;
  font-size: .87rem; font-weight: 600; color: var(--hm-ink);
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.hm-tab:hover, .hm-chip:hover { border-color: var(--hm-green); color: var(--hm-green-d); }
.hm-tab.is-active, .hm-chip.is-active { background: var(--hm-green); border-color: var(--hm-green); color: #fff; }
.hm-tabpanel[hidden] { display: none; }

/* --------------------------------------------------------------- Dải nhấn vàng */
.hm-note {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: var(--hm-yellow); color: #33291a;
  border-radius: var(--hm-radius); padding: 1.25rem 1.5rem;
}
.hm-note .vs-ico { width: 30px; height: 30px; flex: none; }
.hm-note h3 { color: #33291a; font-size: 1.05rem; margin: 0 0 .2rem; }
.hm-note p { margin: 0; font-size: .88rem; }

/* Ghi chú chỉ quản trị viên thấy */
.hm-adminnote {
  display: flex; align-items: flex-start; gap: .6rem;
  margin: 1.25rem 0 0; padding: .8rem 1rem;
  background: #fff8e1; border: 1px dashed #e0c060; border-radius: 10px;
  font-size: .84rem; color: #6b5410;
}
.hm-adminnote .vs-ico { width: 20px; height: 20px; flex: none; margin-top: .1rem; }

/* --------------------------------------------------------------- Form */
.hm-form { background: #fff; border: 1px solid var(--hm-line); border-radius: var(--hm-radius-lg); padding: clamp(1.25rem, 3vw, 2rem); }
.hm-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hm-field { display: flex; flex-direction: column; gap: .35rem; }
.hm-field--full { grid-column: 1 / -1; }
.hm-field label { font-size: .85rem; font-weight: 600; color: var(--hm-green-d); }
.hm-field .req { color: #c0392b; }
.hm-field input, .hm-field select, .hm-field textarea {
  width: 100%; padding: .7rem .9rem;
  border: 1px solid var(--hm-line); border-radius: 10px;
  font: inherit; font-size: .92rem; color: var(--hm-ink); background: #fff;
}
.hm-field input:focus, .hm-field select:focus, .hm-field textarea:focus {
  outline: 0; border-color: var(--hm-green); box-shadow: 0 0 0 3px rgba(31,122,77,.14);
}
.hm-field textarea { resize: vertical; min-height: 96px; }
.hm-consent { display: flex; align-items: flex-start; gap: .55rem; font-size: .84rem; font-weight: 400; color: var(--hm-muted); line-height: 1.55; }
.hm-consent input { width: auto; margin-top: .18rem; }
.hm-form__micro { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--hm-muted); margin: 0; }
.hm-form__micro .vs-ico { width: 16px; height: 16px; }
/* Bẫy bot — ẩn hoàn toàn với người dùng */
.hm-field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hm-form__status { margin-bottom: 1rem; font-size: .88rem; }
.hm-form__status:empty { display: none; }
.hm-form__status.is-ok { color: #1f7a4d; }
.hm-form__status.is-err { color: #b3261e; }

/* --------------------------------------------------------------- Trang cảm ơn */
.hm-thanks { text-align: center; max-width: 620px; margin-inline: auto; padding-block: clamp(3rem, 8vw, 6rem); }
.hm-thanks__mark { font-size: 3rem; line-height: 1; display: block; margin-bottom: 1rem; }
.hm-thanks h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: .75rem; }
.hm-thanks p { color: var(--hm-muted); line-height: 1.75; margin: 0 0 1.75rem; }

/* --------------------------------------------------------------- Bài viết / lọc */
.hm-archive { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); list-style: none; margin: 0; padding: 0; }
.hm-pager { display: flex; justify-content: center; gap: .4rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hm-pager .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 .7rem;
  border: 1px solid var(--hm-line); border-radius: 10px;
  color: var(--hm-ink); text-decoration: none; font-size: .88rem;
}
.hm-pager .page-numbers:hover { border-color: var(--hm-green); color: var(--hm-green-d); }
.hm-pager .page-numbers.current { background: var(--hm-green); border-color: var(--hm-green); color: #fff; }

/* --------------------------------------------------------------- Bản đồ */
.hm-map { border-radius: var(--hm-radius); overflow: hidden; border: 1px solid var(--hm-line); min-height: 340px; background: var(--hm-cream); }
.hm-map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }
.hm-map__empty { display: grid; place-items: center; min-height: 340px; color: var(--hm-muted); font-size: .88rem; padding: 1rem; text-align: center; }

.hm-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.hm-contact li { display: flex; align-items: flex-start; gap: .85rem; }
.hm-contact__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: var(--hm-cream); color: var(--hm-green);
}
.hm-contact strong { display: block; font-size: .9rem; color: var(--hm-green-d); margin-bottom: .15rem; }
.hm-contact span, .hm-contact a { font-size: .9rem; color: var(--hm-ink); text-decoration: none; }
.hm-contact a:hover { color: var(--hm-green); }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 1100px) {
  .hm-cards--4 { grid-template-columns: repeat(2, 1fr); }
  .hm-photos--4 { grid-template-columns: repeat(3, 1fr); }
  .hm-archive { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hm-split { grid-template-columns: 1fr; }
  .hm-split--rev .hm-split__media { order: 0; }
  .hm-cards--3 { grid-template-columns: repeat(2, 1fr); }
  .hm-people { grid-template-columns: repeat(2, 1fr); }
  .hm-photos--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .hm-cards--2, .hm-cards--3, .hm-cards--4 { grid-template-columns: 1fr; }
  .hm-people { grid-template-columns: 1fr; }
  .hm-photos--3, .hm-photos--4 { grid-template-columns: repeat(2, 1fr); }
  .hm-archive { grid-template-columns: 1fr; }
  .hm-form__grid { grid-template-columns: 1fr; }
}
