/* Header chiara e più alta, per far risaltare il logo Mon Ami 3000 */
.md-header {
  background-color: #ffffff;
  color: #2d2d2d;
  box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.1), 0 0.2rem 0.4rem rgba(0, 0, 0, 0.1);
}

.md-header__inner {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.md-header__title {
  color: #2d2d2d;
  font-weight: 600;
}

/* Il logo contiene già "Mon Ami 3000": nascondi il nome sito ridondante,
   mantenendo il titolo della pagina che compare durante lo scroll */
.md-header__title .md-header__topic:first-child {
  display: none;
}

/* Icone (menu, tema, ricerca) leggibili su header chiara */
.md-header .md-icon,
.md-header__option,
.md-search__icon {
  color: #2d2d2d;
}

/* Campo di ricerca su header chiara */
.md-search__form {
  background-color: rgba(0, 0, 0, 0.05);
  color: #2d2d2d;
}

.md-search__form:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.md-search__input {
  color: #2d2d2d;
}

.md-search__input::placeholder {
  color: rgba(0, 0, 0, 0.55);
}

/* Ripristina la UI di ricerca: la build del tema non mostrava il box in
   desktop né il pulsante-lente in mobile. Mantiene l'overlay a comparsa. */
@media screen and (min-width: 60em) {
  .md-search {
    display: block;
  }
}

@media screen and (max-width: 59.98em) {
  .md-header__button[for="__search"] {
    display: inline-block;
  }
}

.md-header__button.md-logo {
  cursor: pointer;
  padding: 0;
}

/* Evita l'attenuazione del logo al passaggio del mouse */
.md-header__button.md-logo:hover,
.md-header__button.md-logo img {
  opacity: 1;
}

.md-header__button.md-logo img {
  height: 56px;
  width: auto;
}

[data-md-color-primary="custom"] {
  --md-primary-fg-color: #2d2d2d;
  --md-primary-fg-color--light: #444;
  --md-primary-fg-color--dark: #1a1a1a;
}

/* Breadcrumb "percorso menu" sotto il titolo delle schermate */
.md-typeset .menu-path {
  display: inline-block;
  margin: -0.4rem 0 1.1rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--md-default-fg-color--light);
  background: var(--md-default-fg-color--lightest);
  border-radius: 5px;
}

.md-typeset .menu-path::before {
  content: "\1F9ED\00A0\00A0";
}

/* Home page card grid */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

.home-card {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.home-card:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home-card h3 {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  line-height: 1.3;
  overflow-wrap: break-word;
  hyphens: auto;
}

.home-card p {
  font-size: 0.85rem;
  color: var(--md-default-fg-color--light);
}

.home-card a {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ====== Restyling 2026: hero, icone card, mega footer ====== */

/* Griglia card: 4 colonne, con riduzione progressiva */
.home-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
  .home-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 850px) {
  .home-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

.home-card {
  padding: 1.4rem 1.3rem;
  box-shadow: 0 1px 2px rgba(20, 22, 25, 0.05), 0 6px 22px rgba(20, 22, 25, 0.05);
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(20, 22, 25, 0.1);
}

/* Spaziatura interna card compatta e uniforme (niente margini 1em di Material) */
.home-card > p {
  margin: 0;
}

.home-card > p:first-of-type {
  margin-bottom: 0.55rem;
}

.home-card > p:nth-of-type(2) {
  margin-bottom: 0.7rem;
}

/* Card in colonna: il link resta ancorato in fondo, allineato tra le card */
.home-card {
  display: flex;
  flex-direction: column;
}

.home-card > p:last-child {
  margin-top: auto;
  padding-top: 0.3rem;
}

/* Box icona in cima alla card */
.home-card__ico {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(244, 102, 30, 0.12);
  box-shadow: 0 0 0 4px rgba(244, 102, 30, 0.1);
  margin-bottom: 0.7rem;
  color: var(--md-accent-fg-color);
}

.home-card__ico .twemoji {
  display: inline-flex;
}

.home-card__ico svg {
  width: 22px;
  height: 22px;
  fill: var(--md-accent-fg-color);
}

/* Hero della home */
.mam-hero {
  background: linear-gradient(120deg, #222428 0%, #3a3d43 100%);
  color: #fff;
  border-radius: 18px;
  padding: 2.4rem 2.4rem 2.2rem;
  margin: 0 0 2rem;
  position: relative;
  overflow: hidden;
}

.mam-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--md-accent-fg-color) 0%, transparent 68%);
  opacity: 0.22;
}

.mam-hero > * {
  position: relative;
  z-index: 1;
}

.mam-hero h1 {
  color: #fff;
  margin: 0.2rem 0 0.6rem;
}

.mam-hero p {
  color: #cfd2d7;
  max-width: 600px;
}

.mam-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--md-accent-fg-color);
  margin: 0;
}

.mam-hero .md-button {
  margin-top: 0.4rem;
}

.mam-hero .md-button--primary {
  background: var(--md-accent-fg-color);
  border-color: var(--md-accent-fg-color);
  color: #fff;
}

/* Pulsante secondario dell'hero: testo e bordo chiari, leggibili sul fondo scuro */
.mam-hero .md-button:not(.md-button--primary) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.mam-hero .md-button:not(.md-button--primary):hover {
  background: var(--md-accent-fg-color);
  border-color: var(--md-accent-fg-color);
  color: #fff;
}


/* ====== Mega footer brandizzato ====== */
.mam-footer {
  background: #222428;
  color: #aeb2b8;
}

[data-md-color-scheme="slate"] .mam-footer {
  background: #16171a;
}

.mam-footer__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 61rem;
  margin: 0 auto;
  padding: 2.2rem 1.2rem 1.6rem;
}

@media (max-width: 900px) {
  .mam-footer__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .mam-footer__inner {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}

.mam-footer h4 {
  color: #fff;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 0 0 0.8rem;
}

.mam-footer a {
  display: block;
  color: #aeb2b8;
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.25rem 0;
}

.mam-footer a:hover {
  color: var(--md-accent-fg-color);
}

.mam-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.mam-footer__brand img {
  height: 34px;
  width: auto;
}

.mam-footer__brand span {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.mam-footer__about {
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0;
}



