/* =====================================================================
   EzySewa — Home page (views/index.ejs). Self-contained, no Bootstrap.
   Style reference: PharmaLy dashboard — dark brand header/footer, rounded white cards,
   soft shadows, colourful icon tiles, clean type.
   Brand: Primary #1257CF · Secondary #12A86B · Dark #102340 · Light BG #EAF4FF
   ===================================================================== */
body.hm { margin: 0; font-family: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, sans-serif; font-size: 16px; line-height: 1.6; color: var(--ez-text); background: var(--ez-bg); }
.hm *, .hm *::before, .hm *::after { box-sizing: border-box; }
.hm a { text-decoration: none; }
.hm h1, .hm h2, .hm h3, .hm h4 { font-family: inherit; }
.hm-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: 24px; }
:root { --hm-primary: #1257cf; --hm-primary-d: #0e45a6; --hm-green: #12a86b; --hm-dark: #102340; --hm-light: #eaf4ff; }
:root[data-theme="dark"] { --hm-light: #13203a; }

/* ---------- Header ---------- */
.hm-header { position: sticky; top: 0; z-index: 100; background: var(--ez-surface); border-bottom: 1px solid var(--ez-border); }
.hm-header .hm-wrap { display: flex; align-items: center; gap: 28px; height: 76px; }
.hm-logo { display: flex; align-items: center; flex: 0 0 auto; }
.hm-logo img { height: 50px; width: auto; display: block; }
.hm-nav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.hm-nav > a, .hm-dd > button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; font: inherit; font-size: .93rem; font-weight: 600; color: var(--ez-text); background: none; border: 0; border-radius: 10px; cursor: pointer; }
.hm-nav > a:hover, .hm-dd > button:hover, .hm-nav > a.active { color: var(--hm-primary); background: var(--hm-light); }
.hm-dd { position: relative; }
.hm-dd-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; display: none; min-width: 250px; padding: 8px; background: var(--ez-surface); border: 1px solid var(--ez-border); border-radius: 14px; box-shadow: var(--ez-shadow-lg); }
.hm-dd.open .hm-dd-menu { display: block; }
.hm-dd-menu a { display: block; padding: 9px 12px; font-size: .9rem; color: var(--ez-text); border-radius: 8px; }
.hm-dd-menu a:hover { background: var(--hm-light); color: var(--hm-primary); }
.hm-actions { display: flex; align-items: center; gap: 10px; }
.hm-iconbtn { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 13px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--ez-text); background: var(--ez-surface); border: 1px solid var(--ez-border); border-radius: 12px; cursor: pointer; }
.hm-iconbtn:hover { border-color: var(--hm-primary); color: var(--hm-primary); }
.hm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 24px; font: inherit; font-size: .95rem; font-weight: 700; border-radius: 12px; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.hm-btn:hover { transform: translateY(-1px); }
.hm-btn-sm { height: 42px; padding: 0 18px; font-size: .88rem; }
.hm-btn-primary { color: #fff; background: var(--hm-primary); box-shadow: 0 8px 20px rgba(18, 87, 207, .28); }
.hm-btn-primary:hover { background: var(--hm-primary-d); color: #fff; }
.hm-btn-outline { color: var(--hm-primary); background: transparent; border-color: var(--hm-primary); }
.hm-btn-outline:hover { background: var(--hm-light); }
.hm-btn-white { color: var(--hm-dark); background: #fff; }
.hm-btn-green { color: #fff; background: var(--hm-green); box-shadow: 0 8px 20px rgba(18, 168, 107, .3); }
.hm-burger { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--ez-ink); background: var(--ez-surface); border: 1px solid var(--ez-border); border-radius: 12px; cursor: pointer; }
.hm-drawer-close { display: none; }

/* ---------- News bar ---------- */
.hm-news { background: var(--hm-dark); color: #dbe7fb; font-size: .88rem; }
.hm-news .hm-wrap { display: flex; align-items: center; gap: 14px; height: 42px; }
.hm-news strong { flex: 0 0 auto; padding: 4px 12px; font-size: .78rem; letter-spacing: .03em; color: #fff; background: var(--hm-green); border-radius: 999px; }
.hm-news marquee { flex: 1; }

/* ---------- Hero ---------- */
.hm-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--hm-light) 0%, var(--ez-surface) 60%); }
:root[data-theme="dark"] .hm-hero { background: linear-gradient(135deg, #0f1c36, #0b1220); }
.hm-hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -180px; border-radius: 50%; background: radial-gradient(circle, rgba(18, 168, 107, .22), transparent 68%); }
.hm-hero::after { content: ""; position: absolute; width: 480px; height: 480px; left: -160px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(18, 87, 207, .18), transparent 68%); }
.hm-slides { position: relative; z-index: 1; }
.hm-slide { display: none; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; padding: 72px 0 84px; }
.hm-slide.active { display: grid; animation: hm-in .6s ease both; }
@keyframes hm-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hm-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin-bottom: 20px; font-size: .8rem; font-weight: 700; color: var(--hm-green); background: rgba(18, 168, 107, .12); border-radius: 999px; }
.hm-slide h1 { margin: 0 0 18px; color: var(--ez-ink); font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; line-height: 1.18; letter-spacing: -.02em; }
.hm-slide p { max-width: 560px; margin: 0 0 32px; color: var(--ez-muted); font-size: 1.1rem; line-height: 1.7; }
.hm-slide-img { display: flex; justify-content: center; }
.hm-slide-img img { max-width: 100%; max-height: 440px; object-fit: contain; filter: drop-shadow(0 28px 44px rgba(16, 35, 64, .22)); }
.hm-hero-ctrl { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding-bottom: 28px; margin-top: -40px; }
.hm-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: var(--hm-primary); opacity: .25; cursor: pointer; transition: all .3s; }
.hm-dot.active { width: 32px; opacity: 1; }

