/* ============================================
   PANAMA RAILROAD HISTORY - MAIN STYLESHEET
   Refined Panama Palette: Muted Navy, Subtle Red Accent, Clean Whites
   ============================================ */

/* Root variables */
:root {
  --navy: #1e3a5f;
  --gold: #b52a37;
  --cream: #fafbfd;
  --dark-text: #2c3e50;
  --accent-green: #152d4a;
  --light-gray: #f0f2f5;
  --border-gray: #e1e4e8;
  --accent-light: #e8edf3;

  --font-serif: 'Libre Baskerville', Georgia, "Times New Roman", serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Spectral', Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --transition: all 0.3s ease;
  --shadow-sm: 0 1px 4px rgba(30, 58, 95, 0.06);
  --shadow-md: 0 3px 10px rgba(30, 58, 95, 0.08);
  --shadow-lg: 0 6px 20px rgba(30, 58, 95, 0.1);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark-text);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark-text);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.1rem; }

p {
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
}

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

a:hover {
  color: var(--gold);
}

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

ul li, ol li {
  margin-bottom: 0.75rem;
}

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

button {
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-sm {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  min-height: calc(100vh - 200px);
}

/* ============================================
   NAVIGATION
   ============================================ */

nav {
  background-color: var(--navy);
  color: #fff;
  padding: 0.85rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-logo {
  height: 38px;
  width: auto;
  border-radius: 4px;
  object-fit: contain;
}

.nav-logo-fdp {
  height: 38px;
  border-radius: 4px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 0;
}

.brand-prr {
  font-family: 'IM Fell English SC', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-history {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}

.nav-brand:hover .brand-prr {
  color: var(--gold);
}

.nav-brand:hover .brand-history {
  color: rgba(255,255,255,0.8);
}

.nav-icon {
  font-size: 1.8rem;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  flex: 1;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--cream);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.search-icon,
.menu-icon {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

.search-icon:hover,
.menu-icon:hover {
  color: var(--gold);
  transform: none;
}

.lang-switch {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 1.5rem;
}

.lang-switch button {
  background: none;
  border: none;
  color: var(--cream);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switch button.active {
  color: var(--gold);
}

.lang-switch button:hover {
  color: var(--gold);
  transform: none;
}

.mobile-menu {
  display: none;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu.active + .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--navy);
    padding: 1rem;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links a {
    padding: 0.75rem;
  }

  .lang-switch {
    border-left: none;
    padding-left: 0;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: url('../images/prr903b.jpg') center center / cover no-repeat;
  color: #fff;
  padding: 6rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(160deg, rgba(30, 58, 95, 0.82) 0%, rgba(21, 45, 74, 0.75) 50%, rgba(26, 51, 85, 0.85) 100%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(21, 45, 74, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  animation: fadeInUp 0.8s ease;
}

.hero h1 {
  color: var(--cream);
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  font-size: 3.2rem;
  font-family: 'IM Fell English SC', Georgia, serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.2;
}

.hero p {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-style: italic;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
  line-height: 1.7;
  color: rgba(245, 240, 232, 0.95);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.875rem 2rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 4px;
  transition: var(--transition);
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--gold);
  color: var(--dark-text);
}

.btn-primary:hover {
  background-color: #c9985a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--cream);
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
  background-color: var(--gold);
  color: var(--dark-text);
  transform: translateY(-2px);
}

.btn-secondary:active,
.btn-secondary.active {
  background-color: var(--gold);
  color: var(--dark-text);
}

/* ============================================
   ARTICLE GRID & CARDS
   ============================================ */

.articles-section {
  padding: 4rem 1.5rem;
  background-color: var(--cream);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  margin-bottom: 1rem;
  color: var(--navy);
}

.section-header p {
  color: #666;
  font-size: 1rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.article-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  height: 100%;
  border: 1px solid var(--border-gray);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.12);
}

.article-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(145deg, #e8edf3 0%, #dce3ed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.article-card-image.img-failed {
  background: linear-gradient(145deg, #e8edf3 0%, #dce3ed 100%);
}

.article-card-image.img-failed::after {
  content: '';
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%231e3a5f' opacity='0.3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4H5C3.34 4 2 5.34 2 7v8h2c0 1.66 1.34 3 3 3s3-1.34 3-3h4c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4h-4V4zm-5 2h3v3H5V6h2zm-2 9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm12 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm1-5h-2V8h.5l1.5 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.article-card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-card-category {
  display: inline-block;
  background-color: var(--accent-green);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.article-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.article-card p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.article-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #999;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--light-gray);
}

.article-card-date {
  font-weight: 500;
}

.article-card-read {
  color: var(--gold);
  font-weight: 600;
}

/* ============================================
   ARTICLE DETAIL
   ============================================ */

.article-detail {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.article-detail-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--light-gray);
}

.article-detail h1 {
  color: var(--navy);
  margin-bottom: 1rem;
}

.article-detail-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: #666;
}

.article-detail-category {
  background-color: var(--accent-green);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  width: fit-content;
}

.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-image {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--light-gray);
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-image:hover img {
  transform: scale(1.05);
}

.gallery-image::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: var(--transition);
  font-size: 2rem;
}

.gallery-image:hover::after {
  background: rgba(0, 0, 0, 0.3);
}

.article-content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--navy);
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--accent-green);
}

.article-content blockquote {
  border-left: 4px solid var(--gold);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #666;
  font-size: 1.1rem;
}

.article-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--light-gray);
}

