/* =========================================================
   Home v13 — cards unificados, tipos enxutos e identificação explícita
   Arquivo exclusivo da página inicial.
   ========================================================= */

.home-catalog-section {
  padding-top: 20px;
}

.home-section-heading {
  align-items: flex-end;
  margin-bottom: 13px;
}

.home-section-heading > div {
  min-width: 0;
}

.home-section-heading p {
  margin: 6px 0 0;
  color: var(--texto-suave);
  font-size: 14px;
  line-height: 1.4;
}

/* Padrão visual único para atividades, tipos e Educação Infantil. */
.home-choice-grid {
  display: grid;
  gap: 14px;
}

.home-activity-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-material-type-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-choice-card {
  position: relative;
  min-width: 0;
  min-height: 148px;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--borda-2);
  border-radius: 11px;
  box-shadow: var(--sombra-card);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.home-choice-card:hover {
  transform: translateY(-3px);
  border-color: #c8e3e8;
  box-shadow: 0 11px 27px rgba(6, 43, 95, .13);
}

.home-choice-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  border-radius: 14px;
  background: #eef8fb;
  font-size: 28px;
}

.home-choice-icon.blue {
  color: #287ce1;
  background: #edf5ff;
}

.home-choice-icon.blue-light {
  color: #2b7fe7;
  background: #edf6ff;
}

.home-choice-icon.teal {
  color: #0e9eaa;
  background: #e7f8f7;
}

.home-choice-icon.green {
  color: #5ba82f;
  background: #eff9e9;
}

.home-choice-icon.orange {
  color: #e58a28;
  background: #fff4e8;
}

.home-choice-icon.purple {
  color: #7656c5;
  background: #f3effc;
}

