/* ─── GREPPE-SUL — Design Institucional ─── */
/* Paleta baseada no logo UNILA (tons de beringela sobre fundo claro) */
/* e no espírito acadêmico do site nacional: greppe.fe.unicamp.br */

/* ── Tokens ── */
:root {
  /* Backgrounds — claro, acadêmico */
  --bg-body: #faf9f7;
  --bg-white: #ffffff;
  --bg-cream: #f5f2ee;
  --bg-warm: #fdf0ed;
  --bg-hover: #f9e8e4;

  /* Cores institucionais — extraídas do logo UNILA */
  --red-dark: #6B2D5B;
  /* beringela — cor do logo UNILA */
  --red-primary: #7B3A6B;
  /* beringela médio */
  --red-mid: #8B4878;
  /* beringela vivo */
  --red-light: #A85C94;
  /* beringela claro para hovers */
  --red-pale: rgba(107, 45, 91, 0.08);
  /* fundo sutil beringela */
  --red-glow: rgba(107, 45, 91, 0.12);

  /* Texto */
  --ink: #1a1a1a;
  --ink-secondary: #4a4a4a;
  --ink-muted: #7a7a7a;
  --ink-dim: #aaaaaa;

  /* Bordas */
  --border: #e8e2dc;
  --border-light: #f0ebe5;

  /* Feedback */
  --green: #2d8f50;
  --green-bg: #eef8f1;
  --amber: #b8860b;
  --amber-bg: #fef8ec;

  /* Elevação */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);

  /* Raios */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Tipografia */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  /* Transições */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.25s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-body);
  overflow-x: hidden;
}

a {
  color: var(--red-primary);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--red-light);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--red-primary);
  color: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Container ── */
.container {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
}

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--red-primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus {
  top: 16px;
}

/* ══════════════════════════════════════════ */
/* ── HEADER ── */
/* ══════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

.header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  width: 76px;
  height: 55px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  color: var(--red-primary);
  flex-shrink: 0;
}

.brand strong {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--red-dark);
}

.brand small {
  display: block;
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  padding: 8px 13px;
  color: var(--ink-secondary);
  text-decoration: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--red-pale);
  color: var(--red-primary);
}

.main-nav .nav-admin {
  margin-left: 8px;
  background: var(--red-primary);
  color: #fff;
  font-weight: 700;
  padding: 8px 18px;
}

.main-nav .nav-admin:hover {
  background: var(--red-mid);
  color: #fff;
}

/* Logos institucionais no header (direita) */
.header-logos-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-ufrgs,
.header-unila {
  flex-shrink: 0;
}

.logo-ufrgs {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: opacity var(--dur) var(--ease);
}

.header-ufrgs:hover .logo-ufrgs {
  opacity: 0.8;
}

.logo-unila {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: opacity var(--dur) var(--ease);
}

.header-unila:hover .logo-unila {
  opacity: 0.8;
}

/* Hamburger */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}

.menu-toggle:hover {
  background: var(--bg-cream);
}

.hamburger {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease);
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

/* ══════════════════════════════════════════ */
/* ── MAIN ── */
/* ══════════════════════════════════════════ */

main {
  min-height: 70vh;
}

/* Sutil fade-in ao navegar */
main>* {
  animation: fadeUp 0.4s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ══════════════════════════════════════════ */
/* ── TIPOGRAFIA ── */
/* ══════════════════════════════════════════ */

h1,
h2,
h3,
h4 {
  line-height: 1.18;
  font-weight: 700;
  color: var(--ink);
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--red-dark);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red-primary);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--red-primary);
  border-radius: 2px;
}

.lead {
  color: var(--ink-secondary);
  font-size: 1.12rem;
  max-width: 62ch;
  line-height: 1.7;
}

/* ══════════════════════════════════════════ */
/* ── HERO ── */
/* ══════════════════════════════════════════ */

.hero {
  position: relative;
  padding: 72px 0 56px;
  overflow: hidden;
  background: linear-gradient(170deg, #fff 0%, var(--bg-cream) 40%, var(--bg-warm) 100%);
}

/* Padrão decorativo sutil inspirado no traço da pena do logo */
.hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -40px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--red-pale) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero>.container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 36px;
  align-items: center;
}

.hero-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.hero-card h2 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--red-dark);
}

.hero-card h2::before {
  content: '✦';
  color: var(--red-primary);
  font-size: 0.9rem;
}

