/* ================================================================
   PEDAGOGIA TEC — PÁGINAS DO SITE (home, perfil, admin, suporte)
   Depende de css/style.css (tokens e componentes base).
   ================================================================ */

/* ========== CABEÇALHO DO SITE ========== */
.home-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 max(1.5rem, calc((100vw - 1200px) / 2));
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  width: 26px;
  height: 26px;
}

.site-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.site-breadcrumb .crumb-sep {
  color: var(--border-hover);
}

.site-breadcrumb .crumb-current {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-nav ul {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  align-items: center;
}

.top-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.86rem;
  transition: color 0.15s ease;
}

.top-nav a:hover {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ========== CONTAINER DAS PÁGINAS ========== */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== AVISO GLOBAL ========== */
.announcement-banner {
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text);
}

.announcement-banner.tipo-novidade { border-left-color: var(--success); }
.announcement-banner.tipo-alerta { border-left-color: var(--warning); }

.announcement-banner .announcement-text {
  flex: 1;
  min-width: 0;
}

.announcement-banner a {
  color: var(--accent);
  font-weight: 600;
  margin-left: 0.4rem;
}

.announcement-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius);
}

.announcement-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

/* ========== HERO DA HOME ========== */
.hero-home {
  padding: 3.5rem 0 1.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 2.5rem;
}

.hero-texto {
  max-width: 640px;
}

/* Leque de folhas reais geradas pelas ferramentas */
.hero-folhas {
  position: relative;
  height: 400px;
}

.hero-folha {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 230px;
  aspect-ratio: 480 / 679;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s;
}

.hero-folha img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-folha.f1 { transform: translate(-112%, -47%) rotate(-9deg); }
.hero-folha.f2 { transform: translate(-12%, -53%) rotate(8deg); }
.hero-folha.f3 { transform: translate(-60%, -48%) rotate(-1deg); z-index: 2; }

.hero-folhas:hover .hero-folha.f1 { transform: translate(-128%, -46%) rotate(-12deg); }
.hero-folhas:hover .hero-folha.f2 { transform: translate(2%, -54%) rotate(11deg); }
.hero-folha:hover,
.hero-folha:focus-visible {
  z-index: 3;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--accent);
}

.hero-folha-selo {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(10, 10, 10, 0.82);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Galeria de folhas reais */
.galeria-home {
  margin: 0 0 2.25rem;
}

.galeria-topo {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.galeria-topo h2 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.galeria-topo span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.galeria-trilho {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 168px;
  gap: 0.9rem;
  overflow-x: auto;
  padding: 0.25rem 0.1rem 0.9rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.galeria-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--text);
  text-decoration: none;
  scroll-snap-align: start;
}

.galeria-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 360 / 509;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--border), 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0.45rem;
}

.galeria-item:hover img,
.galeria-item:focus-visible img {
  transform: translateY(-4px);
  box-shadow: 0 0 0 2px var(--accent), 0 14px 28px rgba(0, 0, 0, 0.45);
}

.galeria-nome {
  font-weight: 700;
  font-size: 0.86rem;
}

