/* ============================================================
   home.css — Homepage-only styles for AGate Documentation
   Loaded by: templates/home.html via {% block extrahead %}
   ============================================================ */


/* ===== LAYOUT BEGIN ===== */
/* Hide navigation menu on the right */
.md-sidebar--secondary {
  display: none !important;
}

/* Hide Material's original search UI */
.md-search__overlay,
.md-search__inner {
  display: none !important;
}
.md-header__button[for="__search"] {
  display: none !important;
}
/* ===== LAYOUT END ===== */

/* ===== HOMEPAGE HERO BEGIN ===== */
/* Hero section - style */
.agate-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding: 3rem 1.5rem 2.5rem;
}

/* Hero section - logo - style */
.agate-hero__logo {
  width: 90%;
}

/* Hero section - subtitle - style */
.agate-hero__subtitle {
  margin: 0;
}

/* Hero section - quick links - wrapper */
.agate-hero__quicklinks {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 80%;
}
/* Hero section - quick links - row */
.agate-hero__quicklinks-row {
  display: flex;
  gap: 0.625rem;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Hero section - quick links - link */
.agate-hero__quicklink {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0rem;
  font-weight: 700;
  color: var(--md-primary-bg-color) !important;
  transition: color 0.2s ease;
}

/* Hero section - quick links - link - icon */
.agate-hero__quicklink svg {
  width: 1.75rem;
  height: 1.75rem;
}
.agate-hero__quicklink svg path {
  fill: var(--md-primary-bg-color) !important;
  transition: fill 0.2s ease;
}
.agate-hero__quicklink:hover svg path {
  fill: var(--md-accent-fg-color) !important;
}

/* Hero section - quick links - mobile */
@media screen and (max-width: 76.24em) {
  .agate-hero__quicklinks {
    width: auto;
  }
  .agate-hero__quicklinks-row {
    flex-direction: column;
    align-items: center;
  }
}
/* ===== HOMEPAGE HERO END ===== */


/* ===== HERO SEARCH BAR BEGIN ===== */
/* Hero section - search - wrapper */
.agate-hero__search-wrap {
  position: relative;
  display: inline-block;
  width: 80%;
  z-index: 3;
}

/* Hero section - search - box */
.agate-hero__search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  background-color: var(--md-primary-fg-color);
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--md-primary-bg-color);
  border-radius: 16px;
  transition: border-color 0.2s ease, border-radius 0.2s ease, box-shadow 0.2s ease;
}

/* Hero section - search - box - hover and focus */
.agate-hero__search-bar:hover,
.agate-hero__search-bar:focus-within {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Hero section - search - box - icon */
.agate-hero__search-bar svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--md-primary-bg-color);
  fill: var(--md-primary-bg-color);
}

/* Hero section - search - box - text */
.agate-hero__search-input {
  min-width: 0;
  padding: 0rem 1rem;
  font-size: inherit;
}

/* Hero section - search - box - open */
.agate-hero__search-wrap:has(.agate-hero__search-dropdown.active) .agate-hero__search-bar {
  border-radius: 16px 16px 0 0;
  border-color: var(--md-accent-fg-color);
}

/* Hero section - search - screen shading */
.agate-hero__search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: hsla(0, 0%, 0%, 0.54);
  z-index: 2;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}
/* Hero section - search - screen shading - active */
.agate-hero__search-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Hero section - search - dropdown */
.agate-hero__search-dropdown {
  position: absolute;
  max-height: 0;
  top: 100%;
  left: 0;
  right: 0;
  overflow: hidden;
  background-color: var(--md-primary-fg-color);
  border: 2px solid var(--md-primary-bg-color);
  border-top: none;
  border-radius: 0 0 16px 16px;
  opacity: 0;
  transition: max-height 250ms ease, opacity 200ms ease;
}

/* Hero section - search - dropdown - active */
.agate-hero__search-dropdown.active {
  max-height: 24rem;
  overflow-y: auto;
  opacity: 1;
  scrollbar-width: thin;
}

/* Hero section - search - dropdown - active */
.agate-hero__search-dropdown:hover {
  scrollbar-color: var(--md-accent-fg-color) transparent;
}

/* Hero section - search - dropdown - results - hide empty list */
.agate-hero__search-dropdown .md-search-result__list:empty {
  display: none;
}

/* Hero section - search - dropdown - results - base text */
.agate-hero__search-dropdown .md-typeset {
  font-size: 0.8rem !important;
  line-height: 1.6 !important;
  color: var(--md-default-fg-color--light) !important;
}

/* Hero section - search - dropdown - results - h1 text */
.agate-hero__search-dropdown .md-typeset h1 {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--md-default-fg-color) !important;
  margin: 0.5em 0 !important;
}

/* Hero section - search - dropdown - results - h2 text */
.agate-hero__search-dropdown .md-typeset h2 {
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: var(--md-default-fg-color) !important;
  margin: 0.5em 0 !important;
}

/* Hero section - search - dropdown - results - h3 text */
.agate-hero__search-dropdown .md-typeset h3 {
  font-size: 0.6rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: var(--md-default-fg-color) !important;
  margin: 0.5em 0 !important;
}

/* Hero section - search - dropdown - results - found text format */
.agate-hero__search-dropdown mark {
  color: var(--md-accent-fg-color) !important;
  background-color: transparent !important;
}

/* Hero section - search - dropdown - results - code blocks */
.agate-hero__search-dropdown .md-typeset code {
  color: var(--md-default-fg-color) !important;
}

/* Hero section - search - dropdown - results - "More results" style */
.agate-hero__search-dropdown .md-search-result__more {
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* Hero section - search - dropdown - results - "More results" style - text */
.agate-hero__search-dropdown .md-search-result__more > summary {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  min-height: 0;
  font-weight: normal;
}
/* Hero section - search - dropdown - results - "More results" style - icon */
.agate-hero__search-dropdown .md-search-result__more > summary::before,
.agate-hero__search-dropdown .md-search-result__more > summary::after {
  display: none;
}
/* ===== HERO SEARCH BAR END ===== */

/* ===== CARD GRID BEGIN ===== */
/* Card grid - section */
.agate-cards {
  max-width: 90%;
  margin: 0 auto;
}

/* Card grid - 2x3 grid */
.agate-cards__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, auto auto);
  gap: 1.5rem;
}

/* Card grid - card */
.agate-cards__card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
  border: 2px solid var(--md-primary-bg-color);
  border-radius: 16px;
  padding: 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Card grid - card - hover */
.agate-cards__card:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Card grid - card - icons */
.agate-cards__icon svg {
  width: 2.5rem;
  height: 2.5rem;
}


/* Card grid - links */
.agate-cards__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.agate-cards__links a {
  font-weight: 700;
}


/* Card grid - responsive: 2 columns on tablet */
@media screen and (max-width: 76.24em) {
  .agate-cards__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Card grid - responsive: 1 column on mobile */
@media screen and (max-width: 44.99em) {
  .agate-cards__grid {
    grid-template-columns: 1fr;
  }
}
/* ===== CARD GRID END ===== */