.hero-card ul {
  list-style: none;
  padding: 0;
}

.hero-card li {
  padding: 9px 0;
  padding-left: 18px;
  position: relative;
  color: var(--ink-secondary);
  font-size: 0.95rem;
}

.hero-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-primary);
  transform: translateY(-50%);
}

.hero-card li+li {
  border-top: 1px solid var(--border-light);
}

/* ══════════════════════════════════════════ */
/* ── BOTÕES ── */
/* ══════════════════════════════════════════ */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--red-primary);
  background: var(--red-primary);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all var(--dur) var(--ease);
  position: relative;
}

.button:hover {
  background: var(--red-mid);
  border-color: var(--red-mid);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 45, 91, 0.2);
  color: #fff;
}

.button.secondary {
  background: transparent;
  color: var(--red-primary);
}

.button.secondary:hover {
  background: var(--red-pale);
  transform: translateY(-1px);
  box-shadow: none;
  color: var(--red-primary);
}

.button.muted {
  border-color: var(--border);
  background: var(--bg-white);
  color: var(--ink);
}

.button.muted:hover {
  background: var(--bg-cream);
  border-color: var(--ink-muted);
  box-shadow: none;
  color: var(--ink);
}

.button.danger {
  border-color: #c0392b;
  background: #c0392b;
  color: #fff;
}

.button.danger:hover {
  background: #a93226;
  border-color: #a93226;
}

/* ══════════════════════════════════════════ */
/* ── SEÇÕES ── */
/* ══════════════════════════════════════════ */

.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--bg-cream);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head>p {
  color: var(--ink-muted);
  max-width: 48ch;
  text-align: right;
  margin: 0;
}

/* ══════════════════════════════════════════ */
/* ── ESTATÍSTICAS ── */
/* ══════════════════════════════════════════ */

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

.stat {
  padding: 22px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}

/* Barra superior beringela sutil */
.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-dark), var(--red-light));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.stat:hover {
  border-color: rgba(107, 45, 91, 0.2);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat:hover::before {
  opacity: 1;
}

.stat strong {
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--red-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat span {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

/* ══════════════════════════════════════════ */
/* ── GRID & CARDS ── */
/* ══════════════════════════════════════════ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  padding: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--dur) var(--ease);
}

.card:hover {
  border-color: rgba(107, 45, 91, 0.15);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--red-dark);
}

.card p {
  color: var(--ink-secondary);
  font-size: 0.95rem;
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--red-pale);
  color: var(--red-dark);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(107, 45, 91, 0.1);
}

/* ── Page Hero ── */
.page-hero {
  padding: 48px 0 24px;
  background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-body) 100%);
}

/* ══════════════════════════════════════════ */
/* ── TOOLBAR / FILTROS ── */
/* ══════════════════════════════════════════ */

.toolbar {
  display: grid;
  grid-template-columns: 1fr 200px 160px;
  gap: 12px;
  margin-bottom: 22px;
}

/* ══════════════════════════════════════════ */
/* ── FORMULÁRIOS ── */
/* ══════════════════════════════════════════ */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--ink);
  transition: all var(--dur) var(--ease);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px var(--red-pale);
}

input::placeholder {
  color: var(--ink-dim);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

small {
  color: var(--ink-muted);
  font-size: 0.82rem;
}

/* ══════════════════════════════════════════ */
/* ── AUTH BOX ── */
/* ══════════════════════════════════════════ */

.auth-box {
  width: min(500px, 100%);
  margin: 48px auto;
}

.notice {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--amber-bg);
  border: 1px solid #e8d5a8;
  color: #6f4410;
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.success {
  background: var(--green-bg);
  border-color: #b8dfc5;
  color: var(--green);
}

/* ══════════════════════════════════════════ */
/* ── ADMIN LAYOUT ── */
/* ══════════════════════════════════════════ */

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: start;
}

.admin-nav {
  position: sticky;
  top: 94px;
  padding: 18px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-white);
  border: 1px solid var(--border);
}

.admin-nav p {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
}

.admin-nav p strong {
  color: var(--red-dark);
}

.admin-nav p small {
  color: var(--ink-muted);
}

.admin-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--dur) var(--ease);
}

.admin-nav a:hover,
.admin-nav a.active {
  background: var(--red-pale);
  color: var(--red-primary);
}