.article-actions button {
  flex: 1;
  background-color: var(--navy);
  color: var(--cream);
  padding: 0.875rem 1.5rem;
}

.article-actions button:hover {
  background-color: var(--accent-green);
}

/* ============================================
   TIMELINE
   ============================================ */

.timeline-section {
  padding: 4rem 1.5rem;
  background-color: white;
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--navy) 0%, var(--accent-green) 100%);
  opacity: 0.25;
}

.timeline-item {
  margin-bottom: 3.5rem;
  position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  margin-right: 54%;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 54%;
  margin-right: 0;
}

/* Year badge — prominent pill on the center line */
.timeline-year-badge {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-sans);
  padding: 0.35rem 1.1rem;
  border-radius: 20px;
  z-index: 3;
  letter-spacing: 0.5px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.25);
}

.timeline-marker {
  position: absolute;
  left: 50%;
  top: 2.4rem;
  transform: translateX(-50%);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--navy);
}

.timeline-content {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  border: 1px solid var(--border-gray);
  margin-top: 1rem;
}

.timeline-content:hover {
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.1);
  transform: translateY(-2px);
}

.timeline-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--light-gray);
}

.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.timeline-text {
  padding: 1.25rem 1.5rem;
}

.timeline-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}

.timeline-content p {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }

  .timeline-year-badge {
    left: 20px;
    transform: translateX(-50%);
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
  }

  .timeline-marker {
    left: 20px;
  }

  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 55px;
    margin-right: 0;
  }

  .timeline-image {
    height: 140px;
  }
}

/* ============================================
   SEARCH
   ============================================ */

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 1000;
  padding-top: 2rem;
  overflow-y: auto;
}

.search-overlay.active {
  display: flex;
}

.search-container {
  width: 90%;
  max-width: 600px;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.25rem;
  border: none;
  border-radius: 8px;
  background: white;
  color: var(--dark-text);
}

.search-input:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.search-results {
  width: 90%;
  max-width: 600px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  max-height: 70vh;
  overflow-y: auto;
}

.search-result-item {
  padding: 1.5rem;
  border-bottom: 1px solid var(--light-gray);
  cursor: pointer;
  transition: var(--transition);
}

