/* Pagina inicial - escolinha.org */
:root {
  --eh-brand: #712cf9;
  --eh-brand-dark: #5a1fd1;
  --eh-brand-soft: #f1eaff;
  --eh-card-bg: #ffffff;
  --eh-card-border: #e7e3f0;
  --eh-text: #1f1b2d;
  --eh-muted: #6b6680;
  --eh-shadow: 0 2px 8px rgba(40, 20, 90, .06);
  --eh-shadow-hover: 0 8px 22px rgba(40, 20, 90, .14);
}
[data-bs-theme="dark"] {
  --eh-brand-soft: #2a2140;
  --eh-card-bg: #1e1b29;
  --eh-card-border: #34304a;
  --eh-text: #f2effa;
  --eh-muted: #a8a3bd;
  --eh-shadow: none;
  --eh-shadow-hover: 0 8px 22px rgba(0, 0, 0, .4);
}
.bd-main.eh-main { display: block !important; min-width: 0; grid-template-areas: none !important; grid-template-columns: none !important; }
.eh-main > * { grid-area: auto !important; }
.eh-hero { background: linear-gradient(135deg, #7b3cff 0%, #5a1fd1 55%, #3f87ff 100%); color: #fff; border-radius: 20px; padding: 40px 28px 30px; text-align: center; margin-bottom: 32px; }
.eh-hero-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.5rem); line-height: 1.15; margin: 0 0 8px; color: #fff; }
.eh-hero-sub { font-size: 1.05rem; opacity: .92; margin: 0 0 22px; }
.eh-search { position: relative; display: flex; max-width: 680px; margin: 0 auto; background: #fff; border-radius: 999px; box-shadow: 0 10px 30px rgba(20, 0, 70, .25); padding: 6px; }
.eh-search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #8a84a3; font-size: 26px; pointer-events: none; }
.eh-search .eh-search-input { padding-left: 52px !important; border: 0 !important; box-shadow: none !important; background: transparent !important; }
.eh-search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.05rem; color: #1f1b2d; padding: 12px 12px 12px 52px; }
.eh-search-btn { border: 0; border-radius: 999px; background: var(--eh-brand); color: #fff; font-weight: 600; padding: 0 26px; transition: background .15s; }
.eh-search-btn:hover { background: var(--eh-brand-dark); }
.eh-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.eh-chip { background: rgba(255, 255, 255, .18); color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 6px 14px; font-size: .9rem; font-weight: 500; transition: background .15s, transform .15s; }
.eh-chip:hover { background: #fff; color: var(--eh-brand); transform: translateY(-1px); }
.eh-section { margin: 0 0 36px; }
.eh-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.eh-section-head h2 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.35rem; margin: 0; color: var(--eh-text); display: flex; align-items: center; gap: 6px; }
.eh-section-head h2 .material-symbols-rounded { color: #ff4d6d; font-size: 1.5rem; }
.eh-section-head h2 .eh-icon-new { color: #10b981; }
.eh-more { color: var(--eh-brand); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .95rem; }
.eh-more:hover { text-decoration: underline; }
.eh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px; }
.eh-card { display: flex; flex-direction: column; background: var(--eh-card-bg); border: 1px solid var(--eh-card-border); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--eh-text); box-shadow: var(--eh-shadow); transition: transform .18s, box-shadow .18s; }
.eh-card:hover { transform: translateY(-3px); box-shadow: var(--eh-shadow-hover); color: var(--eh-text); }
.eh-card-img { position: relative; display: block; aspect-ratio: 4 / 5; background: #fff; overflow: hidden; }
.eh-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .25s; }
.eh-card:hover .eh-card-img img { transform: scale(1.04); }
.eh-badge { position: absolute; top: 10px; left: 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 999px; padding: 3px 9px; color: #fff; }
.eh-badge-new { background: #10b981; }
.eh-card-body { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-top: 1px solid var(--eh-card-border); }
.eh-card-title { font-weight: 600; font-size: .95rem; line-height: 1.25; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eh-section-icon { width: 30px; height: 30px; flex: 0 0 auto; }
.eh-card-img { display: flex !important; align-items: center; justify-content: center; }
.eh-card-img img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; margin: auto; }
/* Home: 6 cartões por seção, sempre em linha cheia */
.eh-main .eh-grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
@media (max-width: 991px) { .eh-main .eh-grid { gap: 12px; } .eh-main .eh-card-body { padding: 8px 10px 10px; } }
/* Celular: uma linha que rola para o lado */
@media (max-width: 767px) {
  .eh-main .eh-grid { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: 42vw; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
  .eh-main .eh-grid::-webkit-scrollbar { display: none; }
  .eh-main .eh-card { scroll-snap-align: start; }
}
.eh-card-count { font-size: .8rem; color: var(--eh-muted); }
.eh-activities-box { display: flex; align-items: center; gap: 18px; background: var(--eh-brand-soft); border-radius: 18px; padding: 22px 24px; }
.eh-activities-box h2 { font-family: 'Poppins', sans-serif; font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; color: var(--eh-text); }
.eh-activities-box p { margin: 0; color: var(--eh-muted); }
.eh-activities-icon { font-size: 44px; color: var(--eh-brand); }
.eh-activities-box > div { flex: 1; }
.eh-btn { background: var(--eh-brand); color: #fff; text-decoration: none; font-weight: 600; border-radius: 999px; padding: 10px 20px; white-space: nowrap; }
.eh-btn:hover { background: var(--eh-brand-dark); color: #fff; }
.eh-ad { margin: 0 0 36px; min-height: 90px; }
.eh-about { border-top: 1px solid var(--eh-card-border); padding-top: 20px; margin-bottom: 20px; color: var(--eh-muted); font-size: .92rem; }
.eh-about h2 { font-size: 1rem; font-weight: 700; color: var(--eh-text); }
@media (max-width: 576px) {
  .eh-hero { border-radius: 0; margin-left: -12px; margin-right: -12px; padding: 28px 16px 22px; }
  .eh-search-btn { padding: 0 16px; }
  .eh-search-input { font-size: 1rem; padding-left: 46px; }
  .eh-search-icon { left: 16px; }
  .eh-chips { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; scrollbar-width: none; }
  .eh-chips::-webkit-scrollbar { display: none; }
  .eh-chip { flex: 0 0 auto; }
  .eh-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .eh-activities-box { flex-direction: column; text-align: center; }
}
