/* ==========================================================================
   CSS SYSTEM DESIGN - JURNALHUB
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Brand Palette: bright white, navy, orange */
  --bg-primary: #ffffff;
  --bg-secondary: #f6f9fc;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  
  --border-color: rgba(8, 34, 64, 0.1);
  --border-hover: rgba(255, 112, 24, 0.5);
  
  --text-main: #0a2540;
  --text-muted: #5f6f82;
  --text-muted-dark: #8a96a5;
  
  /* Brand Accents */
  --primary-color: #ff7417;
  --primary-hover: #e85f00;
  --brand-blue: #0787dc;
  --brand-navy: #082240;
  --primary-glow: rgba(255, 113, 25, 0.28);
  
  --scopus-color: #10b981;
  --scopus-glow: rgba(16, 185, 129, 0.25);
  
  --sinta-color: #f59e0b;
  --sinta-glow: rgba(245, 158, 11, 0.25);
  
  --free-color: #ffb26b;
  
  --gradient-neon: linear-gradient(135deg, #ff7417 0%, #ff9b4a 100%);
  --gradient-blue: linear-gradient(135deg, #082240 0%, #0787dc 100%);
  --gradient-text: linear-gradient(135deg, #082240 0%, #0787dc 58%, #ff7417 100%);
  
  /* Layout utilities */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-backdrop: blur(12px);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 14px 38px rgba(8, 34, 64, 0.1), 0 4px 12px rgba(8, 34, 64, 0.06);
  --shadow-glow: 0 0 26px rgba(255, 113, 25, 0.16);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Helper Utilities */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: 112px;
  max-width: 42vw;
  max-height: 50px;
  height: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-text);
  transition: var(--transition-smooth);
}

.nav-link.active::after, .nav-link:hover::after {
  width: 100%;
}

.github-btn {
  background: rgba(8, 34, 64, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.github-btn:hover {
  background: var(--brand-navy);
  color: #fff;
  box-shadow: 0 0 15px rgba(8, 34, 64, 0.12);
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.sphere-1 {
  top: 10%;
  left: 15%;
  width: 300px;
  height: 300px;
  background: #ff7119;
}

.sphere-2 {
  bottom: 10%;
  right: 15%;
  width: 400px;
  height: 400px;
  background: #0787dc;
}

.hero-container {
  max-width: 800px;
  z-index: 2;
  position: relative;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 113, 25, 0.12);
  border: 1px solid rgba(255, 113, 25, 0.26);
  color: #ffb26b;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
}

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

/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-neon);
  color: #fff;
  border: none;
  box-shadow: 0 4px 18px rgba(255, 113, 25, 0.26);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(255, 113, 25, 0.38);
}

.btn-secondary {
  background: rgba(8, 34, 64, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(8, 34, 64, 0.08);
  border-color: rgba(8, 34, 64, 0.18);
  transform: translateY(-3px);
}

/* Search Section & Content Layout */
.search-section {
  padding: 5rem 2rem;
  background-color: var(--bg-secondary);
  position: relative;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Interactive Search Box */
.search-box-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  box-shadow: var(--shadow-md);
  margin-bottom: 2.5rem;
  transition: var(--transition-smooth);
}

.search-box-wrapper:focus-within {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.match-box-wrapper {
  scroll-margin-top: 5.5rem;
  background: linear-gradient(135deg, rgba(255, 116, 23, 0.1) 0%, rgba(7, 135, 220, 0.08) 100%);
  border: 1px solid rgba(255, 113, 25, 0.24);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.match-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.match-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffb26b;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.match-header h3 {
  font-size: 1.35rem;
  line-height: 1.3;
}

.match-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.match-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.match-field-wide {
  grid-column: 1 / -1;
}

.match-field label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.match-field input,
.match-field textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
  font: inherit;
  padding: 0.9rem 1rem;
  outline: none;
  transition: var(--transition-smooth);
}

.match-field textarea {
  resize: vertical;
  min-height: 105px;
}

.match-field input:focus,
.match-field textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 113, 25, 0.16);
}

.match-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.match-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.match-clear-btn {
  flex: 0 0 auto;
}

.match-results-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.match-result-card {
  border-color: rgba(255, 113, 25, 0.22);
  background: rgba(255, 255, 255, 0.96);
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  font-size: 1.25rem;
}

#searchInput {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  padding: 1.15rem 3rem 1.15rem 3.25rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1.05rem;
  font-family: var(--font-primary);
  outline: none;
  transition: var(--transition-smooth);
}

