/* Color Palette */
:root {
  --navy-blue: #111188;
  --navy-blue-dark: #0a0a55;
  --gold-primary: #f5b800;
  --gold-light: #ffd24d;
  --off-white: #fbfbf9;
  --white: #ffffff;
  --text-main: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;

  --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
  --font-sans: "Open Sans", Arial, sans-serif;
}

/* Base Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-serif);
  color: var(--text-main);
  background-color: var(--off-white);
  line-height: 1.6;
}

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

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

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

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}
.full-width {
  width: 100%;
  display: inline-block;
}
.bg-offwhite {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
}

/* Main Layout Grid */
.main-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 40px;
  padding: 40px 20px;
}

/* Shared Sections & Components */
.section-title {
  font-size: 1.8rem;
  color: var(--navy-blue);
  margin-bottom: 10px;
  font-family: var(--font-serif);
}

.section-divider {
  border: 0;
  border-top: 3px solid var(--gold-primary);
  margin-bottom: 30px;
}

.article-section {
  margin-bottom: 40px;
}
.article-section h2 {
  color: var(--navy-blue);
  margin-bottom: 20px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}
.article-section h3 {
  margin: 20px 0 10px 0;
  font-size: 1.2rem;
}
.article-section p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  text-align: justify;
}

/* Standard Article Lists (Unordered and Ordered) */
.article-section ul,
.article-section ol {
  margin-left: 20px;
  margin-bottom: 20px;
  font-size: 1.1rem; /* Matches the article-section p font size */
  color: var(--text-main);
}

.article-section li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Nested lists (if you ever need them) */
.article-section ul ul,
.article-section ol ol,
.article-section ul ol,
.article-section ol ul {
  margin-top: 8px;
  margin-bottom: 0;
}

.article-divider {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 40px 0;
}

.toc-list {
  list-style: none;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  margin-top: 8px;
}
.toc-list li {
  margin-bottom: 8px;
}
.toc-list a {
  color: var(--text-main);
}
.toc-list a:hover {
  color: var(--navy-blue);
  font-weight: 600;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-weight: 600;
  text-align: center;
  border-radius: 3px;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--navy-blue);
  color: var(--white);
}
.btn-primary:hover {
  background-color: var(--navy-blue-dark);
  color: var(--gold-primary);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--navy-blue);
  color: var(--navy-blue);
}
.btn-secondary:hover {
  background-color: var(--navy-blue);
  color: var(--white);
}

/* Publisher Bar */
.publisher-bar {
  background-color: var(--text-main);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 6px 0;
}
.publisher-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.publisher-link {
  color: var(--gold-light);
  font-weight: 600;
}
.publisher-link:hover {
  color: var(--white);
}