.galeria-desc {
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

@media (min-width: 1100px) {
  .galeria-trilho {
    grid-auto-flow: row;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .galeria-trilho {
    grid-auto-columns: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .galeria-item img {
    transition: none;
  }
}

/* Como funciona: 3 passos */
.passos-home {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 2.25rem;
  padding: 0;
}

.passos-home li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.passos-home strong {
  color: var(--text);
}

.passo-n {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.9rem;
}

@media (max-width: 1000px) {
  .hero-home {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
  }

  .hero-folhas {
    height: 320px;
  }

  .hero-folha {
    width: 170px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-folha {
    transition: none;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.hero-home h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.hero-home h1 .hl {
  color: var(--accent);
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 1.75rem;
}

.hero-search-wrap {
  position: relative;
  max-width: 560px;
}

.hero-search-wrap .search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.hero-search-wrap input {
  height: 48px;
  padding: 0 4rem 0 2.75rem;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.search-kbd {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  pointer-events: none;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  list-style: none;
}

.hero-points li::before {
  content: '✓';
  color: var(--success);
  margin-right: 0.4rem;
  font-weight: 700;
}

/* ========== ATALHOS (recentes / favoritas) ========== */
.quick-row {
  margin: 0 0 2rem;
}

.quick-row-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.quick-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.quick-chip:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

/* ========== FILTROS POR CATEGORIA ========== */
.filter-pills {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
  margin-bottom: 0.5rem;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  background: var(--bg);
  padding-top: 0.75rem;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.category-pill:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.category-pill.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.category-pill .pill-count {
  opacity: 0.6;
  margin-left: 0.2rem;
}

#searchFeedback {
  display: none;
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

#searchFeedback strong {
  color: var(--text);
}

/* ========== SEÇÕES E CARDS DE FERRAMENTAS ========== */
.section-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin: 2.5rem 0 1rem;
}

.section-heading h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-heading .s-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.tools-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.tool-card-new {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.tool-card-new:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.tool-card-new:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.tc-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 1.3rem;
  line-height: 1;
}

.tc-body {
  flex: 1;
  min-width: 0;
  padding-right: 1.5rem;
}

.tc-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.93rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.3;
}

.tc-desc {
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tc-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.tc-tag.novo { background: var(--tag-new-bg); color: var(--tag-new); }
.tc-tag.essencial,
.tc-tag.mais-usado,
.tc-tag.destaque { background: var(--tag-essential-bg); color: var(--tag-essential); }
.tc-tag.economize { background: var(--success-soft); color: #86efac; }

.tc-fav-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-subtle);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.tc-fav-btn:hover {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

.tc-fav-btn.favorited {
  color: #fbbf24;
}

.empty-block {
  margin-top: 1.5rem;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.empty-block strong {
  color: var(--text);
}

.empty-block small {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

/* ========== COMPARTILHAR ========== */
.share-banner {
  margin: 3.5rem 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.share-banner h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.share-banner p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.btn-whatsapp-share {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  background: #16a34a;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-whatsapp-share:hover {
  background: #15803d;
}

/* ========== FAQ E SOBRE ========== */
.home-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.faq-item p {
  padding: 0 1rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-item summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  color: var(--text-muted);
}

.faq-item[open] summary::after {
  content: '−';
}

.seo-accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.seo-accordion summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.seo-accordion summary::-webkit-details-marker {
  display: none;
}

.seo-accordion-content {
  padding: 0 1.25rem 1.5rem;
}

.seo-accordion-content h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0 0.6rem;
}

.seo-accordion-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.seo-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.seo-columns > div {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.seo-columns h4 {
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.seo-columns ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.seo-columns a {
  color: var(--text-muted);
  font-size: 0.84rem;
  text-decoration: none;
}

.seo-columns a:hover {
  color: var(--text);
}

/* ========== RODAPÉ DO SITE ========== */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-grid h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

.footer-grid ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-grid a {
  color: var(--text-muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--text);
}

.footer-grid p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand img {
  width: 26px;
  height: 26px;
}

/* ========== VOLTAR AO TOPO ========== */
#backToTopBtn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 800;
}

#backToTopBtn.visible {
  opacity: 1;
  pointer-events: auto;
}

#backToTopBtn:hover {
  border-color: var(--border-hover);
}

/* ========== CABEÇALHO DE PÁGINA INTERNA (perfil, admin, suporte) ========== */
.page-intro {
  padding: 2.75rem 0 1.75rem;
}

.page-intro h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}

.page-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 620px;
}

/* ========== RESPONSIVO ========== */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .home-header {
    padding: 0 1rem;
  }

  .top-nav {
    display: none;
  }

  .site-main {
    padding: 0 1rem;
  }

  .hero-home {
    padding: 2.25rem 0 1.25rem;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero-folhas {
    height: 210px;

  }

  .hero-folha {
    width: 118px;
    border-radius: 7px;
  }

  .hero-folha-selo {
    display: none;
  }

  .passos-home {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
  }

  .passos-home li {
    padding: 0.6rem 0.85rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .tools-grid-new {
    grid-template-columns: 1fr;
  }

  .share-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  #backToTopBtn {
    left: 1rem;
    bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .search-kbd {
    display: none;
  }

  .hero-search-wrap input {
    padding-right: 1rem;
  }

  .site-breadcrumb .crumb-sep,
  .site-breadcrumb .crumb-current {
    display: none;
  }
}

/* Ícones dos cards: cor por categoria */
.tc-icon .ico {
  width: 20px;
  height: 20px;
}

.tool-card-new[data-cat="matematica"] .tc-icon { color: #60a5fa; }
.tool-card-new[data-cat="alfabetizacao"] .tc-icon { color: #fbbf24; }
.tool-card-new[data-cat="avaliacao"] .tc-icon { color: #34d399; }
.tool-card-new[data-cat="pdf"] .tc-icon { color: #f87171; }
.tool-card-new[data-cat="tv"] .tc-icon { color: #a78bfa; }
.tool-card-new[data-cat="imagem"] .tc-icon { color: #22d3ee; }

.quick-chip .ico,
.seo-columns h4 .ico,
.category-pill .ico {
  color: var(--text-muted);
}