.search-result-item:hover {
  background-color: var(--light-gray);
  transform: translateX(4px);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.search-result-excerpt {
  font-size: 0.95rem;
  color: #666;
}

.search-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

/* ============================================
   CATEGORIES & FILTERS
   ============================================ */

.category-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: center;
}

.category-pill {
  padding: 0.625rem 1.25rem;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
  background-color: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}

/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--navy);
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb .separator {
  color: #ccc;
}

.breadcrumb .current {
  color: #666;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.about-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3rem;
}

.about-content h2 {
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.tribute-section {
  background: linear-gradient(135deg, #f8f6f2 0%, #faf9f7 50%, #f5f2ed 100%);
  border: 1px solid #e2ddd5;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  position: relative;
  margin-top: 1rem;
}

.tribute-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}

.tribute-badge svg {
  flex-shrink: 0;
}

.tribute-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.tribute-section p {
  color: #4a4a4a;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.tribute-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
  padding: 0.75rem 1.5rem;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.tribute-link:hover {
  background: #152d4a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 58, 95, 0.3);
}

.tribute-link svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.tribute-link:hover svg {
  transform: translate(2px, -2px);
}

/* Bibliography section */
.bibliography-section h2 {
  font-family: 'IM Fell English SC', Georgia, serif;
  margin-bottom: 0.5rem;
}

.bibliography-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.bib-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border-gray);
  border-left: 4px solid var(--navy);
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-left-color 0.25s ease;
}

.bib-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(30, 58, 95, 0.12);
  border-left-color: var(--gold);
}

.bib-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.bib-card:hover h3 {
  color: var(--gold);
}

.bib-card p {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 600px) {
  .bibliography-grid {
    grid-template-columns: 1fr;
  }
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 8px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-serif);
}

.stat-label {
  font-size: 0.95rem;
  color: #666;
  margin-top: 0.5rem;
}

/* ============================================
   MAP SECTION
   ============================================ */

