/* Home page (default.php) only.
   Microsoft Store / Fluent-inspired: Segoe UI, white and light-grey sections, 8px cards, 4px buttons.
   Everything is scoped under .home and prefixed hm- so it cannot affect other pages
   or clash with Bootstrap 3 classes. */

.home {
  --hm-primary: #0270c6;        /* site brand blue */
  --hm-primary-dark: #015a9f;
  --hm-tint: #eaf3fb;
  --hm-text: #1a1a1a;
  --hm-muted: #616161;
  --hm-border: #e1e1e1;
  --hm-alt: #f2f2f2;            /* alternate section background (Microsoft light grey) */
  --hm-radius: 8px;
  --hm-radius-btn: 4px;
  font-family: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--hm-text);
  font-size: 15px;
  line-height: 1.5;
}
.home h1, .home h2, .home h3 { font-family: inherit; color: var(--hm-text); font-weight: 600; }
.home h3 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; }
.home .hm-muted { color: var(--hm-muted); }
.home .hm-small { font-size: 13px; }
.home .hm-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- Sections: backgrounds run edge to edge, content centred at 1400px ---------- */
.home .hm-sec { margin: 0 -20px; padding: 40px 20px; }   /* <768px: container 15px + .content 5px */
@media (min-width: 768px)  { .home .hm-sec { margin: 0 -15px; padding: 48px 28px; } }
@media (min-width: 992px)  { .home .hm-sec { margin: 0 -30px; padding: 56px 30px; } }
@media (min-width: 1600px) { .home .hm-sec { margin: 0 -60px; padding: 64px 60px; } }
.home .hm-sec-alt { background: var(--hm-alt); }
.home .hm-inner { max-width: 1400px; margin: 0 auto; }