/* Header & Branding */
.journal-header {
  background: linear-gradient(135deg, #f5b800 0%, #e6a200 100%);
  padding: 50px 0;
  color: var(--navy-blue);
  border-bottom: 5px solid var(--navy-blue);
}
.compact-header {
  padding: 20px 0;
}
.title-link {
  color: var(--navy-blue);
}
.title-link:hover {
  color: var(--navy-blue-dark);
  text-decoration: none;
}
.journal-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.compact-header .journal-title {
  font-size: 2rem;
  margin-bottom: 0;
}
.journal-subtitle {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Navigation */
.main-nav {
  background-color: var(--navy-blue);
  font-family: var(--font-sans);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* Invisible spacer to perfectly balance the right-side button */
.nav-links::before {
  content: "";
  flex: 1;
}

.nav-links li a {
  display: block;
  color: var(--white);
  padding: 15px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.nav-links li a:hover,
.nav-links li a.active {
  background-color: var(--navy-blue-dark);
  color: var(--gold-primary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  padding: 15px;
  font-size: 1.2rem;
  cursor: pointer;
  font-family: var(--font-sans);
}
.submit-nav {
  flex: 1; /* Matches the left-side spacer */
  display: flex;
  justify-content: flex-end; /* Pushes the button to the right edge */
  margin: 0;
}

.btn-submit-nav {
  background-color: var(--gold-primary);
  color: var(--navy-blue) !important;
  border-radius: 4px;
  margin: 5px;
  padding: 10px 20px !important;
}
.btn-submit-nav:hover {
  background-color: var(--gold-light) !important;
  color: var(--navy-blue-dark) !important;
}

/* --- Nav Dropdown (Desktop with Animation) --- */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  /* Animation Setup */
  visibility: hidden;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s ease;

  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--navy-blue-dark);
  min-width: 240px;
  list-style: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  z-index: 200;
  padding: 0;
  margin: 0;
}

/* Triggers the smooth slide-up effect */
.nav-dropdown:hover .dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.dropdown-menu li {
  width: 100%;
}
.dropdown-menu li a {
  padding: 12px 20px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem !important;
  text-transform: none !important;
}
.dropdown-menu li a:hover {
  background-color: var(--navy-blue);
  color: var(--white) !important;
}

/* Shared Sidebar Widgets */
.sidebar-widget {
  background: var(--white);
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}
.primary-widget {
  border-top: 4px solid var(--gold-primary);
  background-color: rgba(245, 184, 0, 0.05);
}
.primary-widget a {
  margin-top: 15px;
}
.sidebar-widget h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  text-transform: uppercase;
  color: var(--navy-blue);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}
.metrics-widget ul {
  list-style: none;
}
.metrics-widget li {
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}
.cover-placeholder {
  width: 100%;
  height: 350px;
  background-color: #ddd;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-family: var(--font-sans);
  border: 1px solid #ccc;
}

/* --- Reusable Sidebar Brand Poster Classes --- */
.brand-poster-widget {
  padding: 20px !important;
  text-align: center;
  background: var(--white) !important;
  border: 1px solid var(--border-color) !important;
  border-top: 4px solid var(--navy-blue) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important; /* Applies shadow to the whole card */
}

.brand-poster-widget img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #e0e0e0;
  margin: 0 auto;
  box-shadow: none !important; /* Keeps the image inside flat */
}

.brand-poster-label {
  margin-top: 15px;
  font-family: var(--font-sans);
  font-size: 0.95rem; /* Slightly larger to match your image */
  color: var(--navy-blue);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Footer */
.journal-footer {
  background-color: var(--navy-blue);
  color: var(--white);
  padding: 60px 0 30px 0;
  margin-top: 60px;
  font-family: var(--font-sans);
}

.footer-grid {
  display: grid;
  /* THE FIX: Gives 1.5x space to the text column, tightening the list columns */
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px; /* Increased gap to keep things from touching */
  margin-bottom: 40px;
}

.journal-footer h4 {
  color: var(--gold-primary);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.1rem;
}

/* Specific styling for the footer paragraphs to improve readability */
.journal-footer p {
  margin-bottom: 12px;
  color: #e8e8e8;
  font-size: 0.95rem;
  line-height: 1.7;
}

.journal-footer ul {
  list-style: none;
}

.journal-footer li {
  margin-bottom: 12px;
}

.journal-footer a {
  color: #e8e8e8;
  font-size: 0.95rem;
}

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

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
  font-size: 0.85rem;
  color: #aaa;
}

/* Global Mobile Responsiveness */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .journal-title {
    font-size: 2.5rem;
  }
  .submit-nav {
    margin-left: 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: left; /* Left align is much cleaner for lists on mobile */
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
  }
  .mobile-menu-btn {
    display: block;
    width: 100%;
    text-align: left;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links li {
    width: 100%;
    text-align: left;
  }
  .nav-links li a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .submit-nav {
    flex: auto;
    justify-content: center;
    width: 100%;
  }
  .btn-submit-nav {
    display: block;
    margin: 10px auto;
  }

  /* --- Mobile Dropdown Overrides --- */
  .dropdown-menu {
    display: none;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);

    position: static;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.15);
    width: 100%;
  }

  .dropdown-menu.show {
    display: block !important;
  }

  .dropdown-menu li a {
    text-align: center !important;
    padding-left: 20px !important;
  }
}
