/* ==========================================
   HOMEPAGE — Microsoft Learn style product grid
========================================== */

/* Page intro */
.homepage-hero {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  margin-bottom: 2rem;
}

.homepage-hero h1 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.homepage-hero p {
  font-size: 1rem;
  color: var(--md-default-fg-color--light);
}

/* Section heading */
.homepage-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: none;
  color: var(--md-default-fg-color);
}

/* ==========================================
   PRODUCT CARD GRID — 3 columns like MS Learn
========================================== */
.homepage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Individual card */
.homepage-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  text-decoration: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-color: var(--md-default-bg-color);
}

.homepage-card:hover {
  border-color: #0078d4;
  box-shadow: 0 2px 8px rgba(0, 120, 212, 0.15);
  transform: none;
}

/* Card icon */
.homepage-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.homepage-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Card title */
.homepage-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #0078d4;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.homepage-card:hover .homepage-card__title {
  text-decoration: underline;
}

/* Card description */
.homepage-card__body {
  font-size: 0.875rem;
  color: var(--md-default-fg-color--light);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

/* ==========================================
   RECOMMENDED RESOURCES — bottom section
========================================== */
.homepage-resources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.homepage-resource {
  padding: 1.25rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 6px;
  text-decoration: none !important;
  transition: border-color 0.2s ease;
}

.homepage-resource:hover {
  border-color: #0078d4;
}

.homepage-resource__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0078d4;
  margin: 0 0 0.5rem;
}

.homepage-resource__body {
  font-size: 0.85rem;
  color: var(--md-default-fg-color--light);
  line-height: 1.5;
}

/* ==========================================
   DARK MODE
========================================== */
[data-md-color-scheme="slate"] .homepage-card,
[data-md-color-scheme="slate"] .homepage-resource {
  border-color: #3a3a3a;
  background-color: #1b1b1b;
}

[data-md-color-scheme="slate"] .homepage-card:hover,
[data-md-color-scheme="slate"] .homepage-resource:hover {
  border-color: #0078d4;
  box-shadow: 0 2px 8px rgba(0, 120, 212, 0.2);
}

/* ==========================================
   MOBILE
========================================== */
@media (max-width: 960px) {
  .homepage-grid,
  .homepage-resources {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .homepage-grid,
  .homepage-resources {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------
   Product cards — remove border, add left bar
   like Microsoft Learn
-------------------------------------------- */
.homepage-card {
  border: none !important;
  border-left: 3px solid #0078d4 !important;
  border-radius: 0 !important;
  padding: 0.75rem 1rem !important;
  box-shadow: none !important;
  background-color: transparent !important;
}

.homepage-card:hover {
  border-left-color: #005a9e !important;
  box-shadow: none !important;
  background-color: rgba(0, 120, 212, 0.05) !important;
}

/* Dark mode */
[data-md-color-scheme="slate"] .homepage-card:hover {
  background-color: rgba(0, 120, 212, 0.08) !important;
}

/* -------------------------------------------
   Hero — text left, image right
-------------------------------------------- */
.homepage-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  margin-bottom: 2rem;
}

.homepage-hero__text {
  flex: 1;
}

.homepage-hero .homepage-hero__text h1,
.md-typeset .homepage-hero .homepage-hero__text h1 {
  font-size: 3rem !important;
  font-weight: 500 !important;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.homepage-hero__text p {
  font-size: 1rem;
  color: var(--md-default-fg-color--light);
}

.homepage-hero__image {
  flex-shrink: 0;
  width: 450px;
}

.homepage-hero__image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Mobile — stack vertically */
@media (max-width: 768px) {
  .homepage-hero {
    flex-direction: column;
  }

  .homepage-hero__image {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
}