/* Tabela Admin */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: var(--bg-cream);
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td strong {
  color: var(--ink);
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-btn {
  border: 1px solid var(--border);
  background: var(--bg-white);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--ink-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--dur) var(--ease);
}

.icon-btn:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
  background: var(--red-pale);
}

/* ══════════════════════════════════════════ */
/* ── FOOTER ── */
/* ══════════════════════════════════════════ */

.site-footer {
  padding: 44px 0 0;
  background: var(--red-dark);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 32px;
}

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-logo {
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  margin-top: 2px;
}

.site-footer strong {
  color: #fff;
  display: block;
  margin-bottom: 6px;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  margin: 0 0 4px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
  margin: 0;
}

.test-mode-link {
  display: inline-block;
  margin-left: 8px;
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
  vertical-align: middle;
}

.test-mode-link:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* ══════════════════════════════════════════ */
/* ── RESPONSIVO ── */
/* ══════════════════════════════════════════ */

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .main-nav.open {
    display: grid;
    gap: 2px;
  }

  .main-nav .nav-admin {
    text-align: center;
    margin-left: 0;
    margin-top: 8px;
  }

  .hero-grid,
  .admin-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .stats,
  .grid,
  .grid.two {
    grid-template-columns: repeat(2, 1fr);
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    position: static;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head>p {
    text-align: left;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1400px);
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: 1.9rem;
  }

  .stats,
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }

  .footer-brand {
    flex-direction: column;
  }
}

/* ══════════════════════════════════════════ */
/* ── CARROSSEL ── */
/* ══════════════════════════════════════════ */

.carousel-section {
  padding: 0 0 16px;
}

.carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--red-dark);
}

.carousel-inner {
  position: relative;
  width: 100%;
  min-height: 320px;
  max-height: 520px;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-dark);
}

.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  width: auto;
  height: 100%;
  object-fit: contain;
}

/* Fotos paisagem ocupam toda a largura */
.carousel-slide.landscape img {
  object-fit: cover;
}

/* Fotos retrato: barras beringela nos lados */
.carousel-slide.portrait {
  background: linear-gradient(90deg, var(--red-dark) 0%, var(--red-dark) 15%, transparent 15%, transparent 85%, var(--red-dark) 85%, var(--red-dark) 100%);
}

.carousel-slide.portrait img {
  width: auto;
  height: 100%;
  max-width: 70%;
  object-fit: contain;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  z-index: 5;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--red-dark);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: #fff;
  box-shadow: var(--shadow-md);
}

.carousel-prev {
  left: 14px;
}

.carousel-next {
  right: 14px;
}

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  padding: 0;
}

.carousel-dot.active,
.carousel-dot:hover {
  background: #fff;
  border-color: #fff;
}

@media (max-width: 620px) {
  .carousel-inner {
    min-height: 220px;
    max-height: 360px;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .carousel-prev {
    left: 8px;
  }

  .carousel-next {
    right: 8px;
  }

  .carousel-caption {
    font-size: 0.85rem;
    padding: 12px 16px;
  }

  .carousel-slide.portrait {
    background: linear-gradient(90deg, var(--red-dark) 0%, var(--red-dark) 8%, transparent 8%, transparent 92%, var(--red-dark) 92%, var(--red-dark) 100%);
  }

  .carousel-slide.portrait img {
    max-width: 84%;
  }
}

/* ══════════════════════════════════════════ */
/* ── FOTO MEMBROS ── */
/* ══════════════════════════════════════════ */

.member-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}

.member-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-pale);
  color: var(--red-primary);
  font-size: 1.8rem;
  font-weight: 700;
}

.card .member-photo {
  width: 64px;
  height: 64px;
}

/* Card Membro */
.member-card {
  padding: 20px;
}

.member-card-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.member-card-info {
  flex: 1;
  min-width: 0;
}

.member-card-info h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
  color: var(--red-dark);
}

