/* =====================================================================
   Mahati CMS — styles for the dynamic home sections (.mh-*) and inner
   pages (.cms-*). Uses the theme's CSS variables when present, with the
   Mahati palette as fallback. Load AFTER custom.css.
   ===================================================================== */
:root {
  --mh-accent: var(--accent-color, #b08a57);
  --mh-ink: var(--primary-color, #1f2420);
  --mh-text: var(--text-color, #5f5a52);
  --mh-bg-soft: var(--secondary-color, #f6f2ec);
  --mh-line: var(--divider-color, #e8e1d6);
  --mh-white: var(--white-color, #ffffff);
  --mh-radius: 18px;
}

/* ---------- generic ---------- */
.mh-section, .cms-page { padding: 100px 0; }
.cms-page { padding: 80px 0 100px; }
.mh-section + .mh-section { padding-top: 0; }
.mh-lead { font-size: 18px; color: var(--mh-ink); line-height: 1.7; }
.mh-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 30px; }
.section-title h2 span, .mh-section h2 span, .mh-cta h2 span { color: var(--mh-accent); }
.cms-muted { color: var(--mh-text); }
.page-header-sub { max-width: 640px; margin: 0 0 16px; color: rgba(255,255,255,.88); font-size: 17px; line-height: 1.6; }
.cms-draft-bar { background: #fbe9d6; color: #8a4b0f; text-align: center; padding: 8px; font-size: 14px; }

/* ---------- Hero stats glass bar ---------- */
.mh-hero { position: relative; }
.mh-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 60px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: var(--mh-radius); overflow: hidden;
}
.mh-stat { display: flex; align-items: center; gap: 14px; padding: 22px 24px; color: #fff; }
.mh-stat + .mh-stat { border-left: 1px solid rgba(255,255,255,.18); }
.mh-stat i { font-size: 22px; color: var(--mh-accent); }
.mh-stat strong { display: block; font-family: 'Belleza', serif; font-weight: 400; font-size: 34px; line-height: 1; }
.mh-stat span { font-size: 14px; opacity: .85; }
@media (max-width: 991px) { .mh-stats { grid-template-columns: repeat(2, 1fr); } .mh-stat:nth-child(3) { border-left: 0; } .mh-stat:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.18); } }

/* ---------- About ---------- */
.mh-about-img { width: 100%; border-radius: var(--mh-radius); object-fit: cover; }
.mh-call { display: inline-flex; align-items: center; gap: 12px; color: var(--mh-ink); font-weight: 600; text-decoration: none; }
.mh-call span { width: 46px; height: 46px; border-radius: 50%; background: var(--mh-bg-soft); color: var(--mh-accent); display: grid; place-items: center; }

/* ---------- Course cards ---------- */
.cms-course-card { background: var(--mh-white); border: 1px solid var(--mh-line); border-radius: var(--mh-radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.cms-course-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(31,36,32,.08); }
.cms-course-img { display: block; aspect-ratio: 4/3; background: var(--mh-bg-soft); overflow: hidden; position: relative; }
.cms-course-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cms-course-card:hover .cms-course-img img { transform: scale(1.05); }
.cms-course-hours { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-family: 'Belleza', serif; font-size: 64px; color: var(--mh-accent); line-height: 1; }
.cms-course-hours small { font-family: inherit; font-size: 15px; letter-spacing: .2em; text-transform: uppercase; color: var(--mh-text); }
.cms-course-body { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cms-course-body h3 { font-size: 22px; margin: 0; }
.cms-course-body h3 a { color: var(--mh-ink); text-decoration: none; }
.cms-course-body p { margin: 0; font-size: 15px; }
.cms-course-meta { list-style: none; padding: 0; margin: 4px 0 0; font-size: 14px; display: grid; gap: 6px; }
.cms-course-meta i { color: var(--mh-accent); width: 18px; }
.cms-tag { align-self: flex-start; display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 30px; background: var(--mh-bg-soft); color: var(--mh-accent); font-weight: 600; margin: 0 6px 6px 0; }
.cms-readmore { margin-top: auto; padding-top: 8px; color: var(--mh-accent); font-weight: 600; text-decoration: none; }
.cms-readmore i { transition: transform .2s; }
.cms-readmore:hover i { transform: translateX(4px); }

/* ---------- Why choose ---------- */
.mh-why { position: relative; padding: 110px 0 !important; color: #fff; background: var(--mh-ink) var(--why-bg, none) center/cover fixed; }
.mh-why::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(25,22,17,.82), rgba(25,22,17,.72)); }
.mh-why .container { position: relative; }
.mh-why .section-title h2, .mh-why .section-title h3, .mh-why .section-title p { color: #fff; }
.mh-why .wcu-card { height: 100%; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px); border-radius: var(--mh-radius); padding: 30px 26px; transition: transform .3s, border-color .3s; }
.mh-why .wcu-card:hover { transform: translateY(-6px); border-color: var(--mh-accent); }
.mh-why .wcu-tag { display: inline-block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 30px; border: 1px solid rgba(255,255,255,.3); margin-bottom: 18px; }
.mh-why .wcu-card:hover .wcu-tag { background: var(--mh-accent); border-color: var(--mh-accent); }
.mh-why .wcu-card h3 { color: #fff; font-size: 22px; }
.mh-why .wcu-card p { color: rgba(255,255,255,.78); margin: 0; }
.wcu-icon { font-size: 26px; color: var(--mh-accent); display: block; margin-bottom: 14px; }
@media (max-width: 991px) { .mh-why { background-attachment: scroll; } }

/* ---------- Teacher ---------- */
.mh-teacher-photo { position: relative; border-radius: var(--mh-radius); overflow: hidden; aspect-ratio: 4/5; background: var(--mh-bg-soft); display: grid; place-items: center; color: #cbbda8; font-size: 60px; }
.mh-teacher-photo img { width: 100%; height: 100%; object-fit: cover; }
.mh-teacher-photo em { position: absolute; left: 20px; bottom: 20px; font-style: normal; background: var(--mh-accent); color: #fff; padding: 8px 18px; border-radius: 30px; font-size: 14px; font-weight: 600; }
.mh-role { color: var(--mh-accent); font-weight: 600; letter-spacing: .04em; margin-top: -10px; }
.cms-quote { border-left: 3px solid var(--mh-accent); margin: 26px 0; padding: 6px 0 6px 22px; font-family: 'Belleza', serif; font-size: 24px; color: var(--mh-ink); line-height: 1.4; }

/* ---------- Explore your path ---------- */
.mh-path { display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 300px; height: 100%; padding: 28px; border-radius: var(--mh-radius); text-decoration: none; color: #fff; position: relative; overflow: hidden; background: var(--mh-ink) var(--path-bg, none) center/cover; }
.mh-path::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(20,18,14,.85)); transition: opacity .3s; }
.mh-path > * { position: relative; }
.mh-path h3 { color: #fff; font-size: 24px; margin: 0; }
.mh-path p { color: rgba(255,255,255,.8); font-size: 14px; margin: 0; }
.mh-path span { color: var(--mh-accent); font-weight: 600; }
.mh-path:hover { color: #fff; }

/* ---------- Reviews ---------- */
.mh-review-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; }
.mh-review { scroll-snap-align: start; background: var(--mh-white); border: 1px solid var(--mh-line); border-radius: var(--mh-radius); overflow: hidden; display: flex; flex-direction: column; }
.mh-review video, .mh-review iframe { width: 100%; aspect-ratio: 9/16; max-height: 460px; object-fit: cover; background: #111; border: 0; display: block; }
.mh-review.is-text { padding: 28px 26px 0; }
.mh-review.is-text p { font-size: 16px; line-height: 1.7; color: var(--mh-ink); }
.mh-stars { color: var(--mh-accent); letter-spacing: 2px; margin-bottom: 10px; }
.mh-review-by { display: flex; gap: 12px; align-items: center; padding: 16px 20px; margin-top: auto; }
.mh-review-by img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.mh-review-by strong { display: block; color: var(--mh-ink); }
.mh-review-by small { color: var(--mh-text); font-size: 13px; }

/* ---------- Studio strip ---------- */
.mh-strip { padding: 0 0 100px; }
.mh-strip-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 22vw); gap: 14px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.mh-strip-track::-webkit-scrollbar { display: none; }
.mh-strip-track img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 14px; transition: transform .4s; }
.mh-strip-track a:hover img { transform: scale(1.03); }

/* ---------- Closing CTA ---------- */
.mh-cta { position: relative; padding: 110px 0; color: #fff; background: var(--mh-ink) var(--cta-bg, none) center/cover; }
.mh-cta::before { content: ''; position: absolute; inset: 0; background: rgba(25,22,17,.7); }
.mh-cta .container { position: relative; }
.mh-cta .section-title h2, .mh-cta .section-title h3, .mh-cta .section-title p { color: #fff; }

/* ---------- Inner pages ---------- */
.cms-content { color: var(--mh-text); line-height: 1.8; font-size: 16px; }
.cms-content h2, .cms-content h3, .cms-content h4 { color: var(--mh-ink); margin: 1.4em 0 .6em; }
.cms-content img { max-width: 100%; height: auto; border-radius: 14px; }
.cms-content iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 14px; }
.cms-content blockquote { border-left: 3px solid var(--mh-accent); padding-left: 18px; font-style: italic; }
.cms-content ul li::marker { color: var(--mh-accent); }
.cms-content .ql-align-center { text-align: center; } .cms-content .ql-align-right { text-align: right; } .cms-content .ql-align-justify { text-align: justify; }
.cms-ticks ul { list-style: none; padding: 0; }
.cms-ticks li { padding-left: 30px; position: relative; margin-bottom: 8px; }
.cms-ticks li::before { content: '\2713'; position: absolute; left: 0; top: 0; color: var(--mh-accent); font-weight: 700; }
.cms-block { margin-top: 50px; }
.cms-h2 { font-size: 32px; margin-bottom: 20px; }
.cms-hero-img { width: 100%; border-radius: var(--mh-radius); margin-bottom: 30px; object-fit: cover; max-height: 520px; }
.cms-card { background: var(--mh-white); border: 1px solid var(--mh-line); border-radius: var(--mh-radius); padding: 32px; box-shadow: 0 10px 30px rgba(31,36,32,.04); }
.cms-sticky { position: sticky; top: 120px; }
.cms-price { font-family: 'Belleza', serif; font-size: 36px; color: var(--mh-ink); margin-bottom: 16px; }
.cms-price s { font-size: 20px; color: var(--mh-text); }
.cms-details { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0 0 24px; font-size: 15px; }
.cms-details dt { color: var(--mh-text); font-weight: 400; }
.cms-details dd { margin: 0; color: var(--mh-ink); font-weight: 600; text-align: right; }
.cms-link-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--mh-line); border-radius: 12px; color: var(--mh-ink); text-decoration: none; font-weight: 500; }
.cms-link-btn:hover { border-color: var(--mh-accent); color: var(--mh-accent); }
.cms-faq details { border-bottom: 1px solid var(--mh-line); padding: 18px 0; }
.cms-faq summary { cursor: pointer; font-weight: 600; color: var(--mh-ink); list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.cms-faq summary::after { content: '+'; color: var(--mh-accent); font-size: 22px; line-height: 1; }
.cms-faq details[open] summary::after { content: '\2212'; }
.cms-faq p { margin: 12px 0 0; }
.cms-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.cms-pills a { padding: 9px 20px; border-radius: 30px; border: 1px solid var(--mh-line); color: var(--mh-ink); text-decoration: none; font-weight: 500; }
.cms-pills a.active, .cms-pills a:hover { background: var(--mh-accent); border-color: var(--mh-accent); color: #fff; }

/* Gallery */
.cms-gallery { columns: 3 280px; column-gap: 16px; }
.cms-gallery a { display: block; break-inside: avoid; margin-bottom: 16px; position: relative; border-radius: 14px; overflow: hidden; }
.cms-gallery img { width: 100%; display: block; transition: transform .5s; }
.cms-gallery a:hover img { transform: scale(1.04); }
.cms-gallery span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 12px; color: #fff; font-size: 14px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }

/* Teachers */
.cms-teacher { display: block; text-align: center; text-decoration: none; }
.cms-teacher img, .cms-teacher-ph { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--mh-radius); background: var(--mh-bg-soft); display: grid; place-items: center; font-size: 50px; color: #cbbda8; }
.cms-teacher h3 { margin: 18px 0 4px; color: var(--mh-ink); font-size: 24px; }
.cms-teacher p { color: var(--mh-accent); margin: 0; }
.cms-tag-row { margin-bottom: 18px; }

/* Contact + forms */
.cms-contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.cms-contact-list li { display: flex; gap: 16px; }
.cms-contact-list i { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; background: var(--mh-bg-soft); color: var(--mh-accent); display: grid; place-items: center; }
.cms-contact-list strong { display: block; color: var(--mh-ink); margin-bottom: 2px; }
.cms-contact-list a { color: var(--mh-text); text-decoration: none; }
.cms-map iframe { width: 100%; height: 420px; border: 0; border-radius: var(--mh-radius); }
.cms-form h3 { font-size: 26px; margin-bottom: 20px; }
.cms-form .form-control { border: 1px solid var(--mh-line); border-radius: 12px; padding: 14px 18px; background: #fffdfa; box-shadow: none; }
.cms-form .form-control:focus { border-color: var(--mh-accent); }
.cms-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cms-notice { padding: 14px 18px; border-radius: 12px; margin-bottom: 20px; font-weight: 500; }
.cms-notice.ok { background: #eaf1e7; color: #34502f; }
.cms-notice.err { background: #f8e6e1; color: #8a3a28; }

/* Mobile swipe rows (same as the home page m-scroll) */
@media (max-width: 767px) {
  .mh-section, .cms-page { padding: 60px 0; }
  .m-scroll { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 10px; }
  .m-scroll::-webkit-scrollbar { display: none; }
  .m-scroll > [class*="col-"] { flex: 0 0 84%; max-width: 84%; scroll-snap-align: start; }
  .mh-stats { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .mh-stat { padding: 16px; }
  .mh-stat strong { font-size: 26px; }
  .cms-card { padding: 22px; }
  .cms-sticky { position: static; }
  .cms-quote { font-size: 20px; }
}
