/* Escola de Conteúdo — hand-written stylesheet (light theme, no animations) */

:root {
  --background: #ffffff;
  --foreground: #1c1c1c;
  --card: #ffffff;
  --muted: #f5f5f5;
  --muted-2: #eeeeee;
  --muted-foreground: #5f5f5f;
  --primary: #232323;
  --primary-foreground: #fafafa;
  --danger: #d33f2c;
  --border: #e6e6e6;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }

p { margin: 0 0 1em; }

.muted { color: var(--muted-foreground); }
.small { font-size: 0.8rem; }
.hidden { display: none !important; }
.center { text-align: center; }
.mt-8 { margin-top: 2rem; }
.mono { font-family: ui-monospace, "Geist Mono", Menlo, monospace; }
.col-span-full { grid-column: 1 / -1; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-narrow { max-width: 900px; }
.container-prose { max-width: 860px; }

.main { flex-grow: 1; padding-top: 64px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn svg { width: 1rem; height: 1rem; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-outline {
  border-color: var(--border);
  background: var(--card);
}

.btn-ghost { background: none; }
.btn-ghost:hover { background: var(--muted); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-text { color: var(--danger); }

.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-pill { border-radius: 999px; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.4rem; }

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; }

.nav-link {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-link:hover, .nav-link.active { color: var(--foreground); }

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.nav-toggle { display: none; }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu:not(.hidden) { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 5rem 0 8rem;
  background: linear-gradient(to bottom, var(--background), rgba(245, 245, 245, 0.3));
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-media { position: relative; }

.hero-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}

.hero-img { width: 100%; height: 100%; object-fit: cover; }

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

.play-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
}

.play-badge svg { width: 32px; height: 32px; }

.deco { position: absolute; }
.deco-1 { top: -2rem; right: -2rem; width: 40px; }
.deco-2 { bottom: -2rem; left: -2rem; width: 60px; }

@media (min-width: 768px) {
  .hero { padding: 8rem 0 12rem; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 4.5rem; }
}

/* ---------- Sections ---------- */

.section { padding: 6rem 0; }
.section-muted { background: rgba(245, 245, 245, 0.5); }
.section-primary { background: var(--primary); color: var(--primary-foreground); }

.section-title { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.02em; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .section-link { display: none; }
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-hover:hover { box-shadow: var(--shadow); }

.card-media { aspect-ratio: 1420 / 947; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-head { padding: 1rem 1rem 0; }
.card-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
.card-body { padding: 0.5rem 1rem; flex-grow: 1; }
.card-foot { padding: 0.5rem 1rem 1.5rem; }

.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- About / features ---------- */

.about-head { text-align: center; max-width: 48rem; margin: 0 auto 4rem; }
.about-text { color: var(--muted-foreground); font-size: 1.1rem; }
.about-text h2 { color: var(--foreground); }

.feature-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(245, 245, 245, 0.4);
  border: 1px solid transparent;
}

.feature:hover { background: var(--muted); border-color: var(--border); }

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(35, 35, 35, 0.08);
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-icon svg { width: 28px; height: 28px; }
.feature-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-desc { font-size: 0.875rem; margin: 0; }

/* ---------- Masterclass ---------- */

.masterclass-text { max-width: 56rem; margin: 0 auto; text-align: center; }
.masterclass-media {
  max-width: 56rem;
  margin: 3rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}
.masterclass-media img { width: 100%; height: 100%; object-fit: cover; }
.masterclass-bio { text-align: left; }

.preline { white-space: pre-line; }

/* ---------- Contact ---------- */

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  background: var(--card);
  color: var(--foreground);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 56rem;
  margin: 0 auto;
}

.contact-info { flex: 1; width: 100%; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
}

.contact-item:hover { background: rgba(245, 245, 245, 0.5); }

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(35, 35, 35, 0.08);
  color: var(--primary);
  flex-shrink: 0;
}

.contact-icon svg { width: 20px; height: 20px; }
.contact-side { display: none; }

@media (min-width: 768px) {
  .contact-card { flex-direction: row; padding: 3rem; }
  .contact-side {
    display: block;
    padding: 2rem;
    background: rgba(245, 245, 245, 0.3);
    border-radius: var(--radius-lg);
  }
}

/* ---------- Footer ---------- */

.footer { background: rgba(245, 245, 245, 0.5); border-top: 1px solid var(--border); padding: 3rem 0; }

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-brand p { margin: 0.5rem 0 0; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-credit { font-weight: 700; }

@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---------- Inner pages ---------- */

.page-section { background: rgba(245, 245, 245, 0.3); min-height: 60vh; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.back-link svg { width: 1rem; height: 1rem; }
.back-link:hover { color: var(--foreground); }

.page-head { margin-bottom: 3rem; }
.page-title { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; }

.page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.count-badge {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  white-space: nowrap;
}

.empty-state {
  padding: 5rem 1rem;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

.prose h2 { font-size: 1.5rem; font-weight: 600; margin: 2rem 0 1rem; }
.prose p { color: var(--muted-foreground); }
.prose a { color: var(--primary); text-decoration: underline; }

/* ---------- Login ---------- */

.login-page { display: grid; min-height: calc(100vh - 64px); grid-template-columns: 1fr; }

.login-visual { position: relative; display: none; overflow: hidden; color: #fff; }

.login-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-visual-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.login-visual-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 2.5rem;
}

.login-brand { font-size: 1.125rem; font-weight: 500; }
.login-quote { margin: 0; font-size: 1.25rem; font-weight: 500; max-width: 28rem; }
.login-quote footer { font-size: 0.875rem; opacity: 0.8; margin-top: 0.5rem; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-form-wrap { width: 100%; max-width: 350px; display: flex; flex-direction: column; gap: 0.5rem; }
.login-title { font-size: 1.5rem; font-weight: 600; margin: 0; }
.login-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }

@media (min-width: 1024px) {
  .login-page { grid-template-columns: 1fr 1fr; }
  .login-visual { display: block; }
}

/* ---------- Forms ---------- */

.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="file"],
.field textarea,
.field select {
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  width: 100%;
}

.field textarea { resize: vertical; }

.field-hint { display: flex; justify-content: space-between; gap: 1rem; }

.form-error { color: var(--danger); font-size: 0.875rem; margin: 0; }
.form-msg { font-size: 0.9rem; }
.form-msg.ok { color: #1a7f37; }
.form-msg.err { color: var(--danger); }

/* ---------- Admin ---------- */

.admin-body { background: var(--background); }

.admin-shell { display: flex; flex-direction: column; min-height: 100vh; }

.sidebar {
  width: 100%;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: rgba(245, 245, 245, 0.3);
}

.sidebar-head { padding: 1.5rem; border-bottom: 1px solid var(--border); }
.sidebar-head h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }

.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; }
.sidebar-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.sidebar-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-link:hover { background: var(--muted); color: var(--foreground); }
.sidebar-link.active { background: var(--muted); color: var(--foreground); }

.admin-main { flex: 1; min-width: 0; }
.admin-content { padding: 2rem; max-width: 1600px; margin: 0 auto; }

.admin-page-head { margin-bottom: 2rem; }
.admin-page-head h1 { font-size: 1.875rem; font-weight: 700; }

.admin-actions { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; }

.admin-card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) { .admin-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .admin-card-grid { grid-template-columns: repeat(4, 1fr); } }

#courses-grid, #features-grid { grid-template-columns: 1fr; }
@media (min-width: 768px) { #courses-grid, #features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { #courses-grid, #features-grid { grid-template-columns: repeat(3, 1fr); } }

.admin-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  height: 100%;
}

.admin-card:hover { border-color: rgba(35, 35, 35, 0.4); }
.admin-card h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.admin-card p { margin: 0; font-size: 0.9rem; }
.admin-card header { margin-bottom: 0.25rem; }

.admin-card-icon {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: var(--radius);
  background: rgba(35, 35, 35, 0.08);
  color: var(--primary);
}

.admin-card-icon svg { width: 24px; height: 24px; }
.admin-card-count { font-size: 1.5rem; font-weight: 700; }
.admin-card-count span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  font-weight: 600;
}

.admin-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.admin-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}

.admin-card .reorder { display: flex; flex-direction: column; gap: 0.1rem; }
.admin-card .reorder .btn { padding: 0.15rem; }
.admin-card .reorder svg { width: 0.9rem; height: 0.9rem; }

.icon-chip {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 0.4rem;
  color: var(--primary);
}

.icon-chip svg { width: 1rem; height: 1rem; }

.admin-thumb {
  height: 8rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--muted);
}

.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-thumb-wide { aspect-ratio: 16 / 9; height: auto; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.panel-title { font-size: 1.1rem; font-weight: 600; text-transform: capitalize; }
.panel-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.5rem; }

.admin-two-col { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .admin-two-col { grid-template-columns: 1fr 1fr; } }
.field-grow { height: 100%; display: flex; flex-direction: column; }
.field-grow textarea { flex: 1; }

@media (min-width: 768px) {
  .admin-shell { flex-direction: row; }
  .sidebar { width: 16rem; min-height: 100vh; }
  .admin-content { padding: 2.5rem; }
}

/* ---------- Dialog ---------- */

.dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow);
}

.dialog::backdrop { background: rgba(0, 0, 0, 0.4); }

.dialog-form { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.dialog-form h3 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1rem; }
