/* General Body and Container */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
  margin: 0;
}

.container {
  max-width: 1100px;
  margin: auto;
  overflow: hidden;
  padding: 0 2rem;
}

/* Header */
header {
  background: #fff;
  color: #333;
  padding: 1rem 0;
  border-bottom: 1px solid #e6e6e6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* allow dropdowns to escape the container (fix clipping) */
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 56px;
  display: block;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

.tagline {
  margin-left: 1rem;
  color: #666;
  font-size: 0.9rem;
}

.nav a, .nav-dropdown > a {
  color: #555;
  padding: 0.5rem 1rem;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.nav a:hover, .nav-dropdown > a:hover {
  color: #007bff;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 28px;
  background: var(--panel, #fff);
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(12, 13, 14, 0.08);
  min-width: 180px;
  z-index: 1000;
}

/* when parent dropdown has .open, show the menu */
.nav-dropdown.open .dropdown-menu {
  display: block;
}

#admin-menu {
    min-width: 200px;
}

.dropdown-menu a {
  display: block;
  padding: 8px;
  text-decoration: none;
  color: var(--text, #333);
}

.dropdown-menu a:hover {
  background-color: #f0f0f0;
}

main.container {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Hero Section */
.hero-spot {
  padding: 3rem 0;
  background-color: #f8f9fa;
}

.hero-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

.hero-copy {
  flex: 1;
  max-width: 50%;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.25rem;
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 0.3rem;
  font-weight: 500;
  transition: background-color 0.2s ease-in-out;
}

.hero-cta:hover {
  background-color: #0056b3;
}

.hero-media {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
  .hero-body {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .hero-copy {
    max-width: 100%;
  }
}

/* Recent Articles */
.recent-articles {
  padding: 3rem 0;
}

.recent-articles h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.recent-item {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.recent-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.06);
}

.recent-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.recent-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.recent-meta {
  padding: 1.5rem;
}

.recent-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.recent-sub {
  font-size: 0.9rem;
  color: #6c757d;
}

/* Recent Notes */
.recent-notes {
  padding: 3rem 0;
}

.recent-notes h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

.notes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  list-style: none;
  padding: 0;
}

.note-item {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.05);
  padding: 1.5rem;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.note-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.06);
}

.note-subject a {
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  color: #343a40;
}

.note-subject a:hover {
  text-decoration: underline;
}

.note-meta {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #6c757d;
}

.note-meta a {
  text-decoration: none;
  color: #007bff;
}

.note-meta a:hover {
  text-decoration: underline;
}

/* Recent Categories */
.recent-categories {
  padding: 3rem 0;
}

.recent-categories h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

.categories-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.category-card {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.05);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.06);
}

.cat-thumb img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.cat-meta {
  padding: 1.5rem;
  text-align: center;
}

.cat-name {
  font-size: 1.2rem;
  font-weight: 600;
}

.cat-count {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* Category page styles */
.category header h1 {
  font-size: 2.25rem;
  margin: 1.25rem 0 0.75rem;
  font-weight: 700;
}

.category-page-title {
  text-align: center;
  margin: 1.5rem 0 0.75rem;
}
.category-page-title h1 { margin:0; }

.category figure {
  margin: 0 0 1.25rem;
  display: block;
  text-align: center;
}
.category figure img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.category-description {
  margin-bottom: 1.5rem;
}
.category-desc-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--panel, #fff);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.04);
}
.category-desc-icon {
  font-size: 1.75rem;
  opacity: 0.85;
}
.category-desc-body .desc-heading {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* --- Article animations (non-intrusive) --- */

/* Reading progress bar: thin indicator at top of viewport */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #007bff, #00c6ff);
  z-index: 1400;
  transition: width 120ms linear;
}

