/* JSCI Brand CSS
 * Implements the new JSCI branding guidelines with:
 * - New color palette
 * - Updated typography
 * - Consistent styling across components
 */

/* --------------------------------------
   1. Color Variables
-------------------------------------- */
:root {
  /* Primary Colors */
  --jsci-green: #00843d;
  --jsci-white: #ffffff;
  --jsci-red: #c1272d;

  /* Secondary Colors */
  --jsci-blue: #003366;
  --jsci-gold: #ffd700;

  /* Neutral Colors */
  --jsci-black: #000000;
  --jsci-dark-gray: #333333;
  --jsci-medium-gray: #666666;
  --jsci-light-gray: #f5f5f5;

  /* Functional Colors */
  --jsci-success: var(--jsci-green);
  --jsci-error: var(--jsci-red);
  --jsci-warning: var(--jsci-gold);
  --jsci-info: var(--jsci-blue);

  /* Opacity Variants */
  --jsci-green-light: rgba(0, 132, 61, 0.1);
  --jsci-blue-light: rgba(0, 51, 102, 0.1);

  /* Layout Defaults */
  /* Expected header height used to reserve space before header is injected */
  --jsci-header-expected-height: 120px;
}

/* --------------------------------------
   2. Typography
-------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Open+Sans:wght@300;400;600&family=Roboto+Mono&display=swap');

:root {
  --jsci-heading-font: 'Montserrat', sans-serif;
  --jsci-body-font: 'Open Sans', sans-serif;
  --jsci-mono-font: 'Roboto Mono', monospace;

  /* Font weights */
  --jsci-font-light: 300;
  --jsci-font-regular: 400;
  --jsci-font-medium: 500;
  --jsci-font-semibold: 600;
  --jsci-font-bold: 700;

  /* Base font sizes */
  --jsci-base-font-size: 16px;
  --jsci-scale-ratio: 1.2;
}

body {
  font-family: var(--jsci-body-font);
  color: var(--jsci-dark-gray);
  line-height: 1.7;
  background-color: var(--jsci-white);
  letter-spacing: 0.01em;
  font-size: var(--jsci-base-font-size);
  font-weight: var(--jsci-font-regular);
}

/* Prevent initial content jump before the header is injected */
body:not([data-jsciHeaderLoaded='true']) {
  padding-top: var(--jsci-header-expected-height);
}

@media (max-width: 991px) {
  body:not([data-jsciHeaderLoaded='true']) {
    padding-top: 90px;
  }
}

@media (max-width: 767px) {
  body:not([data-jsciHeaderLoaded='true']) {
    padding-top: 70px;
  }
}

/* Normalize hero spacing before header mounts to avoid initial jump */
body:not([data-jsciHeaderLoaded='true']) .jsci-hero-section {
  /* Many pages had large inline margin-top compensations; override them early */
  margin-top: 20px !important;
}

p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  max-width: 80ch; /* For optimal readability */
  font-family: var(--jsci-body-font);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--jsci-heading-font);
  font-weight: var(--jsci-font-bold);
  color: var(--jsci-green);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

h4 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

h5 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

h6 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

/* Heading variants */
.heading-light {
  font-weight: var(--jsci-font-regular);
}

.heading-medium {
  font-weight: var(--jsci-font-medium);
}

.heading-semibold {
  font-weight: var(--jsci-font-semibold);
}

