/* ============================================================
   CAVALARIA PARAENSE — loading.css
   Tela de carregamento institucional
   ============================================================ */

#cp-loading {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--green-dark, #1F4127);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity .5s ease, visibility .5s ease;
  user-select: none;
}

#cp-loading.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cp-load-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: loadFadeIn .6s ease both;
}

.cp-load-mark {
  width: 72px;
  height: 72px;
  background: var(--gold, #C8A96E);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(200,169,110,.4);
  animation: loadPulse 2s ease infinite;
}

.cp-load-mark img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

.cp-load-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  text-align: center;
}

.cp-load-sub {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold, #C8A96E);
  text-align: center;
  margin-top: -8px;
}

/* Bolinhas girando (spinner) */
.cp-load-spinners {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  animation: loadFadeIn .6s ease .3s both;
}

.cp-spin-dot {
  width: 14px;
  height: 14px;
  background: var(--gold, #C8A96E);
  border-radius: 50%;
  animation: cp-bounce 1.4s ease-in-out infinite both;
}

.cp-spin-dot:nth-child(1) { animation-delay: -0.32s; }
.cp-spin-dot:nth-child(2) { animation-delay: -0.16s; }
.cp-spin-dot:nth-child(3) { animation-delay: 0s; }

@keyframes cp-bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Barra de progresso */
.cp-load-bar-wrap {
  width: 180px;
  height: 3px;
  background: rgba(255,255,255,.12);
  border-radius: 100px;
  overflow: hidden;
  animation: loadFadeIn .6s ease .3s both;
}

.cp-load-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold, #C8A96E), #D9BC85);
  border-radius: 100px;
  animation: loadBar 1.8s cubic-bezier(.4,0,.2,1) .4s forwards;
}

@keyframes loadBar {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

@keyframes loadFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes loadPulse {
  0%   { box-shadow: 0 0 0 0   rgba(200,169,110,.4); }
  70%  { box-shadow: 0 0 0 16px rgba(200,169,110,0);  }
  100% { box-shadow: 0 0 0 0   rgba(200,169,110,0);  }
}

/* ── CARDS ESTILO DEMOLAYDF ──────────────────────────────── */
/* Grade de cards de notícias */
.news-df-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .news-df-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .news-df-grid { grid-template-columns: 1fr; } }

/* Card individual — estilo demolaydf.org.br */
.news-df-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: box-shadow .25s, transform .25s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.news-df-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  transform: translateY(-4px);
}

/* Imagem do card */
.news-df-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #E8EDE8;
  flex-shrink: 0;
}
.news-df-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
  display: block;
}
.news-df-card:hover .news-df-img img { transform: scale(1.05); }

/* Placeholder sem imagem */
.news-df-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2D5C3A 0%, #1F4127 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-df-img-placeholder svg { width: 40px; height: 40px; fill: rgba(200,169,110,.35); }

/* Badge DM (estilo demolaydf) */
.news-df-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 38px;
  height: 38px;
  background: var(--green-dark, #1F4127);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(200,169,110,.4);
}
.news-df-badge svg { width: 20px; height: 20px; fill: var(--gold, #C8A96E); }

/* Corpo do card */
.news-df-body {
  padding: 20px 20px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-df-cat {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-dark, #1F4127);
}

.news-df-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  line-height: 1.4;
  flex: 1;
}

.news-df-read {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-dark, #1F4127);
  margin-top: 4px;
}
.news-df-read svg { width: 14px; height: 14px; transition: transform .2s; }
.news-df-card:hover .news-df-read svg { transform: translateX(4px); }

.news-df-date {
  font-size: .78rem;
  color: #9CA3AF;
  padding: 10px 20px 14px;
  border-top: 1px solid #F3F4F6;
  margin-top: auto;
}

/* Botão "Ver mais" estilo demolaydf */
.btn-ver-mais {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--green-dark, #1F4127);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s;
  text-decoration: none;
}
.btn-ver-mais:hover { background: #2D5C3A; transform: translateY(-2px); }
.btn-ver-mais svg { width: 16px; height: 16px; }

/* Página de artigo individual */
.article-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.article-hero-img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 32px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.article-cat {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green-dark, #1F4127);
  background: rgba(31,65,39,.08);
  padding: 3px 10px;
  border-radius: 100px;
}
.article-date { font-size: .8125rem; color: #9CA3AF; }
.article-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: #111;
  line-height: 1.25;
  margin-bottom: 20px;
}
.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: #374151;
}
.article-body p { margin-bottom: 16px; }
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--green-dark, #1F4127);
  margin-bottom: 24px;
  text-decoration: none;
}
.article-back:hover { text-decoration: underline; }
.article-back svg { width: 16px; height: 16px; }
