/* ═══════════════════════════════════════════════════════════
   Microsoft Dynamics 365 Overview Page
   Scoped under .ms-d365-page to avoid conflicts with
   other templates.
═══════════════════════════════════════════════════════════ */

/* ─── BREADCRUMB ─────────────────────────────────────────── */
.ms-d365-page ~ .page-crumb,
.page-crumb:has(+ .ms-d365-page),
.ms-d365-page .page-crumb {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

/* page-crumb sits before .ms-d365-page in markup */
body.page-template-template-microsoft-dynamics-365 .page-crumb {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

body.page-template-template-microsoft-dynamics-365 .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  color: var(--gray-400);
  font-size: 0.78rem;
}

body.page-template-template-microsoft-dynamics-365 .breadcrumb a {
  color: var(--gray-400);
  text-decoration: none;
}

body.page-template-template-microsoft-dynamics-365 .breadcrumb a:hover {
  color: var(--navy);
}

body.page-template-template-microsoft-dynamics-365 .breadcrumb .sep {
  opacity: 0.45;
}

body.page-template-template-microsoft-dynamics-365 .breadcrumb .current {
  color: var(--navy);
  font-weight: 700;
}

/* ─── HERO ───────────────────────────────────────────────── */
.ms-d365-page .hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy) 0%, #170043 100%);
  color: var(--white);
  padding: 72px 0 64px;
  min-height: unset;
  text-align: left;
}

.ms-d365-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.ms-d365-page .hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: center;
}

.ms-d365-page .hero-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--white);
}

.ms-d365-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(0, 229, 185, 0.12);
  border: 1px solid rgba(0, 229, 185, 0.3);
  padding: 6px 14px;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.ms-d365-page .hero-lead {
  margin: 18px 0 0;
  max-width: 640px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.72);
}

.ms-d365-page .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ─── HERO IMAGE / PLACEHOLDER ──────────────────────── */
.ms-d365-page .placeholder-image {
  min-height: 320px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ms-d365-page .placeholder-image.dark {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}

/* placeholder inside non-hero sections */
.ms-d365-page .section .placeholder-image {
  border-color: var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-400);
}

.ms-d365-page .placeholder-card {
  max-width: 320px;
}

.ms-d365-page .ph-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.ms-d365-page .ph-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.ms-d365-page .ph-note {
  display: block;
  font-size: 0.75rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.ms-d365-page .section .ph-note {
  color: var(--gray-400);
}

/* ─── BUTTONS (scoped to hero, matching NewDesign site.css) ────── */
/* Base for all hero CTA links */
.ms-d365-page .hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 22px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  line-height: 1;
}

/* Primary — navy solid, white text */
.ms-d365-page .hero-actions .btn-primary {
  background: var(--navy) !important;
  color: var(--white) !important;
  border-color: rgba(255, 255, 255, 0.15);
}

.ms-d365-page .hero-actions .btn-primary:hover {
  background: var(--navy-mid) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(27, 0, 78, 0.4);
}

/* Outline — transparent, white border + white text */
.ms-d365-page .hero-actions .btn-outline {
  background: transparent !important;
  color: var(--white) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

.ms-d365-page .hero-actions .btn-outline:hover {
  border-color: var(--teal) !important;
  background: var(--teal) !important;
  color: var(--navy) !important;
  transform: translateY(-1px);
}

/* ─── SECTIONS ────────────────────────────────────────────── */
.ms-d365-page .section {
  padding: 88px 0;
  background: var(--white);
}

.ms-d365-page .section.alt {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.ms-d365-page .section-header {
  max-width: 760px;
  margin-bottom: 28px;
}

.ms-d365-page .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal-dark);
  margin-bottom: 12px;
}

.ms-d365-page .section-title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.ms-d365-page .section-lead {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--gray-600);
  font-size: 1rem;
}

/* ─── GRIDS ───────────────────────────────────────────────── */
.ms-d365-page .grid {
  display: grid;
  gap: 20px;
}

.ms-d365-page .grid.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ms-d365-page .grid.cards-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* ─── CARDS ───────────────────────────────────────────────── */
.ms-d365-page .card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 1px 3px rgba(27, 0, 78, 0.08);
  transition: all 0.25s ease;
}

.ms-d365-page .card:hover {
  border-color: var(--teal);
  box-shadow: 0 4px 20px rgba(27, 0, 78, 0.1);
  transform: translateY(-3px);
}

.ms-d365-page .card h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 1.02rem;
  line-height: 1.3;
}

.ms-d365-page .card h3 a {
  color: var(--navy);
  text-decoration: none;
}

.ms-d365-page .card h3 a:hover {
  color: var(--teal-dark);
}

.ms-d365-page .card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.9rem;
  line-height: 1.75;
}

/* ─── ICON BADGE ──────────────────────────────────────────── */
.ms-d365-page .icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--navy-light);
  color: var(--navy);
}

.ms-d365-page .icon-badge.teal {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.ms-d365-page .icon-badge.red {
  background: var(--red-light);
  color: var(--red);
}

/* ─── SPLIT LAYOUT ────────────────────────────────────────── */
.ms-d365-page .split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

/* ─── METRICS ─────────────────────────────────────────────── */
.ms-d365-page .metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ms-d365-page .metric {
  background: var(--navy-light);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 24px;
}

.ms-d365-page .metric strong {
  display: block;
  color: var(--navy);
  font-size: 1.9rem;
  line-height: 1;
  margin-bottom: 6px;
}

.ms-d365-page .metric span {
  color: var(--gray-600);
  font-size: 0.85rem;
}

/* ─── CTA BAND ────────────────────────────────────────────── */
.ms-d365-page .cta-band {
  background: var(--navy);
  color: var(--white);
  padding: 72px 0;
}

.ms-d365-page .cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.ms-d365-page .cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.14;
  color: var(--white);
}

.ms-d365-page .cta-band p {
  margin: 0;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.68);
}

.ms-d365-page .cta-band .btn-teal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 14px 28px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: var(--teal);
  color: var(--navy);
  white-space: nowrap;
  flex-shrink: 0;
}

.ms-d365-page .cta-band .btn-teal:hover {
  background: #00ffcc;
  transform: translateY(-1px);
}

/* ─── HERO IMAGE ──────────────────────────────────────────── */
.ms-d365-page .hero-image {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(27, 0, 78, 0.3);
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .ms-d365-page .hero-grid,
  .ms-d365-page .split {
    grid-template-columns: 1fr;
  }

  .ms-d365-page .placeholder-image {
    min-height: 260px;
  }
}

@media (max-width: 720px) {
  .ms-d365-page .section {
    padding: 56px 0;
  }

  .ms-d365-page .grid.cards-3,
  .ms-d365-page .grid.cards-4,
  .ms-d365-page .metric-grid {
    grid-template-columns: 1fr;
  }

  .ms-d365-page .cta-band-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .ms-d365-page .hero-actions {
    flex-direction: column;
  }
}