#searchInput:focus {
  border-color: var(--primary-color);
  background: #fff;
}

.clear-search-btn {
  position: absolute;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.2rem;
  transition: var(--transition-smooth);
}

.clear-search-btn:hover {
  color: var(--brand-navy);
}

/* Filter Group styling */
.filter-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-item select {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.1rem;
  padding-right: 2.5rem;
}

.filter-item select:focus {
  border-color: var(--primary-color);
}

.filter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(8, 34, 64, 0.08);
  padding-top: 1.5rem;
}

/* Custom Checkbox */
.checkbox-wrapper {
  display: flex;
  align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  user-select: none;
  transition: var(--transition-smooth);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-label {
  color: var(--text-main);
}

.custom-checkbox {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: transparent;
  transition: var(--transition-smooth);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-label .custom-checkbox {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-main);
  box-shadow: 0 0 10px rgba(255, 113, 25, 0.35);
}

.reset-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.reset-btn:hover {
  color: #ef4444;
}

/* Meta Results Bar */
.results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.results-count {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.view-toggle {
  display: flex;
  background: rgba(8, 34, 64, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.view-btn.active, .view-btn:hover {
  color: var(--text-main);
  background: rgba(255, 116, 23, 0.12);
}

/* Results Grid Display */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  transition: var(--transition-smooth);
}

/* List view support style */
.results-grid.list-view {
  grid-template-columns: 1fr;
}

/* Card Component */
.journal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
}

.journal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  transition: var(--transition-smooth);
}

.journal-card.scopus-card::before {
  background: var(--scopus-color);
}

.journal-card.sinta-card::before {
  background: var(--sinta-color);
}

.journal-card:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.journal-card.scopus-card:hover {
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.1);
}

