/* ============================================================
   VOZ DA TOGA — Estilos Globais
   Azul Marinho + Dourado — Elegância Institucional
   ============================================================ */

:root {
  --navy: #0a1628;
  --navy-mid: #122244;
  --navy-light: #1e3a6e;
  --gold: #c9a84c;
  --gold-light: #e8c87a;
  --gold-pale: #f5e6c0;
  --white: #ffffff;
  --off-white: #f8f7f4;
  --gray-100: #f3f2ef;
  --gray-200: #e8e6e1;
  --gray-400: #9e9b94;
  --gray-600: #5a5750;
  --gray-800: #2c2a26;
  --success: #2e7d52;
  --error: #c0392b;
  --warning: #d4880a;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --shadow-sm: 0 1px 4px rgba(10,22,40,0.08);
  --shadow-md: 0 4px 16px rgba(10,22,40,0.12);
  --shadow-lg: 0 8px 32px rgba(10,22,40,0.18);
  --radius: 8px;
  --radius-lg: 14px;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--off-white);
  color: var(--gray-800);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--navy-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.3;
}

/* ── UTILITIES ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ── BOTÕES ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: var(--navy-light);
  color: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--gold);
}

.btn-danger {
  background: var(--error);
  color: white;
  border-color: var(--error);
}
.btn-danger:hover { background: #a93226; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── ALERTAS ── */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #e8f5ed; color: var(--success); border-left: 4px solid var(--success); }
.alert-error   { background: #fdecea; color: var(--error);   border-left: 4px solid var(--error); }
.alert-warning { background: #fff8e6; color: var(--warning); border-left: 4px solid var(--warning); }
.alert-info    { background: #e8edf8; color: var(--navy);    border-left: 4px solid var(--navy-light); }

/* ── FORMS ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--gray-800);
  background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.form-control.error { border-color: var(--error); }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 5px; }

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

/* ── CARDS ── */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-body { padding: 24px; }

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-gold   { background: var(--gold-pale); color: #8a6b1a; }
.badge-navy   { background: var(--navy);      color: var(--gold); }
.badge-green  { background: #e8f5ed;          color: var(--success); }
.badge-red    { background: #fdecea;          color: var(--error); }
.badge-gray   { background: var(--gray-200);  color: var(--gray-600); }

/* ── NAVBAR ── */
.navbar {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 24px;
  max-width: 1300px;
  margin: 0 auto;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.navbar-brand .brand-icon {
  width: 42px;
  height: 42px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--navy);
}
.navbar-brand .brand-text { display: flex; flex-direction: column; }
.navbar-brand .brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}
.navbar-brand .brand-slogan {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.navbar-links { display: flex; align-items: center; gap: 4px; }
.navbar-links a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
}
.navbar-links a:hover { color: var(--gold); background: rgba(255,255,255,0.06); }
.navbar-links a.active { color: var(--gold); }

.navbar-actions { display: flex; align-items: center; gap: 10px; }
.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.9);
  font-size: 14px;
}
.navbar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
}
.navbar-user .user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── HERO / BANNER ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  color: white;
  padding: 72px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: white;
  margin-bottom: 16px;
}
.hero h1 span { color: var(--gold); }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 28px; }
.hero-divider {
  width: 80px;
  height: 3px;
  background: var(--gold);
  margin: 20px auto;
  border-radius: 2px;
}

/* ── SECTION HEADERS ── */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.section-subtitle { color: var(--gray-600); margin-bottom: 32px; }
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 32px;
}

/* ── POST CARDS ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card-cover {
  height: 180px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 20px; }
.post-card-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 8px;
}
.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.4;
}
.post-card-excerpt { font-size: 14px; color: var(--gray-600); line-height: 1.6; margin-bottom: 16px; }
.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-400);
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}
.post-card-author { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--gray-600); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
.modal-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-family: var(--font-serif); font-size: 1.3rem; color: var(--navy); }
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--gray-400);
  padding: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--gray-800); }
.modal-body { padding: 24px 28px; }
.modal-footer { padding: 16px 28px 24px; border-top: 1px solid var(--gray-200); display: flex; gap: 12px; justify-content: flex-end; }

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── FOOTER ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 48px 24px 24px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.footer-brand .footer-logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: white;
  margin-bottom: 10px;
}
.footer-brand .footer-logo span { color: var(--gold); }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 16px;
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--gold); color: var(--navy); }
.footer-col h4 { color: var(--gold); font-family: var(--font-serif); font-size: 1rem; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ── SPINNER ── */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 16px; }
}