.map-section {
  margin: 3rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-placeholder {
  width: 100%;
  height: 500px;
  background: linear-gradient(135deg, var(--light-gray), #f0f0f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #999;
}

@media (max-width: 600px) {
  .map-placeholder {
    height: 300px;
  }
}

/* ============================================
   SHOP SECTION
   ============================================ */

.shop-section {
  padding: 4rem 1.5rem;
  background-color: white;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.shop-card {
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
  text-align: center;
}

.shop-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.shop-image {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, var(--navy), var(--accent-green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 4rem;
}

.shop-content {
  padding: 1.5rem;
}

.shop-card h3 {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.shop-card p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

.shop-price {
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 1rem;
}

.shop-card .btn {
  width: 100%;
  background-color: var(--navy);
  color: var(--cream);
}

.shop-card .btn:hover {
  background-color: var(--gold);
  color: var(--dark-text);
}

.shop-hero-banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto 2.5rem;
}

@media (max-width: 768px) {
  .shop-hero-banners {
    grid-template-columns: 1fr;
    max-width: 450px;
  }
}

.shop-hero-banner {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.shop-hero-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.coming-soon-message {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.coming-soon-message p {
  font-size: 1.05rem;
  color: #666;
  line-height: 1.7;
}

.shop-placeholder {
  text-align: center;
  padding: 3rem;
  background: var(--light-gray);
  border-radius: 8px;
  margin: 2rem 0;
}

.shop-placeholder-text {
  font-size: 1.1rem;
  color: #666;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.newsletter-section {
  background: linear-gradient(135deg, var(--navy) 0%, #152d4a 100%);
  color: var(--cream);
  padding: 3rem 1.5rem;
}

.newsletter-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-section h2 {
  color: var(--cream);
  margin-bottom: 1rem;
}

.newsletter-section p {
  color: rgba(245, 240, 232, 0.9);
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-sans);
}

.newsletter-form input::placeholder {
  color: #999;
}

.newsletter-form input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.newsletter-form button {
  background-color: var(--gold);
  color: var(--dark-text);
  padding: 0.875rem 2rem;
  font-weight: 600;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background-color: #c9985a;
}

.newsletter-message {
  font-size: 0.95rem;
  color: rgba(245, 240, 232, 0.8);
}

.newsletter-message.success {
  color: #90EE90;
  font-weight: 600;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.sidebar h3 {
  color: var(--navy);
  border-bottom: 2px solid var(--light-gray);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar li {
  margin-bottom: 0.75rem;
}

.sidebar a {
  display: block;
  padding: 0.75rem;
  color: var(--navy);
  border-radius: 4px;
  transition: var(--transition);
}

.sidebar a:hover {
  background-color: var(--light-gray);
  color: var(--gold);
  padding-left: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--navy);
  color: var(--cream);
  padding: 3rem 1.5rem 1rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 2rem;
}

.footer-column h4 {
  font-family: 'IM Fell English SC', Georgia, serif;
  color: var(--gold);
  margin-bottom: 1rem;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li {
  margin-bottom: 0.75rem;
}

.footer-column a {
  color: rgba(245, 240, 232, 0.8);
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.7);
}

.footer-social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--cream);
  transition: var(--transition);
  font-size: 1.25rem;
}

.footer-social a:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

/* ============================================
   LIGHTBOX / MODAL
   ============================================ */

.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.lightbox-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  transition: var(--transition);
}

.lightbox-close:hover {
  background: var(--gold);
  color: var(--navy);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 4px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2001;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--gold);
  color: var(--dark-text);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  z-index: 99;
}

.scroll-to-top.visible {
  display: flex;
  animation: slideUp 0.3s ease;
}

.scroll-to-top:hover {
  background-color: var(--navy);
  color: var(--cream);
  transform: translateY(-4px);
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

.view {
  animation: fadeInUp 0.4s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .view {
    animation: none;
  }
}

/* ============================================
   DYNAMIC VIEW LAYOUTS (generated by app.js)
   ============================================ */

/* All views: consistent container padding */
.view {
  padding: 0;
}

.view-home {
  padding: 0;
}

/* Stats bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2.5rem 1.5rem;
  background-color: var(--navy);
  color: var(--cream);
  flex-wrap: wrap;
}

.stats-bar .stat {
  text-align: center;
}

.stats-bar .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--font-serif);
}

.stats-bar .stat-label {
  font-size: 0.95rem;
  color: rgba(245, 240, 232, 0.85);
  margin-top: 0.25rem;
}

/* Featured articles section */
.featured-articles {
  padding: 4rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* Section footer (see all button) */
.section-footer {
  text-align: center;
  margin-top: 2.5rem;
}

/* Categories showcase */
.categories-showcase {
  padding: 4rem 1.5rem;
  background-color: white;
  max-width: 1300px;
  margin: 0 auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  display: block;
  background: var(--cream);
  padding: 1.5rem;
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--dark-text);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--dark-text);
}

.category-card .category-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.category-card h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.category-card .category-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.category-card .category-desc {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0;
}

/* Full category cards (Categories page) */
.categories-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.category-card-full {
  display: block;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--dark-text);
  border: 1px solid var(--border-gray);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card-full:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30, 58, 95, 0.12);
  color: var(--dark-text);
}

.category-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
  background: var(--light-gray);
}

.category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.category-card-full:hover .category-card-image img {
  transform: scale(1.05);
}

.category-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  display: flex;
  justify-content: flex-end;
}

.category-card-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.35);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

.category-card-body {
  padding: 1.25rem 1.5rem;
}

.category-card-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
  font-family: var(--font-serif);
}

.category-card-body p {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 768px) {
  .categories-grid-full {
    grid-template-columns: 1fr;
    padding: 0 1rem 2rem;
  }

  .category-card-image {
    height: 150px;
  }
}