.home .hm-sec-head { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.home .hm-sec-head h2 { font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
@media (min-width: 992px) { .home .hm-sec-head h2 { font-size: 34px; } }
.home .hm-sec-head p { color: var(--hm-muted); font-size: 16px; margin: 0; }
.home .hm-sec-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 28px; }

/* ---------- Buttons and links ---------- */
.home a.hm-btn:link, .home a.hm-btn:visited, .home button.hm-btn {
  display: inline-block; cursor: pointer; font-family: inherit;
  background: var(--hm-primary); color: #fff;
  border: 2px solid var(--hm-primary); border-radius: var(--hm-radius-btn);
  padding: 9px 20px; font-size: 15px; font-weight: 600; line-height: 1.3;
  text-decoration: none; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.home a.hm-btn:hover, .home a.hm-btn:focus, .home button.hm-btn:hover, .home button.hm-btn:focus { background: var(--hm-primary-dark); border-color: var(--hm-primary-dark); color: #fff; text-decoration: none; }
.home a.hm-btn.hm-sec-btn:link, .home a.hm-btn.hm-sec-btn:visited, .home button.hm-btn.hm-sec-btn { background: #fff; color: var(--hm-text); border-color: var(--hm-text); }
.home a.hm-btn.hm-sec-btn:hover, .home a.hm-btn.hm-sec-btn:focus, .home button.hm-btn.hm-sec-btn:hover, .home button.hm-btn.hm-sec-btn:focus { background: var(--hm-alt); color: var(--hm-text); }
/* Microsoft-style text link with chevron: "Learn more >" */
.home a.hm-more:link, .home a.hm-more:visited { color: var(--hm-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.home a.hm-more::after { content: "\203A"; display: inline-block; margin-left: 5px; font-size: 1.15em; line-height: 1; transition: transform .15s ease; }
.home a.hm-more:hover, .home a.hm-more:focus { color: var(--hm-primary-dark); text-decoration: underline; }
.home a.hm-more:hover::after { transform: translateX(3px); }
.home .hm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }

/* ---------- Hero ---------- */
.home .hm-hero { background: var(--hm-alt); }
.home > .hm-hero:first-child { margin-top: -20px; }   /* sit flush under the site header (it has 20px margin-bottom) */
/* resources/css/styles.css sets ".home li { font-size: 11px }" under 992px; restore list sizes on this page */
.home .hm-hero-card li { font-size: 14px; }
.home .hm-hero-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 992px) { .home .hm-hero-grid { grid-template-columns: 1.25fr 1fr; gap: 56px; } }
.home .hm-hero-brand { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 18px; }
.home .hm-hero-brand img { display: block; width: 150px; height: auto; margin: -14px 0 -14px -16px; } /* logo PNG has 16px/14px transparent padding */
.home .hm-hero-brand span { border-left: 1px solid #c8c8c8; padding-left: 16px; font-size: 13px; font-weight: 600; color: var(--hm-muted); }
.home .hm-hero h1 { font-size: 30px; line-height: 1.2; margin: 0 0 14px; }
@media (min-width: 992px)  { .home .hm-hero h1 { font-size: 40px; } }
@media (min-width: 1600px) { .home .hm-hero h1 { font-size: 46px; } }
.home .hm-accent { color: var(--hm-primary); }
.home .hm-hero-text > p { color: var(--hm-muted); font-size: 17px; margin: 0 0 24px; max-width: 640px; }
.home .hm-hero-card {
  background: #fff; border-radius: var(--hm-radius); padding: 22px;
  box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, .13), 0 8px 24px rgba(0, 0, 0, .08);
}
@media (min-width: 992px) { .home .hm-hero-card { max-width: 460px; width: 100%; justify-self: end; } }
.home .hm-hero-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.home .hm-hero-card-head img { flex: 0 0 auto; width: 104px; height: auto; } /* pre-cropped 360x451 box shot */
@media (min-width: 1200px) { .home .hm-hero-card-head img { width: 120px; } }
.home .hm-hero-card-head h3 { font-size: 19px; margin: 2px 0 0; }
.home .hm-hero-card ul { padding-left: 18px; margin: 10px 0 14px; font-size: 14px; }
.home .hm-price { font-size: 26px; font-weight: 700; line-height: 1.1; }
.home .hm-price small { font-size: 13px; font-weight: 400; color: var(--hm-muted); }
.home .hm-prod-price small { font-size: 12.5px; font-weight: 400; color: var(--hm-muted); }
.home .hm-hero-card-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 16px; }
.home .hm-hero-card-btns a.hm-btn { padding: 10px 28px; }

/* ---------- Category icon strip (Microsoft.com style) ---------- */
.home .hm-strip { padding-top: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--hm-border); }
.home .hm-strip-list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1100px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
@media (min-width: 768px) { .home .hm-strip-list { grid-template-columns: repeat(8, 1fr); } }
.home .hm-strip-list a {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 4px; border-radius: var(--hm-radius);
  color: var(--hm-text); font-size: 14px; font-weight: 600; text-align: center; line-height: 1.25;
  text-decoration: none; transition: background-color .15s ease;
}
.home .hm-strip-list a:hover, .home .hm-strip-list a:focus { background: var(--hm-alt); color: var(--hm-text); text-decoration: underline; }
.home .hm-strip-ic { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.home .hm-strip-ic img { max-width: 44px; max-height: 44px; width: auto; height: auto; }
.home .hm-strip-ic .fas { font-size: 34px; color: var(--hm-primary); }

/* ---------- Tabs (Bootstrap 3 tab JS, custom look) ---------- */
.home .hm-tabs {
  display: flex; justify-content: center; gap: 4px;
  margin: 0 auto 28px; padding: 0; border-bottom: 1px solid var(--hm-border);
  overflow-x: auto; overflow-y: hidden;   /* sideways scroll on phones only; no stray vertical scrollbar */
}
@media (min-width: 768px) { .home .hm-tabs { overflow: visible; } }
.home .hm-tabs > li { float: none; }
/* No browser focus box after a mouse click; keep a clear outline for keyboard users */
.home .hm-tabs > li > a:focus { outline: none; }
.home .hm-tabs > li > a:focus-visible { outline: 2px solid var(--hm-primary); outline-offset: -2px; }
/* The shared stylesheet gives every .tab-pane a border, side padding and overflow:auto: remove on these pages */
.home .tab-content > .tab-pane { border: 0; padding: 0; overflow: visible; }
.home .hm-tabs > li > a {
  display: block; padding: 10px 12px; margin-bottom: -1px;
  font-size: 15px; font-weight: 600; color: var(--hm-muted); white-space: nowrap;
  background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
}
@media (min-width: 768px) { .home .hm-tabs > li > a { padding: 10px 22px; font-size: 16px; } }
.home .hm-tabs > li > a:hover, .home .hm-tabs > li > a:focus { background: transparent; color: var(--hm-text); border-bottom-color: #c8c8c8; }
.home .hm-tabs > li.active > a,
.home .hm-tabs > li.active > a:hover,
.home .hm-tabs > li.active > a:focus { color: var(--hm-text); border-bottom-color: var(--hm-primary); }

/* ---------- Product cards (store) ---------- */
.home .hm-prod-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px)  { .home .hm-prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .home .hm-prod-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px)  { .home .hm-prod-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 1100px; margin: 0 auto; } }
.home .hm-prod {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--hm-border); border-radius: var(--hm-radius);
  overflow: hidden; transition: box-shadow .2s ease;
}
.home .hm-prod:hover { box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, .13), 0 10px 28px rgba(0, 0, 0, .10); }
.home .hm-prod-featured { border: 2px solid var(--hm-primary); }
.home .hm-sec-alt .hm-prod { border-color: transparent; }
.home .hm-sec-alt .hm-prod-featured { border-color: var(--hm-primary); }
.home .hm-badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: var(--hm-primary); color: #fff;
  font-size: 12px; font-weight: 700; line-height: 1; border-radius: var(--hm-radius-btn); padding: 5px 8px;
}
.home .hm-badge-inline { position: static; display: inline-block; margin-bottom: 12px; }
.home .hm-prod-media {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 200px; background: #f7f7f7;
}
.home .hm-prod-media img { max-height: 168px; width: auto; height: auto; }
.home .hm-prod-media img.hm-prod-icon { max-height: 88px; height: 88px; }
.home .hm-prod-media-pair img { max-height: 140px; }
.home .hm-prod-media-pair img.hm-prod-icon { height: 64px; max-height: 64px; }
.home .hm-prod-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.home .hm-prod h3 a:link, .home .hm-prod h3 a:visited { color: var(--hm-text); text-decoration: none; }
.home .hm-prod h3 a:hover { color: var(--hm-primary); text-decoration: underline; }
.home .hm-prod-body > p { color: var(--hm-muted); font-size: 14px; margin: 0 0 12px; }
.home .hm-prod-feats { list-style: none; padding: 0; margin: 0 0 16px; }
.home .hm-prod-feats li { position: relative; padding-left: 22px; margin-bottom: 6px; font-size: 13.5px; }
.home .hm-prod-feats li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--hm-primary); font-weight: 700; }
.home .hm-prod-buy { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hm-border); }
.home .hm-prod-price { font-size: 18px; font-weight: 600; }
.home .hm-prod-term { font-size: 12.5px; color: var(--hm-muted); }
/* Cards without a price block (e.g. m365-business.php): push the buttons to the bottom so they line up */
.home .hm-prod-feats + .hm-prod-actions { margin-top: auto; padding-top: 4px; }
.home .hm-prod-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.home .hm-prod-actions a.hm-btn { padding: 7px 18px; }
.home .hm-prod-body > p + .hm-prod-actions, .home .hm-prod-feats + .hm-prod-actions { margin-top: auto; }   /* cards without a price block: buttons line up at the bottom */
.home .hm-plus {
  flex: 0 0 auto; align-self: center; justify-self: center;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hm-primary); color: #fff; font-weight: 700; font-size: 17px; line-height: 1;
}