/* ---------- Sections ---------- */
.hm-section { padding: 76px 0; }
.hm-section.alt { background: var(--ez-surface-2); }
.hm-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.hm-eyebrow { display: inline-block; margin-bottom: 10px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hm-primary); }
.hm-head h2 { margin: 0 0 10px; color: var(--ez-ink); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.015em; line-height: 1.2; }
.hm-head p { margin: 0; color: var(--ez-muted); }
.hm-card { background: var(--ez-surface); border: 1px solid var(--ez-border); border-radius: 18px; box-shadow: var(--ez-shadow); }

/* Services — "Quick Actions" tiles */
.hm-services { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.hm-tile { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 12px 22px; text-align: center; transition: transform .2s, box-shadow .2s, border-color .2s; }
.hm-tile:hover { transform: translateY(-5px); border-color: transparent; box-shadow: 0 18px 38px rgba(16, 35, 64, .14); }
.hm-ico { display: grid; place-items: center; width: 56px; height: 56px; font-size: 1.55rem; color: #fff; border-radius: 16px; }
.hm-ico img { width: 28px; height: 28px; object-fit: contain; }
.hm-c0 { background: #1257cf; } .hm-c1 { background: #12a86b; } .hm-c2 { background: #f59e0b; } .hm-c3 { background: #7c5cff; } .hm-c4 { background: #ef4444; } .hm-c5 { background: #0ea5e9; }
.hm-tile span.t { color: var(--ez-ink); font-size: .9rem; font-weight: 600; line-height: 1.4; }

/* Why choose us — KPI-style cards */
.hm-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.hm-why-card { position: relative; padding: 26px; transition: transform .2s, box-shadow .2s; }
.hm-why-card:hover { transform: translateY(-4px); box-shadow: var(--ez-shadow-lg); }
.hm-why-card .hm-ico { margin-bottom: 18px; }
.hm-why-card h3 { margin: 0 0 8px; color: var(--ez-ink); font-size: 1.08rem; font-weight: 700; }
.hm-why-card p { margin: 0; color: var(--ez-muted); font-size: .93rem; line-height: 1.65; }

/* How it works */
.hm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); padding: 14px; }
.hm-step { position: relative; padding: 24px 22px; }
.hm-step + .hm-step { border-left: 1px dashed var(--ez-border); }
.hm-step-n { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; color: #fff; font-weight: 800; background: var(--hm-primary); border-radius: 14px; }
.hm-step:nth-child(2n) .hm-step-n { background: var(--hm-green); }
.hm-step h3 { margin: 0 0 6px; color: var(--ez-ink); font-size: 1.02rem; font-weight: 700; }
.hm-step p { margin: 0; color: var(--ez-muted); font-size: .9rem; }

/* FAQ */
.hm-faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.hm-faq details { padding: 0 22px; transition: box-shadow .2s; }
.hm-faq details[open] { box-shadow: var(--ez-shadow-lg); border-color: var(--hm-primary); }
.hm-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; color: var(--ez-ink); font-weight: 700; cursor: pointer; list-style: none; }
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 30px; height: 30px; font-size: 1.2rem; color: var(--hm-primary); background: var(--hm-light); border-radius: 50%; }
.hm-faq details[open] summary::after { content: "−"; color: #fff; background: var(--hm-primary); }
.hm-faq .ans { padding: 0 0 20px; color: var(--ez-text); line-height: 1.75; }

/* CTA */
.hm-cta { margin: 0 auto 76px; padding: 52px 48px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; color: #fff; background: linear-gradient(120deg, var(--hm-dark), #0f3470 70%, var(--hm-primary)); border-radius: 24px; box-shadow: 0 24px 50px rgba(16, 35, 64, .28); }
.hm-cta h2 { margin: 0 0 6px; color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
.hm-cta p { margin: 0; color: #c3d4f0; }
.hm-cta .btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.hm-footer { color: #b4c4de; background: var(--hm-dark); }
.hm-footer .grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding: 60px 0 40px; }
.hm-footer img { height: 54px; width: auto; margin-bottom: 16px; }
.hm-footer p { margin: 0; font-size: .92rem; line-height: 1.75; }
.hm-footer h4 { margin: 0 0 18px; color: #fff; font-size: 1rem; font-weight: 700; }
.hm-footer ul { margin: 0; padding: 0; list-style: none; }
.hm-footer li { margin-bottom: 10px; }
.hm-footer li a { color: #b4c4de; font-size: .92rem; transition: color .15s, padding .15s; }
.hm-footer li a:hover { color: #fff; padding-left: 4px; }
.hm-bar { padding: 18px 0; text-align: center; font-size: .85rem; color: #8ea4c8; background: #0b1a33; }
.hm-bar p { margin: 0; }

/* Reveal */
.hm-rv { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.hm-rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .hm-rv { opacity: 1; transform: none; } .hm-slide.active { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .hm-services { grid-template-columns: repeat(4, 1fr); } .hm-footer .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 991px) {
  .hm-header .hm-wrap { height: 68px; gap: 12px; }
  .hm-logo img { height: 42px; }
  .hm-burger { display: inline-flex; margin-left: auto; }
  .hm-actions .hm-hide-m { display: none; }
  .hm-nav { position: fixed; inset: 0 0 0 auto; z-index: 300; width: min(86vw, 330px); flex-direction: column; align-items: stretch; gap: 4px; padding: 74px 16px 20px; overflow-y: auto; background: var(--ez-surface); box-shadow: var(--ez-shadow-lg); transform: translateX(105%); transition: transform .28s ease; }
  .hm-nav.open { transform: none; }
  .hm-nav > a, .hm-dd > button { width: 100%; justify-content: space-between; padding: 12px 14px; }
  .hm-dd-menu { position: static; display: none; box-shadow: none; border: 0; background: var(--ez-surface-2); }
  .hm-drawer-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 42px; height: 42px; font-size: 1.2rem; color: var(--ez-ink); background: var(--ez-surface-2); border: 0; border-radius: 12px; cursor: pointer; }
  .hm-mask { position: fixed; inset: 0; z-index: 250; display: none; background: rgba(16, 35, 64, .55); }
  .hm-mask.open { display: block; }
  .hm-slide { grid-template-columns: 1fr; gap: 26px; padding: 44px 0 70px; text-align: center; }
  .hm-slide p { margin-inline: auto; } .hm-slide-img { order: -1; } .hm-slide-img img { max-height: 260px; }
  .hm-hero-ctrl { justify-content: center; }
  .hm-section { padding: 56px 0; }
  .hm-services { grid-template-columns: repeat(3, 1fr); }
  .hm-step + .hm-step { border-left: 0; border-top: 1px dashed var(--ez-border); }
  .hm-cta { padding: 36px 24px; text-align: center; justify-content: center; }
}
@media (max-width: 560px) {
  .hm-wrap { padding-inline: 16px; }
  .hm-services { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hm-footer .grid { grid-template-columns: 1fr; gap: 28px; }
  .hm-actions .hm-btn-outline { display: none; }
}

.hm-only-m { display: none !important; }
@media (max-width: 991px) { .hm-only-m { display: flex !important; } .hm-nav { z-index: 300; } }

/* fixes: logo variants, nav wrapping */
.hm-logo img.ez-logo-dark { display: none; }
:root[data-theme="dark"] .hm-logo img.ez-logo-light { display: none; }
:root[data-theme="dark"] .hm-logo img.ez-logo-dark { display: block; }
.hm-nav > a, .hm-dd > button { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1180px) { .hm-nav > a, .hm-dd > button { padding: 9px 9px; font-size: .86rem; } .hm-header .hm-wrap { gap: 14px; } .hm-iconbtn span { display: none; } }

/* mobile overflow fix */
html:has(body.hm) { overflow-x: clip; }
body.hm { overflow-x: clip; max-width: 100vw; }
@media (max-width: 991px) {
  .hm-nav:not(.open) { visibility: hidden; transition: transform .28s ease, visibility 0s .28s; }
  .hm-nav.open { visibility: visible; }
  .hm-actions { margin-left: auto; gap: 8px; }
  .hm-burger { margin-left: 0; }
  .hm-iconbtn span { display: none; } .hm-iconbtn { padding: 0 12px; }
  .hm-slide h1 { font-size: 1.9rem; }
}
.hm-slide > div, .hm-tile, .hm-why-card { min-width: 0; }
.hm-slide h1, .hm-slide p { overflow-wrap: anywhere; }

/* Banner-image slides (image only, optional click URL) */
.hm-slide.hm-slide-banner { padding: 24px 0; display: none; }
.hm-slide.hm-slide-banner.active { display: block; }
.hm-slide-banner a, .hm-slide-banner img { display: block; width: 100%; }
.hm-slide-banner img { aspect-ratio: 3 / 1; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 30px rgba(16,35,64,.14); }
.hm-slide-banner a { cursor: pointer; }
@media (max-width: 767px) { .hm-slide.hm-slide-banner { padding: 12px 0; } .hm-slide-banner img { border-radius: 12px; } }