/* reveal-on-scroll helper */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms ease-out, transform 480ms cubic-bezier(.2,.9,.2,1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* hero parallax (applies when .hero-parallax exists) */
.hero-parallax { will-change: transform; transform: translateY(0); transition: transform 160ms linear; }

/* aside card reveal */
.aside-card.hidden { opacity: 0; transform: translateY(14px); transition: opacity 420ms ease-out, transform 420ms cubic-bezier(.2,.9,.2,1); }

@media (prefers-reduced-motion: reduce) {
  .reading-progress, .reveal, .hero-parallax, .aside-card { transition: none !important; transform: none !important; }
}
.category-desc-body .subtitle {
  margin: 0;
  color: #6c757d;
}

.recent-articles h3 {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.recent-thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }

.recent-meta { padding: 1rem; }

.recent-title { font-size: 1.05rem; font-weight: 600; }
.recent-sub { font-size: 0.9rem; color: #6c757d; margin-top: 0.5rem; }

@media (max-width: 768px) {
  .category-desc-card { flex-direction: column; text-align: left; }
  .recent-thumb { height: 140px; }
}

/* Category hero: image in a box and copy next to it */
.category-hero {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.hero-img-box {
  flex: 0 0 320px;
  max-width: 45%;
  background: var(--panel, #fff);
  padding: 0.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-img-box img {
  width: 100%;
  height: auto;
  border-radius: 0.35rem;
  object-fit: cover;
}
.hero-copy {
  flex: 1 1 auto;
}
.hero-copy h1 {
  margin: 0 0 0.5rem 0;
}

@media (max-width: 900px) {
  .category-hero { flex-direction: column; }
  .hero-img-box { max-width: 100%; flex: none; }
}

/* Footer */
footer {
  background: #333;
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}

.fg-col {
  padding: 0 1rem;
}

.fg-left .site-info {
  font-weight: bold;
  margin-bottom: 1rem;
}

.footer-contact div {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #ccc;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.footer-nav a:hover {
  color: #007bff;
}

.fg-center {
  text-align: center;
}

.fg-right {
  text-align: right;
}

.credit {
  font-size: 0.9rem;
  color: #ccc;
}

.credit a {
  color: #fff;
  text-decoration: none;
}

.credit a:hover {
  text-decoration: underline;
}

.muted {
    color: #868e96;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .fg-right, .fg-center {
    text-align: center;
  }
  .footer-nav {
    margin: 1rem 0;
  }
}

.nav.admin-nav {
    float: right;
}

/* Article page styles */
.article-page {
  background: transparent;
}
.article-hero-panel {
  background: linear-gradient(180deg, rgba(0,0,0,0.02), transparent 40%);
  padding: 2rem 0 0;
}
.article-container {
  padding: 0 2rem;
}
.hero-center { display:flex; flex-direction:column; align-items:center; gap:1rem; }
.hero-wrap { position:relative; width:100%; max-width:900px; }
.hero-image { width:100%; height:auto; border-radius:0.6rem; box-shadow:0 18px 40px rgba(0,0,0,0.08); display:block; }
.hero-gloss { position:absolute; left:0; right:0; top:0; bottom:0; pointer-events:none; border-radius:0.6rem; }
.hero-meta-row-centered { display:flex; gap:1rem; align-items:center; justify-content:center; margin-top:0.75rem; flex-wrap:wrap; }
.category-pill { background:var(--panel,#fff); padding:6px 10px; border-radius:999px; font-size:0.9rem; text-decoration:none; color:var(--text,#333); border:1px solid rgba(0,0,0,0.04); }
.meta-authors-centered { display:flex; gap:0.5rem; align-items:center; }
.author-chip { display:flex; gap:0.5rem; align-items:center; background:var(--panel,#fff); padding:6px 8px; border-radius:999px; box-shadow:0 4px 12px rgba(0,0,0,0.04); }
.author-chip img { width:28px; height:28px; border-radius:50%; object-fit:cover; }
.avatar-fallback { width:28px; height:28px; border-radius:50%; background:#e9ecef; display:flex; align-items:center; justify-content:center; color:#6c757d; font-weight:600; }
.author-name { font-size:0.95rem; }

.article-body-grid { display:grid; grid-template-columns: 1fr 320px; gap:2.5rem; align-items:start; margin-top:1.5rem; }
.content { background:transparent; }
.hero-title-block { max-width:900px; margin: 1rem 0; }
.article-title { font-size:2rem; margin:0 0 0.5rem; }
.subtitle.article-sub { margin-top:0; color:#6c757d; }

.sidebar .aside-card { background:var(--panel,#fff); padding:1rem; border-radius:0.5rem; box-shadow:0 8px 20px rgba(0,0,0,0.04); margin-bottom:1rem; }
.attachments-list { list-style:none; padding:0; margin:0; }
.attachment-link { color:#007bff; text-decoration:none; }
.attachment-link:hover { text-decoration:underline; }

/* Aside hero image (placed above quick info) */
.aside-hero { padding:0; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.aside-hero img { width:100%; height:auto; display:block; border-radius:0.45rem; object-fit:cover; max-height:360px; }

/* clickable link wrapper for aside image */
.aside-hero-link { display:block; width:100%; height:100%; cursor:pointer; }
.aside-hero-link img { transition: transform 220ms ease, box-shadow 220ms ease; }
.aside-hero-link:hover img { transform: scale(1.02); box-shadow: 0 14px 34px rgba(0,0,0,0.08); }


.notes-section h3 { margin-top:1.25rem; }
.note-item { background:var(--panel,#fff); padding:0.75rem; border-radius:0.4rem; margin-bottom:0.75rem; box-shadow:0 4px 12px rgba(0,0,0,0.03); }
.note-top { display:flex; justify-content:space-between; align-items:center; }
.note-body { margin-top:0.5rem; }

@media (max-width: 900px) {
  .article-body-grid { grid-template-columns: 1fr; }
  .hero-wrap { max-width:100%; }
}

/* Contact page cards and grid */
.contact-page .page-head { text-align:left; margin: 1.25rem 0 1.25rem; }
.contact-page .page-head .lead { margin-top:0.25rem; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  align-items: start;
}

/* Contact hero panel */
.contact-hero { background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(250,250,250,0.9)); padding: 1rem 0; margin-bottom: 1rem; border-radius: 0.5rem; }
.contact-hero-inner { background: var(--panel,#fff); padding: 1.25rem 1.5rem; border-radius: 0.5rem; box-shadow: 0 8px 20px rgba(0,0,0,0.04); }
.contact-hero h1 { margin: 0 0 0.5rem; }
.contact-hero .lead { margin: 0; color: #6c757d; }

.contact-grid { margin-top: 1rem; }

.contact-card {
  background: var(--panel,#fff);
  padding: 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.contact-card h3 { margin-top:0; margin-bottom:0.5rem; }
.site-list { list-style:none; padding:0; margin:0; }
.site-list li { margin-bottom:0.35rem; }

.contact-form label { display:block; font-size:0.95rem; margin:0.5rem 0 0.25rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width:100%;
  padding:0.6rem 0.75rem;
  border-radius:0.45rem;
  border:1px solid rgba(0,0,0,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  font-size:0.95rem;
}
.contact-form textarea { resize:vertical; }
.contact-form .hero-cta { margin-top:0.5rem; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .aside-hero img { max-height:260px; }
}

/* Admin login supplemental styles */
.admin-login-wrap { background: linear-gradient(180deg,#f4f6fb,#f8fafc); }
.admin-card { border: 1px solid rgba(15,23,42,0.03); }