/* ---------- Microsoft 365 E7 spotlight ---------- */
.home .hm-e7 { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 992px) { .home .hm-e7 { grid-template-columns: 1fr 1fr; gap: 56px; } }
.home .hm-e7-media img { display: block; width: 100%; height: auto; border-radius: var(--hm-radius); }
.home .hm-e7-body h2 { font-size: 30px; line-height: 1.15; margin: 0 0 4px; }
@media (min-width: 992px) { .home .hm-e7-body h2 { font-size: 38px; } }
.home .hm-e7-sub { font-size: 18px; font-weight: 600; color: var(--hm-primary); margin-bottom: 12px; }
.home .hm-e7-body > p { color: var(--hm-muted); font-size: 16px; margin: 0 0 20px; }
.home .hm-e7-formula { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 24px; }
@media (min-width: 768px) { .home .hm-e7-formula { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; } }
.home .hm-e7-part { background: var(--hm-alt); border-radius: var(--hm-radius); padding: 14px 12px; text-align: center; }
.home .hm-e7-part strong { display: block; font-size: 14px; line-height: 1.3; margin-bottom: 2px; }
.home .hm-e7-part span { font-size: 12.5px; color: var(--hm-muted); }

/* ---------- Why buy from us ---------- */
.home .hm-why-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px)  { .home .hm-why-grid { grid-template-columns: repeat(3, 1fr); } }

