/* =============================================
   TEACHER GIGIO — BLOG EDUCACIONAL
   Paleta: Verde e variações
   ============================================= */

:root {
  --g900: #064e3b;
  --g800: #065f46;
  --g700: #047857;
  --g600: #059669;
  --g500: #10b981;
  --g400: #34d399;
  --g300: #6ee7b7;
  --g200: #a7f3d0;
  --g100: #d1fae5;
  --g50:  #ecfdf5;
  --accent: #f0fdf4;
  --dark: #022c22;
  --text: #1c2b22;
  --muted: #4b7c65;
  --white: #ffffff;
  --border: #b7e4cd;
  --shadow: 0 4px 24px rgba(6,78,59,.10);
  --shadow-lg: 0 12px 48px rgba(6,78,59,.18);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HEADER ───────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(6,78,59,.07);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--g700), var(--g500));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  color: var(--white);
  font-size: 14px;
  letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(5,150,105,.3);
}

.logo-icon.sm {
  width: 32px; height: 32px;
  font-size: 11px;
  border-radius: 8px;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; color: var(--g800); }
.logo-tagline { font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: .3px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  background: var(--g50);
  color: var(--g700);
}

.nav-admin {
  background: var(--g700);
  color: var(--white) !important;
  margin-left: 8px;
}
.nav-admin:hover { background: var(--g800) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--g700);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 16px;
  gap: 4px;
  border-top: 1px solid var(--border);
}
.mobile-menu a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--g800);
  transition: var(--transition);
}
.mobile-menu a:hover { background: var(--g50); }
.mobile-menu.open { display: flex; }

/* ── HERO ─────────────────────────────────── */
.hero {
  position: relative;
  min-height: 580px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-circle {
  position: absolute;
  border-radius: 50%;
  opacity: .07;
  background: var(--g600);
}
.c1 { width: 400px; height: 400px; top: -120px; right: -80px; }
.c2 { width: 240px; height: 240px; bottom: 40px; left: -60px; background: var(--g400); opacity: .09; }
.c3 { width: 140px; height: 140px; top: 60px; left: 30%; }

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeUp .7s ease both;
}

.hero-label {
  display: inline-block;
  background: var(--g100);
  color: var(--g700);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--g900);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: italic;
  color: var(--g600);
}

.hero-desc {
  font-size: 16px;
  color: var(--muted);
  max-width: 420px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--g700), var(--g500));
  color: var(--white);
  padding: 14px 28px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 6px 24px rgba(5,150,105,.35);
  transition: var(--transition);
}
.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(5,150,105,.45);
}

.hero-featured {
  position: relative;
  z-index: 1;
  animation: fadeUp .7s .2s ease both;
}

/* ── CATEGORIAS ───────────────────────────── */
.categorias-section {
  background: var(--g50);
  padding: 80px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  color: var(--g600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--g900);
}
.section-title.white { color: var(--white); }

.categorias-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.cat-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--cat-color, var(--g500));
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--g400);
}

.cat-emoji { font-size: 36px; margin-bottom: 14px; }
.cat-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--g800);
  margin-bottom: 6px;
}
.cat-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ── POSTS ────────────────────────────────── */
.posts-section { padding: 80px 0; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--g700);
  border-color: var(--g700);
  color: var(--white);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.post-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  animation: fadeUp .5s ease both;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--g400);
}

.post-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--g100);
}

.post-thumb-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
}

.post-body { padding: 22px; }

.post-cat-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: var(--g100);
  color: var(--g700);
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--g900);
  line-height: 1.3;
  margin-bottom: 10px;
}

.post-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--g100);
  padding-top: 12px;
}

.read-more {
  color: var(--g600);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.read-more:hover { color: var(--g800); gap: 8px; }

/* ── MODAL ────────────────────────────────── */
.post-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
  overflow-y: auto;
}
.post-modal.open { display: flex; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,44,34,.65);
  backdrop-filter: blur(4px);
}

.modal-inner {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 760px;
  z-index: 1;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn .35s cubic-bezier(.4,0,.2,1) both;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--g800);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 2;
  transition: var(--transition);
}
.modal-close:hover { background: var(--g100); }

.modal-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}
.modal-img-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
}