.member-categoria {
  color: var(--red-primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.member-vinculo {
  color: var(--ink-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.member-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.member-details p {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.member-details a {
  color: var(--red-primary);
  font-weight: 600;
}

.member-toggle {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-white);
  color: var(--ink-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.member-toggle:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
  background: var(--red-pale);
}

.field-photo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.field-photo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

/* ══════════════════════════════════════════ */
/* ── Acessibilidade ── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════ */
/* ── AGENDA SIDEBAR ── */
/* ══════════════════════════════════════════ */

.agenda-card {
  margin-top: 24px;
}

.agenda-card h2 {
  margin-bottom: 12px;
}

.agenda-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.agenda-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.agenda-item:last-child {
  border-bottom: none;
}

.agenda-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--red-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.agenda-title a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.agenda-title a:hover {
  color: var(--red-primary);
}

.agenda-local {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 4px;
}

.agenda-inscricao {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--red-primary);
  text-decoration: none;
}

.agenda-inscricao:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════ */
/* ── MODAL DESTAQUE ── */
/* ══════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.modal-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay.modal-closing {
  opacity: 0;
}

.modal-content {
  background: var(--bg-white);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-visible .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--ink-muted);
  cursor: pointer;
  z-index: 99999;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink);
}

.modal-event-img {
  width: auto;
  max-width: auto;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto 16px;
}

.modal-body {
  padding: 24px;
}

.modal-body h2 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.modal-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--red-primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-local {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.modal-palestrantes {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  margin-bottom: 16px;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.modal-buttons .button {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.modal-inscricao {
  background: #6B2D5B;
  color: #fff;
  border-color: #6B2D5B;
}

.modal-inscricao:hover {
  background: #551f48;
  border-color: #551f48;
  color: #fff;
}

.modal-gcal {
  background: #6B2D5B;
  color: #fff;
  border-color: #6B2D5B;
}

.modal-gcal:hover {
  background: #551f48;
  border-color: #551f48;
  color: #fff;
}

/* ══════════════════════════════════════════ */
/* ── SESSÕES (EVENTOS) ── */
/* ══════════════════════════════════════════ */

.sessions-panel {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
}

@media (max-width: 768px) {
  .agenda-card {
    margin-top: 16px;
  }

  .modal-content {
    max-height: 90vh;
  }

  .modal-event-img {
    max-height: 200px;
  }
}

/* ══════════════════════════════════════════ */
/* ── GALERIA DE FOTOS ── */
/* ══════════════════════════════════════════ */

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.galeria-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--bg-cream);
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}

.galeria-item:hover img {
  transform: scale(1.05);
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.visible {
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.3); }

.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* ══════════════════════════════════════════ */
/* ── AGENDA / CALENDÁRIO ── */
/* ══════════════════════════════════════════ */

.agenda-calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.agenda-calendar-header h2 {
  min-width: 220px;
  text-align: center;
  margin: 0;
}

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

.calendar-header {
  padding: 10px 4px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.calendar-day {
  min-height: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  cursor: default;
  transition: all 0.2s var(--ease);
}

.calendar-day.empty {
  background: transparent;
  border-color: transparent;
}

.calendar-day.today {
  border-color: var(--red-primary);
  background: var(--red-pale);
}

.calendar-day.today .day-number {
  color: var(--red-primary);
  font-weight: 700;
}

.calendar-day.has-event {
  cursor: pointer;
}

.calendar-day.has-event:hover {
  border-color: var(--red-primary);
  box-shadow: var(--shadow-sm);
}

.day-number {
  font-size: 0.9rem;
  font-weight: 600;
}

.event-dots {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-primary);
}

.agenda-events-list .card h4 {
  color: var(--red-dark);
  margin-bottom: 4px;
}

@media (max-width: 600px) {
  .galeria-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .calendar-day {
    min-height: 50px;
    padding: 4px;
  }

  .day-number {
    font-size: 0.8rem;
  }

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* Bloquear download no lightbox */
.lightbox-img {
  pointer-events: none;
}

.galeria-item img {
  -webkit-user-drag: none;
  user-select: none;
}

/* ══════════════════════════════════════════ */
/* ── MINI CALENDÁRIO (HOME) ── */
/* ══════════════════════════════════════════ */

.mini-calendar {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.mini-calendar-header {
  text-align: center;
  margin-bottom: 8px;
  color: var(--red-dark);
  font-size: 0.95rem;
}

.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.mini-cal-header {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink-muted);
  padding: 2px 0;
}

.mini-cal-day {
  font-size: 0.75rem;
  padding: 3px 0;
  border-radius: 4px;
  color: var(--ink-secondary);
}

.mini-cal-day.empty {
  visibility: hidden;
}

.mini-cal-day.today {
  background: var(--red-primary);
  color: #fff;
  font-weight: 700;
}

/* ══════════════════════════════════════════ */
/* ── RESPONSIVO COMPLETO ── */
/* ══════════════════════════════════════════ */

@media (max-width: 900px) {
  .agenda-calendar-header {
    gap: 12px;
  }

  .agenda-calendar-header h2 {
    min-width: 160px;
    font-size: 1.2rem;
  }

  .calendar-header {
    font-size: 0.75rem;
    padding: 8px 2px;
  }
}

@media (max-width: 620px) {
  .agenda-calendar-header {
    flex-direction: column;
    gap: 8px;
  }

  .agenda-calendar-header h2 {
    min-width: auto;
    font-size: 1.1rem;
  }

  .agenda-calendar-header .button {
    width: 100%;
  }

  .calendar-grid {
    gap: 2px;
  }

  .calendar-header {
    font-size: 0.65rem;
    padding: 6px 1px;
  }

  .calendar-day {
    min-height: 40px;
    padding: 3px 2px;
  }

  .day-number {
    font-size: 0.7rem;
  }

  .event-dot {
    width: 4px;
    height: 4px;
  }

  .galeria-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
  }

  .galeria-item {
    aspect-ratio: 1;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .lightbox-close {
    font-size: 2rem;
    top: 12px;
    right: 12px;
  }

  .mini-calendar {
    display: none;
  }
}

/* Garantir que imagens não vaziem do container */
img {
  max-width: 100%;
  height: auto;
}

/* Evitar overflow horizontal */
main, .section {
  overflow-x: hidden;
}

/* Grids responsivos */
.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }
}

/* Admin layout responsivo */
@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    position: static;
  }

  .admin-nav a {
    display: inline-block;
    padding: 6px 10px;
  }
}

