@charset "utf-8";

/* ===============================
   BASE / RESET
================================ */
* { box-sizing: border-box; }

html, body { height: 100%; } 

body {
  margin: 0;
  background-image: url("/assets/images/background/main.png");
  background-repeat: repeat;
  background-size: auto;
  background-attachment: fixed; /* optional */
  color: #2b211b;
  font-family: Arial, Helvetica, sans-serif;
}

h1, h2, h3 {
  color: #C93436;
  margin: 0 0 12px;
}

p { margin: 0 0 12px; }

a {
  color: #2563eb;
  text-decoration: none;
}
a:hover { text-decoration: underline; }
/*===============================
Admin Page Rules
================================*/ 
body.admin {
  background: #f4f4f4;
  background-image: none;
  margin-left: 100px;
 font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===============================
   AMAZON-STYLE HEADER BAR
   (full-width parchment bar + centered inner)
================================ */
.topbar-bg{
  width: 100%;
  padding: 10px 0;

  background-image: url("/assets/images/background/header-bg.png");
  background-repeat: repeat-y;         /* no horizontal tiling */
  background-position: center top;
  background-size: 100% auto;          /* stretch across width */

  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.topbar{
  width: min(95vw, 1800px);
  margin: 0 auto;
  padding: 8px 12px;

  display: flex;
  align-items: center;
  gap: 14px;

  background: transparent;
}

.topbar-logo{
  display: inline-block;
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}

.topbar-logo-img{
  display: block;
  height: 56px;
  width: auto;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

.topbar-search{
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-search input[type="search"]{
  flex: 1 1 auto;
  max-width: none;                 /* overrides global max-width:320px */
  padding: 10px 12px;
  border: 1px solid rgba(60,40,25,0.35);
  border-radius: 8px;
  background: rgba(255,255,255,0.65);
}

.topbar-search button{
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(60,40,25,0.85);
  color: #fff;
  border: none;
  cursor: pointer;
}

.topbar-search button:hover{
  background: rgba(60,40,25,0.95);
}

.topbar-menu{ flex: 0 0 auto; }

/* accessibility utility */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* ===============================
   HERO (index only)
================================ */
.hero{
  width: min(95vw, 1800px);
  margin: 14px auto 0;
}

.hero-img{
  display:block;
  width:100%;
  height:auto;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.14);
}

/* ===============================
   HEADER MENU (in topbar)
   NOTE: header_menu.php should output:
   <nav class="main-nav main-nav--header">
================================ */
.main-nav.main-nav--header{
  background: transparent;
	
  padding: 0px;
}

.main-nav.main-nav--header .menu{
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;/*makes each button bigger*/
  gap: 10px;
}

.main-nav--header .menu > li{
  position: relative;
}

.main-nav--header a{
  background-image: url("/assets/images/button/scroll.png");
 background-repeat: no-repeat;        /* stop tiling */
  background-size: 100% 100%;          /* stretch both width & height */
  background-position: center center;

  padding: 0.6rem 0.9rem;
  border-radius: 8px;

  color: #3b2f2f;
  font-weight: 700;

  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.main-nav--header a:hover{
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

.main-nav--header .active > a{
  background-image: url("/assets/images/background/side.png"); /* darker parchment */
}


/* ===============================
   DROPDOWNS (header + sidebar)
================================ */
.has-dropdown{ position: relative; }

/* default dropdown (used by sidebar flyouts) */
.dropdown{
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #E0CB9D;
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
  z-index: 100;
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown{
  display: block;
}

.dropdown li{ list-style: none; }

.dropdown a{
  display: block;
  padding: 10px 16px;
  color: #e5e7eb;
  white-space: nowrap;
}
.dropdown a:hover{ background: #4b5563; }

.has-dropdown > a::after{
  content: " ▼";
  font-size: 0.7em;
  opacity: 0.7;
}

/* Header dropdown theme (ink-brown) */
.main-nav--header .dropdown{
  background-color: #f7f5f1;
  border: 1px solid rgba(60,40,25,0.35);
  border-radius: 6px;

  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  padding: 6px 0;

  min-width: 220px;
  max-width: 320px;
}

.main-nav--header .dropdown a:hover{
  background: rgba(201, 52, 54, 0.10); /* muted rubric red */
  text-decoration: none;
}
.main-nav--header .dropdown .dropdown{
  background-image: none;
  background-color: #f7f5f1;
}
.main-nav--header .dropdown li + li{
  border-top: 1px solid rgba(0,0,0,0.08);
}
.main-nav--header > ul > li:last-child .dropdown{
  right: 0;
  left: auto;
}
/*Prevent Long Dropdown Buttons*/
.main-nav--header .dropdown{
  min-width: 220px;
  max-width: 320px;
}
/*Wrap Long Dropdown Items*/
.site-header{
  overflow: visible;
}
/* Header dropdown positioning fixes */
.main-nav--header li{
  position: relative;
}

.main-nav--header .dropdown{
  top: 100%;
  left: 0;
  right: auto;
  margin-top: 0;
  min-width: 220px;
  max-width: 320px;
}

.main-nav--header > ul > li:last-child .dropdown{
  right: 0;
  left: auto;
}

.main-nav--header .dropdown a{
  display: block;
  padding: 8px 14px;

  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 600;

  color: #2b211b;
  background: none;

  white-space: normal;
}
.main-nav--header .dropdown li{
  background: none;
  border: none;
}
.main-nav--header .menu { 
  display: flex;
  align-items: center;
}

.main-nav--header .admin-menu {
  margin-left: auto;
}

/* ===============================
   PAGE LAYOUT
================================ */

.layout{
  width: min(95vw, 1800px);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 24px;
  align-items: start;
  grid-template-columns: clamp(220px, 18vw, 300px) 1fr clamp(220px, 18vw, 300px);
}

/* Left and right columns must be grid items */
.layout > .sidebar-left,
.layout > .sidebar-right,
.layout > .sidebar{
  min-width: 0;
}

/* Sticky should apply to the inner pane, not break the grid */
.layout > .sidebar-right{
  position: relative;   /* NOT sticky here */
}
.layout > .sidebar-right .study-pane,
.layout > .sidebar-right .right-column,
.layout > .sidebar-right .study-panel{
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}

/*.sidebar.sidebar-right {
  position: sticky;
  top: 12px;               
  align-self: flex-start;
  max-height: calc(100vh - 24px);
  overflow: auto;
}*/

/* prevent long links from blowing out the sidebar */
.sidebar{ min-width: 150; }
.sidebar a, .sidebar li, .sidebar ul{ overflow-wrap: anywhere; }


/* ===============================
   PANELS (SIDEBAR + CONTENT)
================================ */
.layout .sidebar{
  background-image: url("/assets/images/background/side.png");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% auto;

  padding: 14px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

.layout .content{
  background-image: url("/assets/images/background/content.png");
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% auto;

  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.14);
}
/* ===============================
   SIDEBAR MENU
================================ */
.right-sidebar {
  position: sticky;
  top: 12px;            /* or height of your header */
  align-self: flex-start;
  max-height: calc(100vh - 24px);
  overflow: auto;
}

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

.submenu .top-level-title{
  font-weight: bold;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #d1d5db;
}

.submenu li{
  position: relative;
  margin-bottom: 4px;
}

.submenu a{
  display: block;
  padding: 0.55rem 0.75rem;
  margin-left: 6px;

  color: #2b211b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;

  border-left: 3px solid transparent;
}

.submenu a:hover{
  background: rgba(201, 52, 54, 0.08); /* rubricated red wash */
  border-left-color: #C93436;
  text-decoration: none;
}
.submenu .active > a{
  font-weight: bold;
  border-left-color: #C93436;
  background: rgba(201, 52, 54, 0.12);
}

/* Sidebar nested flyouts */
.submenu .dropdown{
  top: 0;
  left: 100%;
  margin-left: 0px;
}
.sidebar-heading{
  font-family: Georgia, serif;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* Right sidebar: force long URLs to wrap */
.sidebar-right a,
.sidebar-right .study-pane,
.sidebar-right .study-pane-item {
  overflow-wrap: anywhere;
  word-break: break-word;
}




/* ===============================
   Article formatting for EDITORS
================================ */

.article .quote-box {
  border-left: 5px solid #e74c3c;
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  font-style: italic;
}
/* ===============================
   Study panes (Right sidebar)
================================ */
.study-pane{
  padding: 10px 10px;
  border-radius: 8px;

  /* Keep it “paper-like” but quieter than the main panels */
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(60,40,25,0.12);
}

.study-pane-hint{
  margin: 0;
  font-family: Georgia, serif;
  font-size: 0.92rem;
  color: rgba(43,33,27,0.80);
  line-height: 1.45;
}

.study-pane-divider{
  height: 12px;
}

/* The HTML fragment returned by footnote.php */
.study-pane-item h3{
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  color: rgba(43,33,27,0.92);
}

.study-pane-item p{
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.5;
}

.study-pane-item hr{
  border: none;
  border-top: 1px solid rgba(0,0,0,0.10);
  margin: 10px 0;
}

.study-pane-item a{
  color: rgba(43,33,27,0.92);
  text-decoration: underline;
}
/* Keep the right sidebar visible while scrolling (public content.php) */



/* ===============================
   BREADCRUMBS (scholarly / manuscript)
================================ */
.breadcrumbs{
  width: min(95vw, 1800px);
  margin: 10px auto 0;
  padding: 8px 14px;

  font-size: 0.9rem;
  font-family: Georgia, serif;

  color: rgba(43, 33, 27, 0.85);

  background: rgba(255, 255, 255, 0.18); /* subtle parchment wash */
  border-left: 3px solid rgba(201, 52, 54, 0.55); /* rubric red */
  border-radius: 8px;

  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}

.breadcrumbs a{
  color: rgba(43, 33, 27, 0.92);
  text-decoration: none;
  font-weight: 700;
}

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

/* Separator styling */
.breadcrumbs .sep{
  margin: 0 8px;
  color: rgba(43, 33, 27, 0.45);
}




.autosave-badge{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.6);
  margin: 8px 0 14px;
  font-size: 14px;
}

.autosave-badge[data-state="saving"] { opacity: 0.95; }
.autosave-badge[data-state="saved"]  { opacity: 0.95; }
.autosave-badge[data-state="dirty"]  { opacity: 0.95; }
.autosave-badge[data-state="error"]  { opacity: 0.95; border-color: rgba(128,0,0,.45); }

/* ===============================
   MAIN CONTENT UTILITIES
================================ */
a.button-link{
  display: inline-block;
  padding: 6px 12px;
  margin: 4px 4px 4px 0;
  background: #C93436;
  color: #ffffff;
  border-radius: 4px;
}
a.button-link:hover{ background: #860001; }

/* ===============================
   FORMS (general)
================================ */
label{ display: block; margin-bottom: 6px; }

input[type="text"],
input[type="password"],
select{
  width: 100%;
  max-width: 320px;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

button{
  background: #C93436;
  color: #ffffff;
  border: 1px solid #C93436;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}
button:hover{ 
	background: #ffffff;
	color: #F1081E;
	border: 1px solid #C93436;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
}

/* ===============================
   TABLES
================================ */
table{
  width: 90%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td{
  padding: 8px;
  border: 1px solid #F1081E;
}

th{ background: #f3f4f6; }

/* ===============================
   FLASH MESSAGES
================================ */
.flash{
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}

.flash-success{ background: #d1fae5; border: 1px solid #10b981; }
.flash-error{ background: #fee2e2; border: 1px solid #ef4444; }
.flash-info{ background: #e0e7ff; border: 1px solid #6366f1; }

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 900px){
  .topbar{ flex-wrap: wrap; }
  .topbar-search{ order: 3; width: 100%; }
  .layout{ grid-template-columns: 1fr; }
  /* allow menu items to wrap neatly on small screens */
  .main-nav.main-nav--header .menu{
    flex-wrap: wrap;
    justify-content: center;
  }
}
/* =====================================
Article Search Rules
======================================*/
.category-intro{
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(43, 33, 27, 0.9);
}
.category-search{
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
}

.category-search input[type="search"]{
  flex: 1 1 auto;
  max-width: none;
  padding: 8px 10px;

  font-family: Georgia, serif;
  font-size: 0.95rem;

  border: 1px solid rgba(60,40,25,0.35);
  border-radius: 6px;
  background: rgba(255,255,255,0.65);
}

.category-search button{
  padding: 8px 14px;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  border-radius: 6px;
}
/* ==============================
Article List
================================*/
.article-list{
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li{
  padding: 10px 0 10px 12px;
  border-left: 3px solid transparent;
}

.article-list li + li{
  border-top: 1px solid rgba(0,0,0,0.08);
}

.article-list a{
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: bold;
  color: #2b211b;
}

.article-list a:hover{
  text-decoration: underline;
}

.article-list li:hover{
  background: rgba(201, 52, 54, 0.06);
  border-left-color: rgba(201, 52, 54, 0.6);
}
/* ==============================
Article Metadata
================================*/
.article-list li div{
  font-family: Georgia, serif;
  font-size: 0.85rem;
  color: rgba(43, 33, 27, 0.7);
}
/* ==============================
Article Pagination
================================*/
.pagination{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pagination span{
  font-family: Georgia, serif;
  font-size: 0.9rem;
  color: rgba(43,33,27,0.8);
}

.pagination .button-link{
  font-family: Georgia, serif;
  font-size: 0.9rem;
  padding: 6px 12px;
}
/* ==============================
Single-Article Body Typography
================================*/
.content-body{
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
  font-size: 1rem;
}

.content-body h2,
.content-body h3{
  margin-top: 1.5em;
}
/*===============================
Tags
===================================*/
.tag-filter{
  font-family: Georgia, serif;
  font-size: 0.95rem;
}

.tag-chip{
  display: inline-block;
  margin: 4px 6px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(60,40,25,0.25);
  background: rgba(255,255,255,0.25);
  color: rgba(43,33,27,0.92);
  text-decoration: none;
}

.tag-chip:hover{
  background: rgba(201, 52, 54, 0.08);
  text-decoration: none;
}

.tag-chip--active{
  border-color: rgba(201, 52, 54, 0.6);
  background: rgba(201, 52, 54, 0.12);
  font-weight: 700;
}
.category-sort select{
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(60,40,25,0.35);
  background: rgba(255,255,255,0.65);
  font-family: Georgia, serif;
}
.category-tools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 10px 0 14px;
  align-items:center;
}

.category-sort, .category-search{
  display:flex;
  gap:8px;
  align-items:center;
}

.category-sort-label{
  font-family: Georgia, serif;
  font-weight: 700;
}
.article-abstract{
  margin-top: 4px;
  font-family: Georgia, serif;
  font-size: 0.92rem;
  color: rgba(43,33,27,0.78);
  line-height: 1.45;
}