p {
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.25rem;
  font-weight: var(--jsci-font-light);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Technical text elements */
code,
pre,
.technical-text,
.code-block,
.algorithm,
.syntax {
  font-family: var(--jsci-mono-font);
  background-color: var(--jsci-light-gray);
  border-radius: 4px;
  font-size: 0.9em;
  line-height: 1.5;
}

code {
  padding: 0.2em 0.4em;
  color: var(--jsci-blue);
  white-space: nowrap;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-width: 100%;
  border-left: 4px solid var(--jsci-green);
}

.technical-text {
  padding: 0.75rem;
  margin: 1rem 0;
}

.algorithm,
.syntax {
  padding: 1rem;
  margin: 1.5rem 0;
  border: 1px solid var(--jsci-medium-gray);
}

/* JSCI Logo Styling */
.jsci-logo {
  font-family: var(--jsci-heading-font);
  font-weight: 700;
  color: var(--jsci-green);
}

.jsci-logo span {
  color: var(--jsci-green);
}

/* JSCI Text Styling */
.jsci-text {
  color: var(--jsci-green);
  font-weight: var(--jsci-font-bold);
  font-family: var(--jsci-heading-font);
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.jsci-text:hover {
  color: var(--jsci-gold);
}

/* Header general styling */
header {
  padding: 15px 30px !important; /* Add vertical padding to give more room */
  transition: all 0.3s ease-in-out;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Header Logo Sizing */
header .logo {
  float: left;
  height: 130px !important; /* Significantly increased from 90px */
  transition: all 0.3s ease-in-out;
  display: flex;
  align-items: center;
}

header .logo img {
  height: 100%;
  width: auto;
  max-width: none !important; /* Ensure the image isn't constrained */
  object-fit: contain; /* Ensures the image maintains its aspect ratio */
  object-position: left center; /* Centers the image vertically */
  transition: all 0.3s ease-in-out;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

/* Ensure menu items align with the larger logo */
header ul.main-menu > li > a {
  font-family: var(--jsci-heading-font);
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  line-height: 130px !important; /* Match the logo height */
  color: var(--jsci-green) !important; /* Set all menu items to brand green */
}

header ul.main-menu > li > a:hover {
  color: var(--jsci-gold) !important; /* Gold on hover for contrast */
  text-decoration: none;
}

header ul.main-menu > li > a.active {
  color: var(--jsci-green) !important;
  font-weight: 600;
  border-bottom: 2px solid var(--jsci-green);
}

/* Adjust right area height */
header .right-area {
  height: 130px !important;
  display: flex;
  align-items: center;
}

/* Responsive logo sizes */
@media only screen and (max-width: 992px) {
  header {
    padding: 10px 20px !important;
  }

  header .logo {
    height: 110px !important; /* Increased significantly */
  }

  header ul.main-menu > li > a {
    line-height: 110px !important;
    padding: 0 15px !important;
  }

  header .right-area {
    height: 110px !important;
  }
}

@media only screen and (max-width: 767px) {
  header {
    padding: 8px 15px !important;
  }

  header .logo {
    height: 100px !important; /* Increased significantly */
  }

  header ul.main-menu > li > a {
    line-height: normal !important; /* Reset for mobile menu */
    color: var(--jsci-green) !important; /* Maintain green color in mobile */
    border-bottom: 1px solid rgba(0, 132, 61, 0.1);
    padding: 15px !important;
  }

  header ul.main-menu.visible-menu {
    background-color: white;
    border-top: 3px solid var(--jsci-green);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  header .right-area {
    height: 100px !important;
  }
}
@media only screen and (max-width: 576px) {
  header {
    padding: 5px 10px !important;
  }

  header .logo {
    height: 90px !important; /* Increased significantly */
  }

  header .right-area {
    height: 90px !important;
  }
}

/* Dropdown Menu Styling */
header ul.main-menu .dropdown-menu {
  border-top: 3px solid var(--jsci-green);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 4px 4px;
  padding: 0;
}

header ul.main-menu .dropdown-menu li a {
  font-family: var(--jsci-body-font);
  padding: 10px 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  color: var(
    --jsci-green
  ) !important; /* Set all dropdown menu items to brand green */
}

header ul.main-menu .dropdown-menu li a:hover {
  background-color: rgba(0, 132, 61, 0.05);
  color: var(--jsci-gold) !important;
  padding-left: 20px;
}

/* Make sure all navigation items are brand green */
header .main-menu a,
header .main-menu li a,
header ul.main-menu li a,
header ul.main-menu > li > a,
header ul.main-menu .dropdown-menu li a,
header .main-menu li.drop-down > ul.drop-down-menu li > a {
  color: var(--jsci-green) !important;
  font-family: var(--jsci-heading-font);
  transition: all 0.3s ease;
}

header .main-menu a:hover,
header .main-menu li a:hover,
header ul.main-menu li a:hover,
header ul.main-menu > li > a:hover,
header ul.main-menu .dropdown-menu li a:hover,
header .main-menu li.drop-down > ul.drop-down-menu li > a:hover {
  color: var(--jsci-gold) !important;
}

/* Active menu item styling */
header .main-menu a.active,
header .main-menu li a.active,
header ul.main-menu li a.active,
header ul.main-menu > li > a.active {
  color: var(--jsci-green) !important;
  font-weight: 600;
  position: relative;
}

header ul.main-menu > li > a.active:after {
  content: '';
  position: absolute;
  bottom: 25px;
  left: 15px;
  right: 15px;
  height: 3px;
  background-color: var(--jsci-green);
}

/* Mobile Menu Icon */
header .menu-nav-icon {
  color: var(--jsci-green) !important;
  transition: all 0.3s ease;
}

header .menu-nav-icon:hover {
  color: var(--jsci-gold) !important;
}

/* --------------------------------------

header ul.main-menu .dropdown-menu li a:hover {
  background-color: rgba(0, 132, 61, 0.05);
  color: var(--jsci-green);
  padding-left: 20px;
}

/* --------------------------------------
   3. Layout Components
-------------------------------------- */

/* Header */
.jsci-header {
  background-color: var(--jsci-white);
  border-bottom: 4px solid var(--jsci-green);
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.jsci-nav {
  background-color: var(--jsci-green);
}

.jsci-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.jsci-nav li {
  margin: 0;
  padding: 0;
}

.jsci-nav a {
  display: block;
  color: var(--jsci-white);
  text-decoration: none;
  padding: 1rem 1.5rem;
  font-family: var(--jsci-heading-font);
  font-weight: 500;
  transition: background-color 0.3s;
}

.jsci-nav a:hover,
.jsci-nav a.active {
  background-color: var(--jsci-blue);
}

/* Footer */
.jsci-footer {
  background-color: var(--jsci-green);
  color: var(--jsci-white);
  padding: 3rem 0;
}

.jsci-footer h4 {
  color: var(--jsci-white);
  border-bottom: 2px solid var(--jsci-green);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.jsci-footer a {
  color: var(--jsci-white);
  text-decoration: none;
  transition: color 0.3s;
}

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

/* Copyright Bar */
.jsci-copyright {
  background-color: var(--jsci-dark-gray);
  color: var(--jsci-light-gray);
  padding: 1rem 0;
  text-align: center;
}

/* --------------------------------------
   4. Components
-------------------------------------- */

/* Buttons */
.jsci-btn {
  display: inline-block;
  font-family: var(--jsci-heading-font);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.jsci-btn-primary {
  background-color: var(--jsci-green);
  color: var(--jsci-white);
  border-color: var(--jsci-green);
}

.jsci-btn-primary:hover {
  background-color: #006e32;
  border-color: #006e32;
}

.jsci-btn-secondary {
  background-color: var(--jsci-blue);
  color: var(--jsci-white);
  border-color: var(--jsci-blue);
}

.jsci-btn-secondary:hover {
  background-color: #002a52;
  border-color: #002a52;
}

.jsci-btn-outline {
  background-color: transparent;
  color: var(--jsci-green);
  border-color: var(--jsci-green);
}

.jsci-btn-outline:hover {
  background-color: var(--jsci-green);
  color: var(--jsci-white);
}

/* Bootstrap Button Overrides */
.btn-outline-primary {
  color: var(--jsci-red) !important;
  border-color: var(--jsci-red) !important;
  background-color: transparent !important;
  transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
  color: white !important;
  background-color: var(--jsci-gold) !important;
  border-color: var(--jsci-gold) !important;
}

/* Feature section "Learn More" buttons */
.feature-card .btn,
.card .btn,
.homepage-section .btn-outline-primary {
  color: var(--jsci-red) !important;
  border-color: var(--jsci-red) !important;
  background-color: transparent !important;
  transition: all 0.3s ease !important;
  font-family: var(--jsci-heading-font) !important;
  font-weight: 500 !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.5px !important;
}

.feature-card .btn:hover,
.card .btn:hover,
.homepage-section .btn-outline-primary:hover {
  color: white !important;
  background-color: var(--jsci-gold) !important;
  border-color: var(--jsci-gold) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Cards */
.jsci-card {
  background-color: var(--jsci-white);
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 2rem;
}

.jsci-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.jsci-card-img {
  width: 100%;
  height: auto;
}

.jsci-card-body {
  padding: 1.5rem;
}

.jsci-card-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  color: var(--jsci-green);
}

.jsci-card-text {
  margin-bottom: 1rem;
}

/* Card Titles - Make all card titles use brand green */
.card-title {
  color: var(--jsci-green) !important;
  font-family: var(--jsci-heading-font);
  font-weight: 600;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.card-title:hover {
  color: var(--jsci-blue) !important;
}

/* General card heading consistency */
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.why-card h1,
.why-card h2,
.why-card h3,
.why-card h4,
.why-card h5,
.why-card h6,
.feature-card h1,
.feature-card h2,
.feature-card h3,
.feature-card h4,
.feature-card h5,
.feature-card h6 {
  color: var(--jsci-green) !important;
  font-family: var(--jsci-heading-font);
}

/* Feature cards highlight elements */
.highlight {
  color: var(
    --jsci-green
  ) !important; /* Changed to green for brand consistency */
  font-weight: 600;
  background: rgba(0, 132, 61, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.highlight:hover {
  background-color: rgba(0, 132, 61, 0.2);
}

/* Feature cards */
.feature-card h5,
.feature-card h4,
.feature-card h3 {
  color: var(--jsci-green) !important;
  font-family: var(--jsci-heading-font);
}

.feature-card i {
  color: var(--jsci-green);
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Homepage sections and cards */
.homepage-section h1,
.homepage-section h2,
.homepage-section h3,
.homepage-section h4,
.homepage-section h5 {
  color: var(--jsci-green);
}

/* Article listings */
.jsci-article-item {
  background-color: var(--jsci-white);
  border-radius: 5px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.jsci-article-item:last-child {
  margin-bottom: 0;
}

.jsci-article-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.jsci-article-meta {
  color: var(--jsci-medium-gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.jsci-article-authors {
  font-weight: 600;
}

/* Sidebar */
.jsci-sidebar {
  background-color: var(--jsci-white);
  padding: 1.5rem;
  border-radius: 5px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.jsci-sidebar-title {
  border-bottom: 2px solid var(--jsci-green);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* Form elements */
.jsci-form-group {
  margin-bottom: 1.5rem;
}

.jsci-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--jsci-green);
}

.jsci-form-control {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--jsci-dark-gray);
  background-color: var(--jsci-white);
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out;
}

.jsci-form-control:focus {
  color: var(--jsci-dark-gray);
  background-color: var(--jsci-white);
  border-color: var(--jsci-green);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 132, 61, 0.25);
}

/* Validation styling */
.jsci-form-control.is-valid {
  border-color: var(--jsci-success);
}

.jsci-form-control.is-invalid {
  border-color: var(--jsci-error);
}

/* Tables */
.jsci-table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--jsci-dark-gray);
  border-collapse: collapse;
}

.jsci-table th,
.jsci-table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.jsci-table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid var(--jsci-green);
  background-color: var(--jsci-green-light);
  color: var(--jsci-blue);
  font-family: var(--jsci-heading-font);
}

.jsci-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

/* Pagination */
.jsci-pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  border-radius: 0.25rem;
}

.jsci-pagination li {
  margin-right: 5px;
}

.jsci-pagination a {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  line-height: 1.25;
  color: var(--jsci-blue);
  background-color: var(--jsci-white);
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  text-decoration: none;
}

.jsci-pagination a:hover {
  color: var(--jsci-green);
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.jsci-pagination .active a {
  background-color: var(--jsci-green);
  color: var(--jsci-white);
  border-color: var(--jsci-green);
}

/* Alerts */
.jsci-alert {
  position: relative;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.jsci-alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: var(--jsci-green);
}

.jsci-alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: var(--jsci-red);
}

.jsci-alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: var(--jsci-gold);
}

.jsci-alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: var(--jsci-blue);
}

/* Primary action buttons */
.btn-primary {
  background-color: var(--jsci-green) !important;
  border-color: var(--jsci-green) !important;
  color: white !important;
  transition: all 0.3s ease !important;
}

.btn-primary:hover {
  background-color: var(--jsci-blue) !important;
  border-color: var(--jsci-blue) !important;
}

/* Submit Manuscript Button */
.submit-manuscript-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--jsci-green);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-family: var(--jsci-heading-font);
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 100;
}

.submit-manuscript-btn:hover {
  background-color: #006e32;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.submit-manuscript-btn i {
  margin-right: 8px;
}

/* --------------------------------------
   5. Utilities
-------------------------------------- */

/* Text colors */
.text-primary {
  color: var(--jsci-green) !important;
}
.text-secondary {
  color: var(--jsci-blue) !important;
}
.text-accent {
  color: var(--jsci-gold) !important;
}
.text-danger {
  color: var(--jsci-red) !important;
}
.text-muted {
  color: var(--jsci-medium-gray) !important;
}

/* Background colors */
.bg-primary {
  background-color: var(--jsci-green) !important;
}
.bg-secondary {
  background-color: var(--jsci-blue) !important;
}
.bg-accent {
  background-color: var(--jsci-gold) !important;
}
.bg-light {
  background-color: var(--jsci-light-gray) !important;
}
.bg-white {
  background-color: var(--jsci-white) !important;
}

/* Content sections with white backgrounds for readability */
.content-area {
  background-color: var(--jsci-white);
  padding: 2rem;
  border-radius: 5px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Border utilities */

/* Borders */
.border-primary {
  border-color: var(--jsci-green) !important;
}
.border-secondary {
  border-color: var(--jsci-blue) !important;
}
.border-accent {
  border-color: var(--jsci-gold) !important;
}

/* Spacing */
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 1rem !important;
}
.mb-4 {
  margin-bottom: 1.5rem !important;
}
.mb-5 {
  margin-bottom: 3rem !important;
}

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

.py-1 {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}
.py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}
.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}
.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}
.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.px-1 {
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}
.px-2 {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}
.px-3 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}
.px-4 {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}
.px-5 {
  padding-left: 3rem !important;
  padding-right: 3rem !important;
}

/* Display */
.d-none {
  display: none !important;
}
.d-block {
  display: block !important;
}
.d-flex {
  display: flex !important;
}
.flex-wrap {
  flex-wrap: wrap !important;
}
.justify-content-between {
  justify-content: space-between !important;
}
.align-items-center {
  align-items: center !important;
}

/* Text alignment */
.text-center {
  text-align: center !important;
}
.text-left {
  text-align: left !important;
}
.text-right {
  text-align: right !important;
}

/* Width utilities */
.w-100 {
  width: 100% !important;
}
.w-75 {
  width: 75% !important;
}
.w-50 {
  width: 50% !important;
}
.w-25 {
  width: 25% !important;
}

/* --------------------------------------
   6. Typography Utilities
-------------------------------------- */

/* Font families */
.font-heading {
  font-family: var(--jsci-heading-font) !important;
}

.font-body {
  font-family: var(--jsci-body-font) !important;
}

.font-mono {
  font-family: var(--jsci-mono-font) !important;
}

/* Font weights */
.font-light {
  font-weight: var(--jsci-font-light) !important;
}

.font-regular {
  font-weight: var(--jsci-font-regular) !important;
}

.font-medium {
  font-weight: var(--jsci-font-medium) !important;
}

.font-semibold {
  font-weight: var(--jsci-font-semibold) !important;
}

.font-bold {
  font-weight: var(--jsci-font-bold) !important;
}

/* Font sizes */
.text-xs {
  font-size: 0.75rem !important;
}

.text-sm {
  font-size: 0.875rem !important;
}

.text-base {
  font-size: 1rem !important;
}

.text-lg {
  font-size: 1.125rem !important;
}

.text-xl {
  font-size: 1.25rem !important;
}

.text-2xl {
  font-size: 1.5rem !important;
}

.text-3xl {
  font-size: 1.875rem !important;
}

.text-4xl {
  font-size: 2.25rem !important;
}

/* --------------------------------------
   7. Media Queries
-------------------------------------- */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }

  body {
    font-size: calc(var(--jsci-base-font-size) * 1);
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.75rem;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }

  body {
    font-size: calc(var(--jsci-base-font-size) * 1.0625);
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  h3 {
    font-size: 2rem;
  }

  h4 {
    font-size: 1.75rem;
  }

  .lead {
    font-size: 1.375rem;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }

  body {
    font-size: calc(var(--jsci-base-font-size) * 1.125);
  }

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.75rem;
  }

  h3 {
    font-size: 2.25rem;
  }

  h4 {
    font-size: 1.875rem;
  }

  h5 {
    font-size: 1.5rem;
  }

  h6 {
    font-size: 1.25rem;
  }

  .lead {
    font-size: 1.5rem;
  }

  pre,
  .technical-text {
    font-size: 0.95em;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  body {
    font-size: calc(var(--jsci-base-font-size) * 1.1875);
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 3rem;
  }

  .lead {
    font-size: 1.625rem;
  }
}

/* Mobile navigation */
@media (max-width: 768px) {
  .jsci-nav ul {
    flex-direction: column;
  }

  .jsci-nav a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Enhanced readability spacers */
.spacer-sm {
  margin-bottom: 1rem;
}

.spacer-md {
  margin-bottom: 2rem;
}

.spacer-lg {
  margin-bottom: 3.5rem;
}

.content-well {
  padding: 2.5rem;
  background-color: var(--jsci-white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Print styles */
@media print {
  body {
    background-color: var(--jsci-white);
    color: var(--jsci-black);
  }

  .jsci-header,
  .jsci-nav,
  .jsci-footer,
  .jsci-sidebar,
  .submit-manuscript-btn {
    display: none !important;
  }

  a {
    text-decoration: none;
    color: var(--jsci-black);
  }

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

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  pre,
  blockquote {
    page-break-inside: avoid;
  }
}