.journal-card.sinta-card:hover {
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.card-badge-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.card-type-tag {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 30px;
}

.type-scopus {
  background: rgba(16, 185, 129, 0.1);
  color: var(--scopus-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.type-sinta {
  background: rgba(245, 158, 11, 0.1);
  color: var(--sinta-color);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.rank-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
}

.rank-q1 { background: #059669; }
.rank-q2 { background: #2563eb; }
.rank-q3 { background: #d97706; }
.rank-q4 { background: #4b5563; }
.rank-s1 { background: #d97706; }
.rank-s2 { background: #d97706; }
.rank-s3 { background: #4b5563; }
.rank-s4 { background: #4b5563; }
.rank-s5 { background: #4b5563; }
.rank-s6 { background: #4b5563; }

.card-body {
  flex-grow: 1;
}

.journal-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journal-publisher {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.match-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(255, 113, 25, 0.34);
  border-radius: 12px;
  color: #ffcfad;
  background: rgba(255, 113, 25, 0.13);
  font-weight: 800;
}

.match-score-number {
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
}

.match-score-label {
  color: #ffcfad;
  font-size: 0.78rem;
  line-height: 1;
  text-transform: uppercase;
}

.journal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(8, 34, 64, 0.08);
}

.meta-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
}

.meta-label {
  color: var(--text-muted);
}

.meta-value {
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.meta-apc {
  color: var(--free-color);
  font-weight: 700;
}

.meta-apc.paid {
  color: #f87171;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.journal-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.journal-link:hover {
  color: var(--primary-hover);
  transform: translateX(3px);
}

/* Card List Layout Override */
.results-grid.list-view .journal-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
}

.results-grid.list-view .journal-card::before {
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.results-grid.list-view .card-body {
  max-width: 60%;
}

.results-grid.list-view .card-meta-details {
  border-top: none;
  padding-top: 0;
  min-width: 200px;
}

/* Empty State Styling */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 350px;
}

/* Statistics Section */
.stats-section {
  padding: 4rem 2rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
  font-size: 2.25rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Info Section (Callout) */
.info-section {
  padding: 5rem 2rem;
  background: var(--bg-secondary);
}

.info-card {
  background: linear-gradient(135deg, rgba(255, 113, 25, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 113, 25, 0.18);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.info-content h3 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.info-content p {
  color: var(--text-muted);
  max-width: 600px;
}

/* Footer styling */
.footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  text-align: center;
  max-width: 500px;
  margin: 0 auto 3rem;
}

.footer-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-brand-logo {
  display: block;
  width: 280px;
  max-width: 80vw;
  height: auto;
  object-fit: contain;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid rgba(8, 34, 64, 0.08);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted-dark);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */

@media (max-width: 1024px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    width: 100%;
  }

  .navbar {
    max-width: 100vw;
  }

  .nav-container {
    padding: 0.7rem 1rem;
  }

  .nav-logo {
    min-width: 0;
  }

  .brand-logo {
    width: 96px;
    max-width: 54vw;
    max-height: 44px;
  }

  .nav-links {
    display: none; /* Hide standard nav list for mobile toggle */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1rem;
    gap: 1.5rem;
    align-items: flex-start;
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero-section {
    min-height: auto !important;
    padding: 6rem 1rem 3rem !important;
  }

  .hero-container {
    width: 100%;
    max-width: 100%;
  }

  .hero-tagline {
    max-width: 100%;
    justify-content: center;
    white-space: normal;
    line-height: 1.4;
    text-transform: none;
  }

  .hero-title {
    font-size: 2.15rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .search-section {
    padding: 3rem 1rem;
  }

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

  .section-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .search-box-wrapper {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .match-box-wrapper {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  .match-header {
    flex-direction: column;
  }

  .match-header h3 {
    font-size: 1.15rem;
  }

  .match-form {
    grid-template-columns: 1fr;
  }

  .match-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .match-actions .btn,
  .match-clear-btn {
    width: 100%;
    justify-content: center;
  }

  .match-results-grid {
    grid-template-columns: 1fr;
  }

  #searchInput {
    font-size: 0.95rem;
    padding: 1rem 2.75rem 1rem 2.9rem;
  }
  
  .filter-group {
    grid-template-columns: 1fr;
  }
  
  .filter-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .filter-footer > div {
    flex-direction: column;
    gap: 1rem !important;
  }

  .checkbox-label {
    align-items: flex-start;
    line-height: 1.4;
  }

  .reset-btn {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
  }

  .results-meta {
    gap: 1rem;
    align-items: flex-start;
    flex-direction: column;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .journal-card {
    padding: 1.25rem;
  }
  
  .results-grid.list-view .journal-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .results-grid.list-view .card-body {
    max-width: 100%;
  }

  .card-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .journal-title {
    font-size: 1rem;
    -webkit-line-clamp: 3;
  }

  .journal-desc {
    -webkit-line-clamp: 4;
  }

  .meta-detail-row {
    flex-direction: column;
    gap: 0.15rem;
  }

  .meta-value {
    text-align: left;
  }
  
  .stats-grid {
    width: 100% !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    margin-top: 0 !important;
  }

  .stat-card {
    padding: 1.25rem;
  }

  .stat-value {
    font-size: 2rem;
  }
  
  .info-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem;
  }

  .footer {
    padding: 3rem 1rem 1.5rem;
  }

  .access-modal {
    padding: 1.5rem;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .btn {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  .search-box-wrapper {
    padding: 1rem;
  }

  .card-type-tag,
  .rank-badge {
    font-size: 0.68rem;
  }

  .access-modal {
    padding: 1.25rem;
  }
}

/* Mini Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.journal-card {
  animation: fadeIn 0.4s ease forwards;
}

.access-locked {
  overflow: hidden;
}

.match-reason {
  margin: 0.75rem 0 1.25rem;
  padding: 0.75rem;
  border-left: 3px solid var(--primary-color);
  border-radius: var(--radius-sm);
  background: rgba(255, 116, 23, 0.08);
  color: var(--text-main);
  font-size: 0.86rem;
  line-height: 1.5;
}

.access-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 34, 64, 0.28);
  backdrop-filter: blur(10px);
}

.access-overlay.is-hidden {
  display: none;
}

.access-modal {
  width: min(100%, 420px);
  padding: 2rem;
  border: 1px solid rgba(8, 34, 64, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(8, 34, 64, 0.2);
}

.access-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient-neon);
}

.access-modal h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.access-modal p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.access-modal label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 700;
}

.access-modal input {
  width: 100%;
  min-height: 3rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-main);
  font: inherit;
}

.access-modal input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 113, 25, 0.18);
}

.access-modal .btn {
  width: 100%;
  justify-content: center;
}

.access-modal .btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.access-help {
  margin: 1rem 0 0 !important;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

.access-help a {
  color: var(--primary-color);
  font-weight: 700;
  text-decoration: none;
}

.access-help a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.access-error {
  min-height: 1.25rem;
  margin: 1rem 0 0;
  color: #f87171 !important;
  font-size: 0.9rem;
  font-weight: 600;
}


