/* =========================================================
   FuelAlert — Content Pages CSS
   Shared layout for /news, /about, /alternative-fuels, /oil-prices
   ========================================================= */

/* --- Override map-specific body styles --- */
body.page-body {
  overflow: auto;
  overflow-x: hidden;
}

/* --- Page Nav (in header) --- */
.page-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 12px;
}
.page-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.page-nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}
.page-nav a.active {
  color: var(--accent);
  background: rgba(255,107,53,0.1);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-left: auto;
  margin-right: 4px;
  flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle:hover { background: rgba(255,255,255,0.1); }

@media (max-width: 768px) {
  .page-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    background: linear-gradient(135deg, #0c0f1a 0%, #161b30 50%, #1a1230 100%);
    border-bottom: 1px solid var(--border-light);
    padding: 8px 12px;
    gap: 2px;
    z-index: 1099;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  }
  .page-nav.open { display: flex; }
  .page-nav a {
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
  }
  .nav-toggle { display: flex; }
}

/* --- Page Main Content --- */
.page-main {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 24px) 20px 40px;
  min-height: 100vh;
}

.page-main h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-intro {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 700px;
}

/* --- Prose Content (articles) --- */
.prose {
  line-height: 1.75;
  color: var(--text);
  font-size: 0.95rem;
}
.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
  color: #fff;
}
.prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--accent);
}
.prose p {
  margin-bottom: 16px;
  color: var(--text);
}
.prose ul, .prose ol {
  margin-bottom: 16px;
  padding-left: 24px;
}
.prose li {
  margin-bottom: 6px;
}
.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,107,53,0.3);
  transition: border-color var(--transition);
}
.prose a:hover {
  border-bottom-color: var(--accent);
}
.prose strong {
  color: #fff;
  font-weight: 600;
}
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(255,107,53,0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
}

/* --- Article Cards (News) --- */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
@media (min-width: 640px) {
  .article-grid { grid-template-columns: 1fr 1fr; }
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.article-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.article-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.article-card h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}
.article-card h3 a:hover { color: var(--accent); }
.article-card .article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.article-card .article-source {
  background: rgba(255,107,53,0.12);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.7rem;
}
.article-card .article-snippet {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Loading skeleton for news */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--bg-input) 25%, rgba(255,255,255,0.05) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 10px;
}
.skeleton-line:last-child { width: 60%; }
.skeleton-line.short { width: 40%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Info Cards (About, etc.) --- */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}
.info-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

/* --- Donate Section --- */
.donate-section {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 32px 0;
}
.donate-section h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #fff;
}
.donate-section p {
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.btn-donate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-donate:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 24px var(--accent-glow);
}

/* --- Share Buttons --- */
.share-section {
  text-align: center;
  margin: 32px 0;
}
.share-section h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #fff;
}
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.share-btn svg { width: 18px; height: 18px; }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.copy-link { background: rgba(255,255,255,0.1); border: 1px solid var(--border-light); }
.share-btn.copy-link.copied { background: var(--green); border-color: var(--green); }

/* --- In-Content Ad Zones --- */
.ad-inline {
  text-align: center;
  margin: 28px 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- CTA Back to Map --- */
.cta-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition);
  margin: 20px 0;
}
.cta-map:hover { background: var(--accent-hover); }

/* --- Page Footer --- */
.page-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 32px 0;
  text-align: center;
}
.page-footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
}
.page-footer-links a:hover { color: var(--accent); }
.page-footer-copy {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.6;
}
