/* =====================================================================
   EVENTOS GWE — Main Stylesheet
   Grupo White Educacional · DTIC 2026
   ===================================================================== */

/* ── Variables ────────────────────────────────────────────────────── */
:root {
  --gwe-primary:   #1a3a6c;
  --gwe-accent:    #c9a227;
  --gwe-dark:      #0f2350;
  --gwe-light:     #f0f4f8;
  --gwe-card-bg:   #ffffff;
  --gwe-text:      #2d3748;
  --gwe-muted:     #718096;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:     0 8px 40px rgba(0,0,0,0.14);
}

/* ── Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--gwe-text);
  background: var(--gwe-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.main-content { flex: 1; }

/* ── Navbar ───────────────────────────────────────────────────────── */
.navbar-gwe {
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%) !important;
  border-bottom: 3px solid var(--gwe-accent);
  padding: 0.6rem 0;
}
.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  /* Remove o fundo preto da logo no navbar escuro */
  mix-blend-mode: lighten;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.footer-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
  opacity: 0.9;
}
.brand-text { line-height: 1.2; }
.brand-title { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 1px; display: block; }
.brand-sub   { font-size: 10px; color: rgba(255,255,255,0.6); letter-spacing: 0.5px; display: block; }

.navbar-gwe .nav-link {
  color: rgba(255,255,255,0.82) !important;
  font-size: 14px; font-weight: 500;
  padding: 0.45rem 0.75rem !important;
  border-radius: 6px;
  transition: all .2s;
}
.navbar-gwe .nav-link:hover,
.navbar-gwe .nav-link.active { color: #fff !important; background: rgba(255,255,255,0.12) !important; }

.admin-badge {
  background: rgba(201,162,39,0.18) !important;
  color: var(--gwe-accent) !important;
  border: 1px solid rgba(201,162,39,0.4);
}
.admin-badge:hover { background: rgba(201,162,39,0.3) !important; }

.btn-accent {
  background: var(--gwe-accent);
  color: var(--gwe-dark);
  font-weight: 600;
  border: none;
}
.btn-accent:hover { background: #b8911e; color: var(--gwe-dark); }

.user-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gwe-accent); color: var(--gwe-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--gwe-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 26px; flex-shrink: 0;
}

/* ── Flash messages ───────────────────────────────────────────────── */
.flash-container { padding: 0.5rem 0 0; }

/* ── Hero Section ─────────────────────────────────────────────────── */
.hero-section { position: relative; min-height: 480px; overflow: hidden; }
.carousel-img {
  width: 100%; height: 480px;
  object-fit: cover; display: block;
}
.carousel-placeholder {
  height: 480px;
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; color: rgba(255,255,255,0.15);
}
.carousel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,20,50,0.85) 0%, rgba(10,20,50,0.3) 60%, transparent 100%);
}
.carousel-caption-gwe {
  position: absolute; bottom: 60px; left: 0; right: 0;
  text-align: left; padding: 0;
  color: #fff;
}
.badge-event-date {
  display: inline-block;
  background: rgba(201,162,39,0.9); color: var(--gwe-dark);
  padding: 4px 12px; border-radius: 50px;
  font-size: 13px; font-weight: 600;
}
.carousel-title {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 700; line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.carousel-desc {
  color: rgba(255,255,255,0.8); font-size: 15px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  max-width: 560px;
}

.hero-empty {
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  min-height: 300px;
  display: flex; align-items: center;
}
.hero-icon-empty { font-size: 64px; color: rgba(255,255,255,0.2); display: block; }

/* ── Stats Bar ────────────────────────────────────────────────────── */
.stat-item {
  padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.stat-item i { font-size: 22px; margin-bottom: 4px; }
.stat-number { font-size: 26px; font-weight: 700; color: var(--gwe-primary); }
.stat-label  { font-size: 12px; color: var(--gwe-muted); text-transform: uppercase; letter-spacing: .5px; }

/* stat card (dashboard) */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
}

/* ── Section titles ───────────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700; color: var(--gwe-primary);
}

/* ── Event Cards ──────────────────────────────────────────────────── */
.event-card {
  background: var(--gwe-card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
  border: 1px solid rgba(0,0,0,0.06);
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.event-card-img-wrap { position: relative; height: 180px; overflow: hidden; }
.event-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.event-card:hover .event-card-img { transform: scale(1.04); }
.event-card-img-placeholder {
  height: 100%;
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: rgba(255,255,255,0.15);
}
.event-card-badge {
  position: absolute; top: 10px; left: 10px;
}
.event-card-body {
  padding: 1rem 1.1rem;
  flex: 1; display: flex; flex-direction: column; gap: 4px;
}
.event-card-title {
  font-size: 15px; font-weight: 700; color: var(--gwe-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 4px;
}
.event-card-desc {
  font-size: 13px; color: var(--gwe-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 4px;
}
.event-card-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--gwe-muted);
}
.event-card-organizer {
  font-size: 12px; color: var(--gwe-muted); margin-top: 4px;
}
.event-card-footer {
  padding: 0.75rem 1.1rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* ── CTA Section ──────────────────────────────────────────────────── */
.cta-section { background: var(--gwe-light); }
.cta-card {
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
  box-shadow: var(--shadow-lg);
}
.cta-icon { font-size: 52px; color: var(--gwe-accent); }
.text-white-75 { color: rgba(255,255,255,0.75) !important; }

/* ── Auth section ─────────────────────────────────────────────────── */
.auth-section {
  min-height: calc(100vh - 70px);
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 60%, #1e4e8c 100%);
  padding: 2rem 0;
}
.auth-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
}
.auth-card-header {
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  padding: 2rem;
  color: #fff;
}
.auth-logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.auth-card-header h3 { color: #fff; }
.auth-card-header .text-muted { color: rgba(255,255,255,0.65) !important; }
.auth-card-body { padding: 2rem; }

/* ── Event Hero (detail) ──────────────────────────────────────────── */
.event-hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  min-height: 280px;
}
.event-hero-img-wrap {
  position: absolute; inset: 0; overflow: hidden;
}
.event-hero-img { width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.event-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(10,20,50,0.7) 0%, rgba(10,20,50,0.3) 100%);
}
.text-white-75 { color: rgba(255,255,255,0.75) !important; }

/* ── Day header (programação) ─────────────────────────────────── */
.act-day-header {
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 0;
  letter-spacing: .3px;
}
.act-day-header + .activity-row {
  border-top: none !important;
}

.activity-row { transition: background .2s; }
.activity-row:hover { background: rgba(26,58,108,0.04); }

/* ── Registration Card ────────────────────────────────────────────── */
.reg-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.reg-card-header {
  position: relative;
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  min-height: 160px;
  display: flex; align-items: flex-end;
  padding: 0;
}
.reg-card-banner {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: .35;
}
.reg-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,20,50,0.3) 0%, rgba(10,20,50,0.8) 100%);
}
.reg-card-header-content {
  position: relative; z-index: 1;
  width: 100%; padding: 1.25rem 1.5rem 1.25rem;
}
.reg-card-logo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.reg-card-logo {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--gwe-accent); color: var(--gwe-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.reg-card-org { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.reg-card-org-sub { font-size: 10px; color: rgba(255,255,255,0.65); }
.reg-card-event-name { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 4px; line-height: 1.3; }
.reg-card-dates { font-size: 13px; color: rgba(255,255,255,0.7); }

.reg-card-body { padding: 1.25rem 1.5rem; }
.reg-card-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--gwe-muted); display: block; }
.reg-card-value { font-size: 15px; display: block; }
.reg-card-code  { font-family: monospace; font-size: 16px; letter-spacing: 2px; color: var(--gwe-primary); font-weight: 700; display: block; }
.reg-card-acts  { display: flex; flex-direction: column; gap: 6px; }
.reg-card-act-item {
  padding: 6px 10px;
  background: var(--gwe-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gwe-primary);
}
.reg-card-footer {
  background: var(--gwe-light);
  padding: 0.75rem 1.5rem;
  font-size: 12px;
  color: var(--gwe-muted);
  border-top: 1px solid rgba(0,0,0,0.07);
}

