/* Paleta: azul royal (#1e3a8a), laranja claro (#f59e0b), cinza neutro (#f3f4f6 / #111827) */
:root {
  --primary: #1e3a8a;
  --primary-600: #2642a5;
  --accent: #f59e0b;
  --bg: #ffffff;
  --bg-alt: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;

  /* Cores por área */
  --area-lp: #2563eb; /* Língua Portuguesa */
  --area-mat: #16a34a; /* Matemática */
  --area-cie: #0ea5e9; /* Ciências */
  --area-hum: #f97316; /* Humanas */
  --area-lin: #9333ea; /* Línguas */
  --area-art: #e11d48; /* Artes */
  --area-edf: #059669; /* Ed. Física */
  --area-tec: #0891b2; /* Tecnologias/Computação */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
}

.container { width: min(1120px, 92%); margin: 0 auto; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 8px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; color: white; font-weight: 800; }
.brand-name { font-weight: 800; color: var(--primary); letter-spacing: 0.3px; }
.nav a { color: var(--text); text-decoration: none; margin-left: 16px; font-weight: 600; }
.nav a.cta { background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 10px; }
.nav a.cta:hover { background: var(--primary-600); }

/* Hero */
.hero { padding: 64px 0 32px; background: linear-gradient(180deg, #eef2ff, #ffffff 60%); }
.hero h1 { font-size: clamp(28px, 4vw, 48px); margin: 0 0 12px; color: var(--primary); }
.hero p { font-size: clamp(16px, 2vw, 20px); color: var(--muted); margin: 0 0 18px; }
.btn-primary { background: var(--accent); color: #111; padding: 12px 16px; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
.btn-primary:hover { filter: brightness(0.95); }

/* Sections */
.section { padding: 32px 0; }
.section h2 { margin-top: 0; color: var(--primary); font-size: 28px; }
#destaques h2 { text-align: center; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px){ .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px){ .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Carousel */
.carousel { 
  position: relative; 
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 60px;
  overflow: hidden;
}
.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(.5,.1,.3,1);
  will-change: transform;
}
.book-slide { 
  flex: 0 0 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px #0001;
  padding: 16px;
  text-align: center;
  transition: box-shadow 0.2s;
}
@media (min-width: 640px) {
  .book-slide {
    flex: 0 0 calc(50% - 24px);
    max-width: calc(50% - 24px);
  }
}
@media (min-width: 1024px) {
  .book-slide {
    flex: 0 0 calc(33.333% - 24px);
    max-width: calc(33.333% - 24px);
  }
}
.carousel-btn { 
  background: #fff; 
  border: 1px solid var(--border); 
  color: var(--primary); 
  width: 40px; 
  height: 40px;
  border-radius: 50%; 
  display: flex; 
  align-items: center;
  justify-content: center;
  cursor: pointer; 
  font-size: 18px; 
  font-weight: 700;
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
  z-index: 10; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.carousel-dots .dot {
  width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--border);
  background: #e5e7eb; cursor: pointer; padding: 0;
}
.carousel-dots .dot.active { background: var(--primary); border-color: var(--primary); }

/* Responsivo */
@media (max-width: 1024px) {
  .book-slide { 
    flex: 0 0 calc(50% - 12px);
  }
  .carousel {
    padding: 0 40px;
  }
}

@media (max-width: 640px) {
  .book-slide { 
    flex: 0 0 100%;
  }
  .carousel {
    padding: 0 30px;
  }
}

/* Dots */
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.carousel-dots .dot {
  width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--border);
  background: #e5e7eb; cursor: pointer; padding: 0;
}
.carousel-dots .dot.active { background: var(--primary); border-color: var(--primary); }

/* Sobre (About) */
.about .about-grid {
  display: grid;
  grid-template-columns: 1fr; /* Empilhar: linha 1 (texto), linha 2 (pilares) */
  gap: 16px;
  align-items: start;
}
.about .about-text { text-align: center; }
.about .about-text p { margin-bottom: 0; }
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colunas no desktop */
  gap: 12px;
  align-items: stretch; /* equal heights */
}
.pillars-grid .pillar {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
  height: 100%; /* equalize heights within grid */
}
.pillars-grid .pillar > .icon { flex: 0 0 36px; }
.pillars-grid .pillar > div:last-child { display: flex; flex-direction: column; gap: 4px; }
.pillars-grid .pillar h3 { margin: 0; }
.pillars-grid .pillar p { margin: 0; color: var(--muted); }
@media (max-width: 900px){
  .about .about-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); } /* 2 colunas no médio */
}
@media (max-width: 680px){
  .pillars-grid { grid-template-columns: 1fr; } /* 1 coluna no mobile */
}

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.card h3 { margin-top: 0; }
.muted { color: var(--muted); }