/* Newsletter CTA (inside home view) */
.newsletter-cta {
  padding: 4rem 1.5rem;
  background: linear-gradient(135deg, var(--navy) 0%, #152d4a 100%);
  color: var(--cream);
  text-align: center;
}

.newsletter-cta h3 {
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.newsletter-cta p {
  color: rgba(245, 240, 232, 0.9);
  margin-bottom: 1.5rem;
}

.newsletter-cta .newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

/* View header (for articles list, categories, etc.) */
.view-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  max-width: 700px;
  margin: 0 auto;
}

.view-header h1 {
  font-family: 'IM Fell English SC', Georgia, serif;
  color: var(--navy);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.view-header p {
  font-family: var(--font-body);
  font-style: italic;
  color: #666;
}

/* Articles view */
.view-articles {
  padding-bottom: 4rem;
}

.view-articles .articles-grid {
  padding: 0 1.5rem;
}

/* Article filters */
.article-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.filter-pill {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-pill:hover,
.filter-pill.active {
  background-color: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}

/* Load more container */
.load-more-container {
  text-align: center;
  margin-top: 2.5rem;
  padding: 0 1.5rem;
}

/* No results */
.no-results {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #999;
  font-size: 1.1rem;
}

/* Article images - fix for cards */
.article-card-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.article-card-image .image-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(145deg, #e8edf3 0%, #dce3ed 100%);
  color: var(--navy);
  opacity: 0.5;
}

/* Article category tag in cards */
.article-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  width: fit-content;
}

/* Photo count in cards */
.photo-count {
  font-size: 0.85rem;
  color: #999;
  margin-top: auto;
}

/* Article detail view */
.view-article-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.view-article-detail .breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.view-article-detail .breadcrumb a {
  color: var(--gold);
}

.view-article-detail .article-content {
  background: white;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.view-article-detail .article-header h1 {
  color: var(--navy);
  margin-bottom: 1rem;
}

.view-article-detail .article-meta {
  margin-bottom: 2rem;
}

.view-article-detail .category-tag {
  display: inline-block;
  background-color: var(--accent-green);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
  margin-right: 1rem;
}

.view-article-detail .reading-time {
  display: inline-block;
  color: #888;
  font-size: 0.9rem;
  font-style: italic;
}

.view-article-detail .article-hero {
  margin-bottom: 2rem;
}

.view-article-detail .article-hero-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.view-article-detail .article-hero-placeholder {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--navy), var(--accent-green));
  border-radius: 8px;
}

.view-article-detail .article-body {
  font-size: 1.0625rem;
  line-height: 1.85;
}

.view-article-detail .article-body p {
  margin-bottom: 1.25rem;
}

/* Article gallery */
.view-article-detail .article-gallery {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--light-gray);
}

.view-article-detail .article-gallery h3 {
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.view-article-detail .gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.view-article-detail .gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--light-gray);
}

.view-article-detail .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.view-article-detail .gallery-item:hover img {
  transform: scale(1.05);
}

.view-article-detail .gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Article sources */
.view-article-detail .article-sources {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--light-gray);
}

.view-article-detail .article-sources h3 {
  color: var(--navy);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

/* Related articles */
.view-article-detail .article-related {
  margin-top: 3rem;
}

.view-article-detail .article-related h3 {
  color: var(--navy);
  margin-bottom: 1.5rem;
}

/* Article footer / back button */
.view-article-detail .article-footer {
  margin-top: 3rem;
  text-align: center;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--navy);
  color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--cream);
}

/* Timeline view */
.view-timeline {
  padding-bottom: 4rem;
}

.view-timeline .timeline {
  padding: 0 1.5rem;
}

/* Categories view */
.view-categories {
  padding-bottom: 4rem;
}

.view-categories .categories-grid {
  padding: 0 1.5rem;
}

/* Category articles view */
.view-category-articles {
  padding-bottom: 4rem;
}

.view-category-articles .articles-grid {
  padding: 0 1.5rem;
}