/* ── Page hero ────────────────────────────────────────────────────── */
.page-hero { background: var(--gwe-light); }

/* ── Admin ────────────────────────────────────────────────────────── */
.admin-stat-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border-radius: var(--radius); padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none;
}
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.admin-stat-icon { font-size: 28px; }
.admin-stat-num  { font-size: 28px; font-weight: 700; color: var(--gwe-primary); line-height: 1; }
.admin-stat-lbl  { font-size: 12px; color: var(--gwe-muted); text-transform: uppercase; letter-spacing: .5px; }

.admin-table { font-size: 14px; }
.admin-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

/* ── Footer ───────────────────────────────────────────────────────── */
.footer-gwe {
  background: linear-gradient(135deg, var(--gwe-dark) 0%, var(--gwe-primary) 100%);
  border-top: 3px solid var(--gwe-accent);
  padding: 1.5rem 0;
}
.text-accent      { color: var(--gwe-accent) !important; }
.text-muted-footer { color: rgba(255,255,255,0.5) !important; font-size: 13px; }

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state { padding: 3rem 1rem; }
.empty-icon  { font-size: 56px; color: rgba(26,58,108,0.15); display: block; margin-bottom: .5rem; }

/* ── Check circle on card ─────────────────────────────────────────── */
.check-circle-wrap { line-height: 1; }

/* ── Utilities ────────────────────────────────────────────────────── */
.bg-primary-subtle { background: rgba(26,58,108,0.07) !important; }
.border-success    { border-color: #198754 !important; }
.border-danger     { border-color: #dc3545 !important; }
.lh-lg             { line-height: 1.9; }
