/* Base font settings */
html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: #1a1a1a;
}

/* Main article container */
.article {
  max-width: 48rem; /* ~768px */
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Headings */
.article h1,
.article h2,
.article h3,
.article h4 {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 2.2rem;
  margin-bottom: 1rem;
}

.article h1 { font-size: 2rem; }
.article h2 { font-size: 1.6rem; }
.article h3 { font-size: 1.3rem; }
.article h4 { font-size: 1.15rem; }

/* Paragraphs */
.article p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

/* Images */
.article img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* Lists */
.article ul,
.article ol {
  margin: 1rem 0 1.5rem 1.5rem;
  padding-left: 1rem;
}

.article li {
  margin-bottom: 0.4rem;
}

/* Links */
.article a {
  color: #2563eb;
  text-decoration: none;
}

.article a:hover {
  text-decoration: underline;
}

/* Blockquotes */
.article blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1rem;
  color: #555;
  margin: 1.5rem 0;
  font-style: italic;
}

/* Code */
.article code {
  background: #f3f4f6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.95rem;
}

/* Preformatted blocks */
.article pre {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* --------------------------------------------------
   IMAGE STYLING FOR SCIENTIFIC ARTICLES
   -------------------------------------------------- */

/* Container for images + captions */
.figure {
  margin: 2rem 0;
  text-align: center;
}

/* The image itself */
.figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 0 auto 0.75rem auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Caption text */
.figure figcaption {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
  margin-top: 0.25rem;
}

.flash-container {
  max-width: 48rem;
  margin: 1rem auto;
  padding: 0 1.5rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  color: white;
}

.flash-success { background: #16a34a; } /* green */
.flash-info    { background: #2563eb; } /* blue */
.flash-warning { background: #d97706; } /* orange */
.flash-error   { background: #dc2626; } /* red */

/* --- MENU CONTAINER --- */
.menu {
    padding: 0.5rem 1rem;
    font-size: 15px;
}

/* --- TOP LEVEL LIST --- */
.menu > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

/* --- TOP LEVEL ITEMS --- */
.menu-item {
    position: relative;
}

.menu-item > a,
.menu-item > span {
    text-decoration: none;
    color: #333;
    padding: 0.3rem 0;
    display: inline-block;
}

.menu-item > a:hover,
.menu-item > span:hover {
    color: #0066cc;
}

/* --- DROPDOWN --- */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: white;
    border: 1px solid #ddd;
    padding: 0.5rem 0;
    list-style: none;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* --- DROPDOWN ITEMS --- */
.submenu li a {
    display: block;
    padding: 0.4rem 1rem;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.submenu li a:hover {
    background: #f0f0f0;
    color: #0066cc;
}

/* --- SHOW DROPDOWN ON HOVER --- */
.menu-item:hover > .submenu {
    display: block;
}

/* Base button */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: inline-block;
    text-align: center;
}

/* Primary (refined blue) */
.btn-primary {
    background-color: #1e40af; /* indigo-800 vibe */
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
}

.btn-primary:hover {
    background-color: #1c3a9c; /* slightly darker */
}

/* Secondary (slate) */
.btn-secondary {
    background-color: #475569;
    color: white;
}
.btn-secondary:hover {
    background-color: #334155;
}

/* Success (green) */
.btn-success {
    background-color: #059669;
    color: white;
}
.btn-success:hover {
    background-color: #047857;
}

/* Warning (amber) */
.btn-warning {
    background-color: #f59e0b;
    color: white;
}
.btn-warning:hover {
    background-color: #d97706;
}

/* Danger (red) */
.btn-danger {
    background-color: #dc2626;
    color: white;
}
.btn-danger:hover {
    background-color: #b91c1c;
}

/* Neutral gray button */
.btn-gray {
    background-color: #e5e7eb;
    color: #1f2937;
}
.btn-gray:hover {
    background-color: #d1d5db;
}

/* Neutral (gray) */
.btn-neutral {
    background-color: #e5e7eb; /* gray-200 */
    color: #374151;            /* gray-700 */
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease;
}

.btn-neutral:hover {
    background-color: #d1d5db; /* gray-300 */
}
