/**
 * @company MG Technologies
 * @author Manu Mahesh
 * @date 19 Nov 2026
 * MG: Home page (app/templates/home.php). No Bootstrap. Uses the --mg-* tokens (styleV2.css) and the shared cards.
 * The search box is the one loud element; sections stay quiet and evenly spaced.
 * 19 Nov 2026: brand-coloured type icons, search suggestions in the hero, All-Access band at the page width.
 */

.mg-hm{ font-family:var(--mg-font-body); color:var(--mg-ink); }
.mg-hm *, .mg-hm *::before, .mg-hm *::after{ box-sizing:border-box; }
.mg-hm__wrap{ max-width:1240px; margin:0 auto; padding:0 20px; }
.mg-hm a:focus-visible, .mg-hm button:focus-visible, .mg-hm input:focus-visible{ outline:2px solid var(--mg-primary); outline-offset:2px; }

/* ================= Hero ================= */
.mg-hm-hero{ padding:56px 0 44px; background:var(--mg-bg-hero); border-bottom:1px solid var(--mg-border); }
.mg-hm-hero .mg-hm__wrap{ max-width:880px; text-align:center; }
.mg-hm-hero__title{ margin:0 auto 14px; max-width:760px; font-family:var(--mg-font-display); font-size:42px; line-height:1.15; font-weight:700; letter-spacing:-.8px; color:var(--mg-ink); }
.mg-hm-hero__lead{ margin:0 auto 26px; max-width:640px; font-size:17px; line-height:1.6; color:var(--mg-ink-soft); }