/* ── Flatpickr overrides ── */
.flatpickr-calendar {
  z-index: 9999 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
}

.flatpickr-calendar .flatpickr-month,
.flatpickr-calendar .flatpickr-weekdays {
  background: var(--red-dark);
  color: #fff;
}

.flatpickr-calendar .flatpickr-weekday {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
  fill: #fff;
  color: #fff;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--red-light);
}

.flatpickr-calendar .flatpickr-current-month {
  color: #fff;
}

.flatpickr-calendar .flatpickr-day.selected,
.flatpickr-calendar .flatpickr-day.selected:hover {
  background: var(--red-primary);
  border-color: var(--red-primary);
  color: #fff;
}

.flatpickr-calendar .flatpickr-day:hover {
  background: var(--red-pale);
  border-color: var(--red-pale);
}

.flatpickr-calendar .flatpickr-day.today {
  border-color: var(--red-mid);
}

/* Ensure flatpickr input in admin matches site styling */
.flatpickr-input {
  cursor: pointer;
}

.flatpickr-input + .flatpickr-mobile {
  display: none !important;
}

/* Static mode: the calendar dropdown appears relative to the wrapper */
.flatpickr-wrapper {
  display: block;
  position: relative;
  width: 100%;
}

.flatpickr-wrapper .flatpickr-calendar.static {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
}

.flatpickr-wrapper .flatpickr-calendar.static.open {
  z-index: 9999;
}

.flatpickr-wrapper input.flatpickr-input,
.flatpickr-wrapper input[type="text"] {
  width: 100%;
}

/* ── Alertas de Cadastro ── */
.cadastro-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid;
}

.cadastro-alert-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
}

.cadastro-alert-body strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.cadastro-alert-body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cadastro-alert-body ul {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 0.9rem;
}

.cadastro-alert-body li {
  margin-bottom: 3px;
}

.cadastro-alert--danger {
  background: #fef2f2;
  border-color: #f5c2c2;
  color: #842029;
}

.cadastro-alert--danger .cadastro-alert-icon {
  background: #f5c2c2;
  color: #842029;
}

.cadastro-alert--warning {
  background: var(--amber-bg);
  border-color: #e8d5a0;
  color: #6a5a1a;
}

.cadastro-alert--warning .cadastro-alert-icon {
  background: #e8d5a0;
  color: #6a5a1a;
}

.cadastro-alert--success {
  background: var(--green-bg);
  border-color: #b7e4c7;
  color: #1a5c30;
}

.cadastro-alert--success .cadastro-alert-icon {
  background: #b7e4c7;
  color: #1a5c30;
}

/* ── Botões públicos ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  text-align: center;
}

.btn-primary {
  background: var(--red-dark);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}