/* About view */
.view-about {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.view-about .about-card {
  background: white;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.view-about .about-card h2 {
  color: var(--navy);
  margin-bottom: 1rem;
}

/* ============================================
   COMMENTS SECTION
   ============================================ */
.comments-section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.comments-section h3 {
  font-family: 'IM Fell English SC', Georgia, serif;
  color: var(--navy);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-gray);
}

.comment-count {
  font-family: var(--font-body);
  font-weight: 400;
  color: #999;
  font-size: 0.9em;
}

/* Comment form (logged in) */
.comment-form-logged {
  margin-bottom: 2rem;
}

.comment-user-info {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.comment-logout-btn {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
  margin-left: 0.5rem;
  text-decoration: underline;
}

.comment-logout-btn:hover {
  color: #8b1a2b;
}

.comment-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.3s ease;
}

.comment-textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.comment-submit-btn {
  margin-top: 0.75rem;
}

/* Auth prompt (not logged in) */
.comment-auth-prompt {
  text-align: center;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: 10px;
  margin-bottom: 2rem;
}

.comment-auth-prompt p {
  margin-bottom: 1rem;
  color: #555;
}

.comment-auth-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Comments list */
.comments-list {
  margin-top: 1rem;
}

.no-comments {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 1.5rem 0;
}

.comment-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-gray);
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.comment-author {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--navy);
}

.comment-date {
  font-size: 0.8rem;
  color: #999;
}

.comment-text {
  font-family: var(--font-body);
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--dark-text);
  margin: 0;
}

/* ============================================
   AUTH MODAL (Register / Login)
   ============================================ */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.auth-modal {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  text-align: center;
}

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

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

.auth-modal-close:hover {
  color: var(--dark-text);
}

.auth-modal-icon {
  margin-bottom: 1rem;
}

.auth-modal-icon svg {
  stroke: var(--navy);
}

.auth-modal h2 {
  font-family: 'IM Fell English SC', Georgia, serif;
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.auth-modal-desc {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.auth-form {
  text-align: left;
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-field label {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 0.35rem;
}

.auth-field input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.auth-submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.8rem;
  font-size: 1rem;
}

.auth-switch {
  margin-top: 1.25rem;
  font-size: 0.88rem;
  color: #777;
}

.auth-switch a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  color: var(--gold);
  text-decoration: underline;
}

@media (max-width: 600px) {
  .comments-section {
    padding: 1.25rem;
    margin: 2rem 0.5rem;
  }
  .comment-auth-buttons {
    flex-direction: column;
  }
  .auth-modal {
    padding: 2rem 1.5rem;
  }
}

/* Videos view */
.view-videos {
  padding-bottom: 4rem;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.video-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

.video-thumb-link {
  display: block;
  text-decoration: none;
}

.video-thumb {
  position: relative;
  overflow: hidden;
}

.video-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
  filter: brightness(0.75);
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.video-card:hover .video-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-title {
  padding: 1rem 1.2rem;
  font-size: 1.05rem;
  color: #1a1a2e;
  font-weight: 600;
  line-height: 1.4;
}

.videos-channel-cta {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5e 100%);
  border-radius: 16px;
  color: #fff;
}

.videos-channel-cta p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  opacity: 0.9;
  line-height: 1.6;
}

.videos-channel-btn {
  display: inline-flex;
  align-items: center;
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.videos-channel-btn:hover {
  background: #e74c3c;
  transform: scale(1.05);
  color: #fff;
}

@media (max-width: 768px) {
  .videos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Shop view */
.view-shop {
  padding-bottom: 4rem;
}

.view-shop .shop-grid {
  padding: 0 1.5rem;
}

.view-shop .shop-coming-soon {
  max-width: 600px;
  margin: 0 auto 3rem;
  text-align: center;
  padding: 2rem;
  background: var(--light-gray);
  border-radius: 8px;
}

.placeholder-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-gray);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.product-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--light-gray);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.4s ease;
  padding: 0.5rem;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-card h3 {
  padding: 1rem 1.2rem 0.25rem;
  font-size: 1.05rem;
  color: var(--dark-text);
}