/* Highlight banner: moving from another provider */
.home .hm-switch {
  display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center;
  background: var(--hm-primary); color: #fff;
  border-radius: var(--hm-radius); padding: 26px 22px; margin-bottom: 20px;
  box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, .13), 0 8px 24px rgba(2, 112, 198, .25);
}
@media (min-width: 768px)  { .home .hm-switch { padding: 30px 32px; } }
@media (min-width: 1200px) { .home .hm-switch { grid-template-columns: 1.5fr 1fr auto; gap: 40px; padding: 32px 40px; } }
.home .hm-switch-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #cfe5fa; }
.home .hm-switch-eyebrow .fas { margin-right: 6px; }
.home .hm-switch h3 { color: #fff; font-size: 24px; margin: 6px 0 6px; }
@media (min-width: 992px) { .home .hm-switch h3 { font-size: 28px; } }
.home .hm-switch-text p { color: #e1eefa; font-size: 15px; margin: 0; max-width: 620px; }
.home .hm-switch-list { list-style: none; padding: 0; margin: 0; }
.home .hm-switch-list li { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.home .hm-switch-list li:last-child { margin-bottom: 0; }
.home .hm-switch-list .fas { margin-right: 8px; color: #fff; }
.home .hm-switch a.hm-btn:link, .home .hm-switch a.hm-btn:visited { background: #fff; color: var(--hm-primary); border-color: #fff; white-space: nowrap; }
.home .hm-switch a.hm-btn:hover, .home .hm-switch a.hm-btn:focus { background: var(--hm-tint); border-color: var(--hm-tint); color: var(--hm-primary-dark); }
.home .hm-why-item { display: flex; flex-direction: column; background: #fff; border-radius: var(--hm-radius); padding: 24px; }
.home .hm-why-ic { font-size: 28px; color: var(--hm-primary); margin-bottom: 14px; }
.home .hm-why-item h3 { font-size: 17px; }
.home .hm-why-item p { color: var(--hm-muted); font-size: 14px; margin: 0 0 14px; }
.home .hm-why-item .hm-more { margin-top: auto; align-self: flex-start; }
@media (min-width: 768px)  { .home .hm-why-grid.hm-why-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .home .hm-why-grid.hm-why-grid-4 { grid-template-columns: repeat(4, 1fr); } }
.home .hm-switch-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
@media (min-width: 1200px) { .home .hm-switch-cta { flex-direction: column; align-items: flex-start; } }
.home .hm-switch a.hm-more:link, .home .hm-switch a.hm-more:visited { color: #fff; }
.home .hm-switch a.hm-more:hover, .home .hm-switch a.hm-more:focus { color: #fff; }

/* ---------- Latest from the blog ---------- */
.home .hm-posts { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) { .home .hm-posts { grid-template-columns: repeat(3, 1fr); } }
.home .hm-post {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--hm-border);
  border-radius: var(--hm-radius); overflow: hidden; color: var(--hm-text); text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.home .hm-post:hover, .home .hm-post:focus { border-color: var(--hm-primary); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); color: var(--hm-text); text-decoration: none; }
.home .hm-post-img { display: block; aspect-ratio: 16 / 9; background: var(--hm-alt); overflow: hidden; }
.home .hm-post-img img { width: 100%; height: 100%; object-fit: cover; }
.home .hm-post-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.home .hm-post-date { font-size: 13px; color: var(--hm-muted); margin-bottom: 6px; }
.home .hm-post-title { font-size: 17px; font-weight: 600; line-height: 1.35; margin-bottom: 14px; }
.home .hm-post .hm-more { margin-top: auto; color: var(--hm-primary); font-weight: 600; }
.home .hm-post .hm-more::after { content: "\203A"; margin-left: 5px; }
.home .hm-post:hover .hm-more { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .home .hm-prod-media img, .home a.hm-more::after { transition: none; }
  .home .hm-prod:hover .hm-prod-media img, .home a.hm-more:hover::after { transform: none; }
}