.mg-hm-search{ position:relative; display:flex; gap:10px; max-width:760px; margin:0 auto; padding:8px; border:1.5px solid var(--mg-border); border-radius:18px; background:var(--mg-bg-white); box-shadow:var(--mg-shadow); }
.mg-hm-search:focus-within{ border-color:var(--mg-primary); }
.mg-hm-search__icon{ position:absolute; left:22px; top:50%; width:20px; height:20px; transform:translateY(-50%); color:var(--mg-ink-faint); pointer-events:none; }
.mg-hm-search input{ flex:1 1 auto; min-width:0; height:52px; padding:0 12px 0 44px; border:0; background:transparent; font:inherit; font-size:16px; color:var(--mg-ink); }
.mg-hm-search input:focus{ outline:none; }
.mg-hm-search button{ flex:0 0 auto; height:52px; padding:0 26px; border:0; border-radius:12px; background:var(--mg-primary); color:#fff; font:inherit; font-size:16px; font-weight:700; cursor:pointer; }
.mg-hm-search button:hover{ background:var(--mg-primary-dark); }

.mg-hm-hero__try{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:16px 0 0; font-size:14px; color:var(--mg-ink-soft); }
.mg-hm-hero__try span{ padding:5px 0; }
.mg-hm-hero__try a, .mg-hm-hero__try a:visited{ padding:5px 12px; border:1px solid var(--mg-border); border-radius:999px; background:var(--mg-bg-white); color:var(--mg-ink) !important; text-decoration:none !important; }
.mg-hm-hero__try a:hover{ border-color:var(--mg-primary); color:var(--mg-primary-dark) !important; }

.mg-hm-trust{ display:flex; flex-wrap:wrap; justify-content:center; gap:8px 24px; margin:26px 0 0; padding:0; list-style:none; font-size:14px; color:var(--mg-ink-soft); }
.mg-hm-trust li{ display:inline-flex; align-items:center; gap:7px; }
.mg-hm-trust svg{ width:17px; height:17px; color:var(--mg-primary); flex:0 0 auto; }

/* ================= Sections ================= */
.mg-hm-sec{ padding:44px 0 0; }
.mg-hm-sec__head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.mg-hm-sec__title{ margin:0; font-family:var(--mg-font-display); font-size:26px; line-height:1.25; font-weight:700; letter-spacing:-.3px; color:var(--mg-ink); }
.mg-hm-sec__lead{ margin:6px 0 0; font-size:15px; color:var(--mg-ink-soft); }
.mg-hm-sec__links{ display:flex; gap:18px; flex-wrap:wrap; }
.mg-hm-sub{ margin:28px 0 12px; font-family:var(--mg-font-display); font-size:17px; font-weight:700; color:var(--mg-ink); }
a.mg-hm-more, a.mg-hm-more:visited{ flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; font-size:15px; font-weight:600; color:var(--mg-primary-dark) !important; text-decoration:none !important; white-space:nowrap; }
a.mg-hm-more:hover{ text-decoration:underline !important; }
.mg-hm-more svg{ width:16px; height:16px; }

.mg-hm-grid{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
.mg-hm-grid--2{ grid-template-columns:repeat(2, minmax(0, 1fr)); }

/* Browse */
.mg-hm-browse .mg-hm-sec__title{ margin-bottom:16px; }
.mg-hm-types{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:14px; margin:0; padding:0; list-style:none; }
a.mg-hm-type, a.mg-hm-type:visited{ display:flex; flex-direction:column; gap:4px; height:100%; padding:18px; border:1px solid var(--mg-border); border-radius:var(--mg-radius-md); background:var(--mg-bg-white); color:var(--mg-ink) !important; text-decoration:none !important; transition:border-color .15s, box-shadow .15s; }
a.mg-hm-type:hover{ border-color:var(--mg-primary); box-shadow:var(--mg-shadow-sm); }
.mg-hm-type__icon{ display:inline-flex; width:40px; height:40px; margin-bottom:8px; align-items:center; justify-content:center; border-radius:10px; background:var(--mg-primary-soft); color:var(--mg-primary-dark); }
.mg-hm-type__icon svg{ width:22px; height:22px; }
.mg-hm-type__icon{ position:relative; width:46px; height:46px; background:#F2F4F7; }
.mg-hm-type__icon > svg{ width:26px; height:26px; }
.mg-hm-type--html .mg-hm-type__icon{ background:#FDEDE8; }
.mg-hm-type--premium-wordpress-themes .mg-hm-type__icon, .mg-hm-type--wordpress-plugins .mg-hm-type__icon{ background:#E7F1F6; }
.mg-hm-type--elementor .mg-hm-type__icon{ background:#F8E6EC; }
.mg-hm-type__plug{ position:absolute; right:-5px; bottom:-5px; display:inline-flex; width:20px; height:20px; align-items:center; justify-content:center; border:2px solid var(--mg-bg-white); border-radius:50%; background:#21759B; color:#fff; }
.mg-hm-type__plug svg{ width:11px; height:11px; }
.mg-hm-type__name{ font-family:var(--mg-font-display); font-size:16px; font-weight:700; }
.mg-hm-type__n{ font-size:13px; color:var(--mg-ink-soft); }

.mg-hm-chips{ display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; list-style:none; }
.mg-hm-chips a, .mg-hm-chips a:visited{ display:inline-flex; align-items:center; gap:6px; padding:7px 13px; border:1px solid var(--mg-border); border-radius:8px; background:var(--mg-bg-white); color:var(--mg-ink) !important; font-size:14px; text-decoration:none !important; }
.mg-hm-chips a:hover{ border-color:var(--mg-primary); color:var(--mg-primary-dark) !important; }
.mg-hm-chips em{ font-style:normal; font-size:12px; color:var(--mg-ink-faint); }

/* One design, several platforms */
.mg-hm-multi{ margin-top:44px; padding:40px 0; background:var(--mg-bg-highlight); }
.mg-hm-multi__in{ display:grid; grid-template-columns:minmax(0, 5fr) minmax(0, 7fr); gap:36px; align-items:center; }
.mg-hm-multi__text p{ margin:12px 0 0; font-size:16px; line-height:1.6; color:var(--mg-ink-soft); }
.mg-hm-multi__text .mg-hm-more{ margin-top:16px; }
.mg-hm-multi__how{ font-size:14px !important; }

/* Authors */
.mg-hm-authors__grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:12px; margin:0; padding:0; list-style:none; }
a.mg-hm-author, a.mg-hm-author:visited{ display:flex; align-items:center; gap:14px; height:100%; padding:14px 16px; border:1px solid var(--mg-border); border-radius:var(--mg-radius-md); background:var(--mg-bg-white); color:var(--mg-ink) !important; text-decoration:none !important; }
a.mg-hm-author:hover{ border-color:var(--mg-primary); box-shadow:var(--mg-shadow-sm); }
.mg-hm-author__text{ display:flex; flex-direction:column; min-width:0; }
.mg-hm-author__name{ font-weight:700; font-size:15px; overflow:hidden; text-overflow:ellipsis; }
.mg-hm-author__n{ font-size:13px; color:var(--mg-ink-soft); }
.mg-hm-badge{ display:inline-block; margin-left:4px; padding:1px 7px; border-radius:999px; background:var(--mg-primary-soft); color:var(--mg-primary-dark); font-size:11px; font-weight:700; vertical-align:2px; }
a.mg-hm-author--join{ border-style:dashed; }
.mg-hm-author__plus{ display:inline-flex; flex:0 0 auto; width:52px; height:52px; align-items:center; justify-content:center; border-radius:50%; background:var(--mg-bg-hero); color:var(--mg-primary-dark); font-size:26px; font-weight:600; }

/* Ways to save */
.mg-hm-save__list{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; margin:16px 0 0; padding:0; list-style:none; }
.mg-hm-save__list li{ padding:18px 20px; border:1px solid var(--mg-border); border-radius:var(--mg-radius-md); background:var(--mg-bg-white); font-size:15px; line-height:1.5; color:var(--mg-ink-soft); }
.mg-hm-save__big{ display:block; margin-bottom:4px; font-family:var(--mg-font-display); font-size:24px; font-weight:800; color:var(--mg-ink); }
.mg-hm-save__list a{ color:var(--mg-primary-dark) !important; font-weight:600; }
.mg-hm-code{ padding:1px 7px; border:1px dashed var(--mg-primary); border-radius:6px; background:var(--mg-primary-soft); color:var(--mg-ink); font-family:inherit; font-weight:700; }
.mg-hm-save + .mg-hp{ margin-top:28px; }
/* All-Access / affiliate band (mg-programs.css): same width and gutters as the other home sections */
.mg-hm .mg-hp{ max-width:1240px; padding:0 20px; }
.mg-hm-search .mg-sr-suggest{ top:calc(100% + 6px); }

/* Why MG + reviews */
.mg-hm-why__list{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:20px; margin:18px 0 0; padding:0; list-style:none; }
.mg-hm-why__list h3{ margin:0 0 6px; font-family:var(--mg-font-display); font-size:16px; font-weight:700; color:var(--mg-ink); }
.mg-hm-why__list p{ margin:0; font-size:14px; line-height:1.55; color:var(--mg-ink-soft); }
.mg-hm-why__list a{ color:var(--mg-primary-dark) !important; }
.mg-hm-reviews{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; margin:0; padding:0; list-style:none; }
.mg-hm-review{ padding:18px; border:1px solid var(--mg-border); border-radius:var(--mg-radius-md); background:var(--mg-bg-white); }
.mg-hm-review__stars{ color:#F59E0B; letter-spacing:2px; font-size:15px; }
.mg-hm-review blockquote{ margin:8px 0 10px; padding:0; border:0; font-size:15px; line-height:1.55; color:var(--mg-ink); }
.mg-hm-review__by{ margin:0; font-size:13px; color:var(--mg-ink-soft); }
.mg-hm-review__by a{ color:var(--mg-ink-soft) !important; text-decoration:underline !important; }

/* Sell on MG */
.mg-hm-sell{ margin-top:48px; padding:34px 0; background:var(--mg-ink); color:#fff; }
.mg-hm-sell__in{ display:flex; align-items:center; justify-content:space-between; gap:24px; }
.mg-hm-sell h2{ margin:0 0 6px; font-family:var(--mg-font-display); font-size:24px; font-weight:700; color:#fff; }
.mg-hm-sell p{ margin:0; color:rgba(255,255,255,.75); font-size:15px; }
a.mg-hm-btn, a.mg-hm-btn:visited{ flex:0 0 auto; display:inline-block; padding:13px 24px; border-radius:12px; background:var(--mg-primary); color:#fff !important; font-weight:700; text-decoration:none !important; }
a.mg-hm-btn:hover{ background:var(--mg-primary-dark); }

/* About */
.mg-hm-about{ padding-bottom:48px; }
.mg-hm-about p{ max-width:860px; margin:12px 0 0; font-size:15px; line-height:1.7; color:var(--mg-ink-soft); }
.mg-hm-about a{ color:var(--mg-primary-dark) !important; }

/* ================= Responsive ================= */
@media (max-width: 1100px){
  .mg-hm-types{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .mg-hm-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .mg-hm-grid--2{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .mg-hm-why__list{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px){
  .mg-hm-multi__in{ grid-template-columns:minmax(0, 1fr); gap:22px; }
  .mg-hm-save__list, .mg-hm-reviews{ grid-template-columns:minmax(0, 1fr); }
  .mg-hm-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px){
  .mg-hm__wrap, .mg-hm .mg-hp{ padding:0 16px; }
  .mg-hm-hero{ padding:36px 0 30px; }
  .mg-hm-hero__title{ font-size:29px; letter-spacing:-.4px; }
  .mg-hm-hero__lead{ font-size:15px; margin-bottom:20px; }
  .mg-hm-search{ padding:6px; border-radius:14px; }
  .mg-hm-search input{ height:46px; font-size:15px; padding-left:38px; }
  .mg-hm-search__icon{ left:16px; }
  .mg-hm-search button{ height:46px; padding:0 16px; font-size:15px; }
  .mg-hm-trust{ justify-content:flex-start; text-align:left; gap:8px 16px; font-size:13px; }
  .mg-hm-sec{ padding-top:34px; }
  .mg-hm-sec__head{ flex-direction:column; align-items:flex-start; gap:8px; }
  .mg-hm-sec__title{ font-size:22px; }
  .mg-hm-types{ grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
  a.mg-hm-type{ padding:14px; }
  .mg-hm-sell__in{ flex-direction:column; align-items:flex-start; }
}
@media (max-width: 420px){
  .mg-hm-grid, .mg-hm-grid--2{ grid-template-columns:minmax(0, 1fr); }
  .mg-hm-why__list{ grid-template-columns:minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce){
  .mg-hm *{ transition:none !important; }
}