.product-card .product-desc {
  padding: 0 1.2rem;
  font-size: 0.88rem;
  color: #666;
  line-height: 1.5;
}

.product-card .product-price {
  padding: 0.5rem 1.2rem 1.2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

@media (max-width: 768px) {
  .placeholder-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
  }
  .product-image {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .placeholder-products {
    grid-template-columns: 1fr;
  }
}

/* Search results in overlay */
.search-results .articles-grid {
  padding: 1rem;
  gap: 1rem;
}

.search-results .article-card-image img {
  height: 150px;
}

.search-results-count {
  padding: 1rem 1.5rem;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--light-gray);
}

/* Lightbox created by JS */
#lightbox-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  pointer-events: none;
}

#lightbox-container .lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  z-index: 2000;
}

#lightbox-container .lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-container .lightbox-content {
  text-align: center;
}

#lightbox-container .lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}

#lightbox-container .lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

#lightbox-container .lightbox-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

#lightbox-container .lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

#lightbox-container .lightbox-counter {
  color: white;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .stats-bar {
    gap: 1.5rem;
    padding: 2rem 1rem;
  }

  .stats-bar .stat-number {
    font-size: 1.75rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .view-article-detail .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .view-article-detail .article-content {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .view-article-detail .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }

.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

.inline-block { display: inline-block; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }

.text-muted { color: #999; }
.text-dark { color: var(--dark-text); }
.text-light { color: rgba(0, 0, 0, 0.6); }

.bg-light { background-color: var(--light-gray); }
.bg-navy { background-color: var(--navy); }
.bg-gold { background-color: var(--gold); }
.bg-green { background-color: var(--accent-green); }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .container {
    padding: 0 1.25rem;
  }

  .articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  h1 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
  h2 { font-size: clamp(1.3rem, 4vw, 2rem); }
  h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); }

  p { font-size: 1rem; }

  .hero {
    padding: 4rem 1.5rem;
    min-height: 350px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .search-results {
    width: 95%;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .scroll-to-top {
    width: 45px;
    height: 45px;
    right: 1rem;
    bottom: 1rem;
    font-size: 1.25rem;
  }

  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .nav-links {
    gap: 1rem;
  }

  .container,
  .container-sm {
    padding: 0 1rem;
  }

  .hero {
    padding: 2.5rem 1rem;
    min-height: 300px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .articles-grid {
    gap: 1rem;
  }

  .article-card {
    border-radius: 6px;
  }

  .article-card-image {
    height: 200px;
  }

  .article-detail {
    padding: 1rem;
  }

  .about-section {
    padding: 2rem 1rem;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .scroll-to-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ============================================
   PRINT STYLESHEET
   ============================================ */

@media print {
  nav,
  .newsletter-section,
  .scroll-to-top,
  .search-overlay {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
  }

  .article-detail {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .btn,
  .article-actions {
    display: none;
  }

  .article-card {
    page-break-inside: avoid;
  }

  footer {
    background: white;
    color: black;
    border-top: 2px solid black;
  }

  .footer-column h4 {
    color: black;
  }

  .footer-social {
    display: none;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  button {
    border: 2px solid currentColor;
  }

  a {
    text-decoration: underline;
  }

  .article-card {
    border: 2px solid var(--dark-text);
  }
}

/* Focus styles for keyboard navigation */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--dark-text);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  z-index: 100;
}

.skip-to-main:focus {
  top: 0;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumbs {
  padding: 1rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: #888;
}

.breadcrumbs a {
  color: var(--navy);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.breadcrumbs a:hover {
  opacity: 1;
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 0.5rem;
  opacity: 0.4;
}

.breadcrumb-current {
  color: var(--dark-text);
  font-weight: 500;
}

/* ============================================
   RELATED ARTICLES
   ============================================ */

.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-gray);
}

.related-articles h3 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