/* Ícones de pilares */
.pillar {
  display: flex; align-items: flex-start; gap: 12px;
}
.pillar .icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.icon-ia { background: var(--area-tec); }
.icon-bncc { background: var(--primary); }
.icon-comp { background: #0f766e; }
.icon-prof { background: #b45309; }

/* Book cards */
.book-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.book-card h3 { margin: 0; font-size: 18px; }
.book-card p { margin: 0; color: var(--muted); }
.book-card a { align-self: flex-start; margin-top: 6px; background: var(--primary); color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.book-card a:hover { background: var(--primary-600); }
/* Capa do livro */
.book-cover { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: #fafafa; }

/* Holographic hover (holover) */
:root { --holo-opacity: .55; --holo-blur: 16px; --holo-speed: 3.2s; }
.book-card { position: relative; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; overflow: hidden; }
.book-card > * { position: relative; z-index: 1; }
.book-card::before { content: ""; position: absolute; inset: -2px; border-radius: 16px; z-index: 0;
  background: conic-gradient(from 0deg, #7c3aed, #06b6d4, #22c55e, #f59e0b, #ef4444, #7c3aed);
  filter: blur(var(--holo-blur)) saturate(120%);
  opacity: 0; transition: opacity .35s ease, transform .35s ease; transform: rotate(0deg) scale(1.02);
}
.book-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(2,6,23,.15), 0 2px 6px rgba(2,6,23,.08); border-color: color-mix(in oklab, var(--accent) 35%, #e5e7eb); }
.book-card:hover::before { opacity: var(--holo-opacity); animation: holoSpin var(--holo-speed) linear infinite; }

@keyframes holoSpin {
  0% { transform: rotate(0deg) scale(1.02); }
  100% { transform: rotate(360deg) scale(1.02); }
}

/* Chips por área */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #111; background: #eef2ff; }
.chip[data-area="Língua Portuguesa"] { background: color-mix(in oklab, var(--area-lp) 18%, white); }
.chip[data-area="Matemática"] { background: color-mix(in oklab, var(--area-mat) 18%, white); }
.chip[data-area="Ciências"] { background: color-mix(in oklab, var(--area-cie) 18%, white); }
.chip[data-area="Ciências Humanas"],
.chip[data-area="Humanas"] { background: color-mix(in oklab, var(--area-hum) 18%, white); }
.chip[data-area="Línguas"] { background: color-mix(in oklab, var(--area-lin) 18%, white); }
.chip[data-area="Artes"] { background: color-mix(in oklab, var(--area-art) 18%, white); }
.chip[data-area="Educação Física"] { background: color-mix(in oklab, var(--area-edf) 18%, white); }
.chip[data-area*="Tecnologia"],
.chip[data-area*="Computação"] { background: color-mix(in oklab, var(--area-tec) 18%, white); }

/* Filtros */
.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.select, .input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }

/* Footer */
.footer { margin-top: 40px; padding: 24px 0; background: var(--bg-alt); border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }

/* Contact section */
.contact-card { display: block; }
.contact-form { display: grid; gap: 12px; }
#contato h2 { text-align: center; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; color: var(--text); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  padding: 12px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
  font: inherit; color: var(--text);
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: color-mix(in oklab, var(--primary) 45%, #c7d2fe); box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 14%, transparent); }
.contact-form .consent { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--muted); }
.contact-form .honeypot { display: none !important; }

/* Intro do contato em duas colunas */
.contact-intro-card .contact-intro-grid {
  display: grid;
  grid-template-columns: 1fr; /* agora apenas uma coluna */
  gap: 8px;
  align-items: start;
}
.contact-intro-card h2 { text-align: left; margin-top: 0; }
.contact-intro-card .intro-text p { margin: 8px 0 0; }
.contact-intro-card .intro-list { margin: 8px 0 0 18px; }
@media (max-width: 900px){
  .contact-intro-card .contact-intro-grid { grid-template-columns: 1fr; }
}

/* Formulário na segunda linha, alinhado à direita */
.contact-form-wrap {
  width: 100%;
  max-width: none;
  margin: 12px 0 0 0; /* ocupa a largura total abaixo */
}
@media (max-width: 900px){
  .contact-form-wrap { width: 100%; }
}

@media (max-width: 680px){
  .contact-form .form-row { grid-template-columns: 1fr; }
}