.modal-text { padding: 36px 40px 40px; }
.modal-cat { margin-bottom: 14px; }
.modal-cat .post-cat-tag { font-size: 12px; }
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  color: var(--g900);
  line-height: 1.2;
  margin-bottom: 8px;
}
.modal-date {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}
.modal-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}
.modal-body p { margin-bottom: 16px; }
.modal-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--g800);
  margin: 24px 0 10px;
}

/* ── CONTATO ──────────────────────────────── */
.contato-section { padding: 80px 0; background: var(--g50); }

.contato-card {
  background: linear-gradient(135deg, var(--g900) 0%, var(--g700) 100%);
  border-radius: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.contato-info { padding: 56px 48px; }
.contato-info .section-label { color: var(--g300); }
.contato-desc {
  color: var(--g200);
  font-size: 15px;
  margin: 12px 0 36px;
  line-height: 1.7;
}

.contato-links { display: flex; flex-direction: column; gap: 16px; }

.contato-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255,255,255,.07);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.12);
  transition: var(--transition);
}
.contato-item:hover { background: rgba(255,255,255,.13); transform: translateX(4px); }
.contato-icon { font-size: 22px; flex-shrink: 0; }
.contato-label { display: block; font-size: 11px; color: var(--g300); font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.contato-val { display: block; color: var(--white); font-weight: 500; font-size: 14px; margin-top: 2px; }

.contato-visual {
  position: relative;
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contato-ornament {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.06);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}
.contato-ornament::before {
  content: '';
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.06);
}

.contato-quote {
  position: relative;
  text-align: center;
}
.contato-quote p {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--white);
  line-height: 1.5;
  margin-bottom: 16px;
}
.contato-quote span {
  color: var(--g300);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
}

/* ── FOOTER ───────────────────────────────── */
.site-footer {
  background: var(--dark);
  padding: 32px 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 16px;
}
.footer-text { color: rgba(255,255,255,.45); font-size: 13px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: rgba(255,255,255,.55);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--g400); }

/* ── HERO FEATURED CARD ───────────────────── */
.hero-post-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.hero-post-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  background: var(--g50);
}
.hero-post-body { padding: 24px; }
.hero-post-body .post-cat-tag { margin-bottom: 10px; }
.hero-post-body .post-title { font-size: 20px; }
.hero-post-body .post-excerpt { font-size: 13px; }

/* ── ANIMATIONS ───────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(32px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── ADMIN ────────────────────────────────── */
.admin-page { min-height: 100vh; background: var(--g50); }
.admin-header {
  background: linear-gradient(135deg, var(--g900), var(--g700));
  padding: 24px;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 16px;
}
.admin-header h1 { font-family: 'Playfair Display', serif; font-size: 24px; }
.admin-header a { color: rgba(255,255,255,.7); font-size: 13px; text-decoration: underline; }

.admin-container { max-width: 900px; margin: 40px auto; padding: 0 24px; }

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}
.admin-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--g800);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--g100);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1/-1; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--g800);
  letter-spacing: .3px;
}

.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--g500);
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
.form-textarea { resize: vertical; min-height: 120px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--g700), var(--g500));
  color: var(--white);
  padding: 12px 24px;
  border-radius: 99px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(5,150,105,.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(5,150,105,.4);
}

.btn-danger {
  background: none;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: var(--transition);
}
.btn-danger:hover { background: #fef2f2; }

.posts-admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-post-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--g50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.admin-post-emoji { font-size: 24px; flex-shrink: 0; }
.admin-post-info { flex: 1; }
.admin-post-title { font-weight: 600; font-size: 14px; color: var(--g800); }
.admin-post-cat { font-size: 12px; color: var(--muted); margin-top: 2px; }
.admin-post-actions { display: flex; gap: 8px; }

.success-msg {
  background: var(--g100);
  color: var(--g700);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
  border: 1px solid var(--g300);
}
.success-msg.show { display: block; }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 1024px) {
  .categorias-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 24px 40px;
    text-align: center;
    min-height: auto;
  }
  .hero-desc { margin: 0 auto 32px; }
  .hero-featured { display: none; }
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .contato-card { grid-template-columns: 1fr; }
  .contato-visual { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .footer-inner { flex-direction: column; text-align: center; }
  .modal-text { padding: 24px; }
}

@media (max-width: 480px) {
  .categorias-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { gap: 6px; }
  .filter-btn { padding: 7px 13px; font-size: 12px; }
}