.home-choice-kicker {
  display: block;
  min-height: 13px;
  margin-bottom: 4px;
  color: #008b9e;
  font-size: 9px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.home-choice-card strong {
  display: block;
  max-width: 178px;
  color: var(--azul-profundo);
  font-size: 14px;
  line-height: 1.16;
}

.home-choice-card small {
  display: block;
  max-width: 190px;
  margin-top: 6px;
  color: var(--texto-suave);
  font-size: 11px;
  line-height: 1.32;
}

.home-choice-arrow {
  position: absolute;
  right: 11px;
  bottom: 8px;
  color: var(--turquesa);
  font-size: 17px;
  font-weight: 900;
  opacity: .82;
}

.home-type-card {
  min-height: 168px;
  padding-left: 12px;
  padding-right: 12px;
}

.home-type-card .home-choice-kicker {
  min-height: 23px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Educação Infantil */
.early-childhood-panel {
  display: grid;
  grid-template-columns: minmax(300px, .63fr) minmax(0, 1.8fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid #cfe8e7;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(6, 43, 95, .08);
}

.early-childhood-intro {
  position: relative;
  min-height: 408px;
  padding: 31px 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 12%, rgba(114, 189, 63, .16), transparent 28%),
    linear-gradient(145deg, #eaf9f7, #f6fcf9);
}

.early-childhood-intro::after {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -72px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(15, 166, 183, .09);
}

.early-childhood-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: #008d9e;
  background: #d5f1ee;
  border-radius: 50%;
  font-size: 30px;
}

.early-childhood-kicker {
  margin: 15px 0 5px;
  color: #008d9e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.early-childhood-intro h2 {
  margin: 0;
  color: var(--azul-profundo);
  font-size: 27px;
}

.early-childhood-intro > p:not(.early-childhood-kicker) {
  max-width: 390px;
  margin: 9px 0 18px;
  color: #315576;
  font-size: 14px;
  line-height: 1.5;
}

.early-childhood-intro .btn {
  position: relative;
  z-index: 2;
  text-align: center;
}

.early-childhood-content {
  padding: 25px 27px 27px;
  display: grid;
  gap: 23px;
  align-content: start;
}

.early-childhood-content h3 {
  margin: 0 0 11px;
  color: var(--azul-profundo);
  font-size: 15px;
}

.early-childhood-types {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-infantil-type-card {
  min-height: 174px;
  padding-left: 10px;
  padding-right: 10px;
}

.home-infantil-type-card .home-choice-kicker {
  min-height: 23px;
  display: flex;
  align-items: flex-end;
}

.early-childhood-stages {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.home-stage-card {
  position: relative;
  min-height: 74px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 31px 12px 13px;
  color: var(--azul-profundo);
  background: #f6fbfc;
  border: 1px solid #dcebef;
  border-radius: 10px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.home-stage-card:hover {
  transform: translateY(-1px);
  border-color: #b9dfe1;
  background: #effaf9;
}

.home-stage-card span {
  display: block;
  margin-bottom: 3px;
  color: #008b9e;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.home-stage-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.18;
}

.home-stage-card i {
  position: absolute;
  right: 11px;
  top: 50%;
  color: var(--turquesa);
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
  transform: translateY(-50%);
}

@media (max-width: 1180px) {
  .home-material-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .early-childhood-panel {
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.5fr);
  }

  .early-childhood-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .early-childhood-stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .early-childhood-panel {
    grid-template-columns: 1fr;
  }

  .early-childhood-intro {
    min-height: 0;
    padding: 27px 28px;
  }
}

@media (max-width: 820px) {
  .home-section-heading {
    align-items: flex-start;
  }

  .home-activity-grid,
  .home-material-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .early-childhood-content {
    padding: 23px 24px;
  }
}

@media (max-width: 620px) {
  .home-choice-grid,
  .home-activity-grid,
  .home-material-type-grid,
  .early-childhood-types,
  .early-childhood-stages {
    grid-template-columns: 1fr;
  }

  .home-choice-card,
  .home-type-card,
  .home-infantil-type-card {
    min-height: 122px;
    display: grid;
    grid-template-columns: 47px minmax(0, 1fr) 18px;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    align-items: center;
    text-align: left;
    padding: 13px 14px;
  }

  .home-choice-icon {
    grid-column: 1;
    grid-row: 1 / 4;
    margin: 0;
  }

  .home-choice-kicker,
  .home-type-card .home-choice-kicker,
  .home-infantil-type-card .home-choice-kicker {
    grid-column: 2;
    min-height: 0;
    justify-content: flex-start;
    align-items: end;
    margin: 0 0 2px;
  }

  .home-choice-card strong {
    grid-column: 2;
    max-width: none;
    font-size: 14px;
  }

  .home-choice-card small {
    grid-column: 2;
    max-width: none;
    margin-top: 3px;
  }

  .home-choice-arrow {
    position: static;
    grid-column: 3;
    grid-row: 1 / 4;
    align-self: center;
  }

  .home-stage-card {
    min-height: 64px;
  }
}

@media (max-width: 480px) {
  .home-section-heading {
    display: grid;
    gap: 8px;
  }

  .home-section-heading .see-all {
    justify-self: start;
  }

  .early-childhood-intro {
    padding: 25px 21px;
  }

  .early-childhood-content {
    padding: 21px 18px;
  }
}

/* =========================================================
   Home v14 — correção definitiva da Educação Infantil
   e neutralização dos seletores legados presentes em style.css.
   ========================================================= */

.early-childhood-panel {
  grid-template-columns: minmax(280px, .72fr) minmax(0, 1.68fr);
}

.early-childhood-intro {
  min-height: 360px;
}

.early-childhood-content {
  min-width: 0;
  grid-template-columns: 1fr;
  gap: 22px;
}

.early-childhood-content > div {
  min-width: 0;
}

.early-childhood-types {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* Sobrescreve .early-childhood-types a/span do CSS geral antigo. */
.early-childhood-types .home-infantil-type-card {
  min-width: 0;
  min-height: 154px;
  padding: 14px 12px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  text-align: center;
  color: inherit;
  background: #fff;
  border: 1px solid var(--borda-2);
  border-radius: 11px;
  font-size: inherit;
}

.early-childhood-types .home-infantil-type-card .home-choice-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  margin: 0 0 8px;
  border-radius: 13px;
  font-size: 26px;
}

.early-childhood-types .home-infantil-type-card .home-choice-kicker {
  width: auto;
  height: auto;
  min-height: 13px;
  flex: 0 0 auto;
  display: block;
  margin: 0 0 4px;
  padding: 0;
  color: #008b9e;
  background: transparent;
  border-radius: 0;
  font-size: 9px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .065em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.early-childhood-types .home-infantil-type-card strong {
  display: block;
  max-width: 180px;
  color: var(--azul-profundo);
  font-size: 14px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.early-childhood-types .home-infantil-type-card small {
  display: block;
  max-width: 190px;
  margin-top: 6px;
  color: var(--texto-suave);
  font-size: 11px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.early-childhood-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

/* Sobrescreve .early-childhood-stages a do CSS geral antigo. */
.early-childhood-stages .home-stage-card {
  position: relative;
  min-width: 0;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 11px 31px 11px 13px;
  color: var(--azul-profundo);
  background: #f6fbfc;
  border: 1px solid #dcebef;
  border-radius: 10px;
  font-size: inherit;
  font-weight: inherit;
}

.early-childhood-stages .home-stage-card:hover {
  color: var(--azul-profundo);
  background: #effaf9;
  border-color: #b9dfe1;
}

.early-childhood-stages .home-stage-card span {
  width: auto;
  height: auto;
  display: block;
  margin: 0 0 3px;
  padding: 0;
  color: #008b9e;
  background: transparent;
  border-radius: 0;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.early-childhood-stages .home-stage-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.early-childhood-stages .home-stage-card i {
  position: absolute;
  right: 11px;
  top: 50%;
  color: var(--turquesa);
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
  transform: translateY(-50%);
}

.home-empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 24px;
  text-align: center;
  color: var(--texto-suave);
  background: #f7fbfc;
  border: 1px dashed #cbdfe6;
  border-radius: 12px;
}

.home-empty-state strong {
  color: var(--azul-profundo);
  font-size: 16px;
}

.home-empty-state span {
  font-size: 13px;
}

@media (max-width: 1180px) {
  .early-childhood-panel {
    grid-template-columns: minmax(270px, .78fr) minmax(0, 1.45fr);
  }

  .early-childhood-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .early-childhood-stages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .early-childhood-panel {
    grid-template-columns: 1fr;
  }

  .early-childhood-intro {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .early-childhood-types,
  .early-childhood-stages {
    grid-template-columns: 1fr;
  }

  .early-childhood-types .home-infantil-type-card {
    min-height: 116px;
    display: grid;
    grid-template-columns: 47px minmax(0, 1fr) 18px;
    grid-template-rows: auto auto auto;
    column-gap: 12px;
    align-items: center;
    text-align: left;
    padding: 13px 14px;
  }

  .early-childhood-types .home-infantil-type-card .home-choice-icon {
    grid-column: 1;
    grid-row: 1 / 4;
    margin: 0;
  }

  .early-childhood-types .home-infantil-type-card .home-choice-kicker,
  .early-childhood-types .home-infantil-type-card strong,
  .early-childhood-types .home-infantil-type-card small {
    grid-column: 2;
    max-width: none;
  }

  .early-childhood-types .home-infantil-type-card .home-choice-arrow {
    position: static;
    grid-column: 3;
    grid-row: 1 / 4;
    align-self: center;
  }

  .early-childhood-stages .home-stage-card {
    min-height: 62px;
  }
}


/* Home v15 — materiais recentes no topo e destaques no fim */
.home-materials-recent {
  padding-top: 20px;
  padding-bottom: 4px;
}

.home-materials-featured {
  padding-top: 18px;
}

.home-materials-featured .section-heading h2::before {
  content: "★";
  margin-right: 8px;
  color: #e7a91c;
  font-size: .9em;
}

@media (max-width: 820px) {
  .home-materials-recent,
  .home-materials-featured {
    padding-top: 18px;
  }
}
