/**
 * ==============================================================================
 * OJS MATERIAL THEME - CUSTOM BRAND STYLESHEET
 * ==============================================================================
 * 
 * Instructions:
 * 1. Log into your OJS Journal as Journal Manager / Administrator.
 * 2. Go to: Settings > Website > Appearance > Advanced.
 * 3. In the "Journal Stylesheet" section, click "Upload a file" and upload this CSS file.
 * 4. Save changes and refresh your journal page.
 *
 * Brand Palette Definition:
 * - Primary (Main):           Royal Blue            #0B4DA2  rgb(11, 77, 162)
 * - Secondary / Accent:       Vivid Yellow / Amber  #FFC20E  rgb(255, 194, 14)
 * - Dark Contrast (Text):     Deep Navy Blue        #0D356A  rgb(13, 53, 106)
 * - Light Contrast (Text):    Pure White            #FFFFFF  rgb(255, 255, 255)
 * - Callout / Pop (Megaphone):Bright Red            #D8232A  rgb(216, 35, 42)
 * ==============================================================================
 */

/* ------------------------------------------------------------------------------
   1. CSS Custom Properties / Design Tokens
   ------------------------------------------------------------------------------ */
:root {
  /* Brand Core */
  --brand-primary: #0B4DA2;           /* Royal Blue */
  --brand-primary-hover: #083d82;     /* Darker Royal Blue */
  --brand-primary-active: #062b5c;
  --brand-primary-light: #eef5fc;     /* Soft Royal Blue Tint */
  --brand-primary-border: #bae0fd;

  --brand-secondary: #FFC20E;         /* Vivid Yellow / Amber */
  --brand-secondary-hover: #e5ad08;   /* Deep Amber Hover */
  --brand-secondary-active: #cc9900;
  --brand-secondary-text: #0D356A;    /* Navy Text on Amber for High Contrast */

  --brand-dark-text: #0D356A;         /* Deep Navy Blue */
  --brand-dark-muted: #2d5282;        /* Secondary Navy Text */
  
  --brand-white: #FFFFFF;             /* Pure White */
  
  --brand-pop: #D8232A;               /* Bright Red (Megaphone / Callout) */
  --brand-pop-hover: #b81b21;
  --brand-pop-light: #fef2f2;         /* Soft Red Callout Background */
  --brand-pop-border: #fecaca;
  
  /* Focus & Rings */
  --brand-focus-ring: rgba(11, 77, 162, 0.35);
  --brand-accent-ring: rgba(255, 194, 14, 0.45);
}

/* Dark Mode Adjustments */
html.dark {
  --brand-primary: #38a4f4;           /* Lighter Royal for dark contrast */
  --brand-primary-hover: #7cc4fa;
  --brand-primary-light: rgba(11, 77, 162, 0.25);
  --brand-primary-border: rgba(56, 164, 244, 0.3);

  --brand-dark-text: #FFFFFF;         /* Pure White text in dark mode */
  --brand-dark-muted: #cbd5e1;
  
  --brand-pop-light: rgba(216, 35, 42, 0.15);
  --brand-pop-border: rgba(216, 35, 42, 0.35);
}

/* ------------------------------------------------------------------------------
   2. Blue Navbar & Header Styling
   ------------------------------------------------------------------------------ */

/* Main Header Container */
header.sticky,
header.sticky.bg-white,
header[class*="sticky"],
.pkp_structure_head {
  background: linear-gradient(135deg, #093268 0%, #0B4DA2 55%, #1059b8 100%) !important;
  border-bottom: 3px solid var(--brand-secondary) !important; /* Vivid Amber accent border */
  box-shadow: 0 4px 20px rgba(11, 77, 162, 0.35) !important;
}

/* Journal Title & Subtitle in Blue Header */
header.sticky h1,
header.sticky .font-bold,
header.sticky .text-slate-900,
header.sticky .site_title,
header.sticky .pkp_site_name {
  color: var(--brand-white) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

header.sticky p,
header.sticky .text-slate-500 {
  color: #dbeafe !important; /* Soft icy-blue for secondary text */
}

/* Header SVG Logo & Brand Icons */
header.sticky svg:not([aria-hidden="true"]) {
  color: var(--brand-secondary) !important;
  stroke: var(--brand-secondary) !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ------------------------------------------------------------------------------
   Header Brand Logo Image (Controls Size for Square & Rectangular Logos)
   ------------------------------------------------------------------------------ */
header.sticky img,
header.sticky img.img-fluid,
header.sticky .img-fluid,
header.sticky a > img,
header.sticky .site_logo img,
header.sticky .pkp_site_name img,
header.sticky .is_img img {
  max-height: 48px !important;
  height: auto !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 0.375rem !important;
  transition: transform 0.2s ease, filter 0.2s ease !important;
}

header.sticky a > img:hover,
header.sticky img.img-fluid:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

/* Ensure compact, balanced navbar height */
header.sticky,
header.sticky.bg-white,
header[class*="sticky"],
.pkp_structure_head {
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

@media (max-width: 768px) {
  header.sticky img,
  header.sticky img.img-fluid,
  header.sticky .img-fluid,
  header.sticky a > img {
    max-height: 38px !important;
    max-width: 120px !important;
  }
}

/* ==============================================================================
   HEADER NAVIGATION LINKS (HIGH-VISIBILITY NORMAL & HOVER STATES)
   ============================================================================== */

/* ==============================================================================
   HEADER NAVIGATION LINKS & DROPDOWN MENUS
   ============================================================================== */

/* 1. TOP-LEVEL TRIGGER BUTTONS ONLY (Excluding items inside dropdown bodies) */
header.sticky nav > a,
header.sticky ul#navigationPrimary > li > a,
header.sticky ul#navigationPrimary > li > div > a:first-child,
header.sticky ul#navigationUser > li > a,
header.sticky ul#navigationUser > li > div > a:first-child,
header.sticky a[class*="items-center"][class*="rounded-xl"] {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 0.75rem !important;
  padding: 0.35rem 0.85rem !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  opacity: 1 !important;
  text-decoration: none !important;
}

/* HIGH-VISIBILITY HOVER STATE: Glowing Vivid Amber Pill with Deep Navy Text */
header.sticky nav > a:hover,
header.sticky ul#navigationPrimary > li > a:hover,
header.sticky ul#navigationPrimary > li > div > a:first-child:hover,
header.sticky ul#navigationUser > li > a:hover,
header.sticky ul#navigationUser > li > div > a:first-child:hover,
header.sticky a[class*="items-center"][class*="rounded-xl"]:hover {
  background: #FFC20E !important;
  background-color: #FFC20E !important;
  color: #0D356A !important;
  -webkit-text-fill-color: #0D356A !important;
  border-color: #FFC20E !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 16px rgba(255, 194, 14, 0.7) !important;
  transform: translateY(-1.5px) !important;
  text-shadow: none !important;
}

/* Active / Current Navigation Item */
header.sticky nav > a.active,
header.sticky ul#navigationPrimary > li.current > a,
header.sticky ul#navigationPrimary > li.current > div > a:first-child,
header.sticky .pkp_navigation_primary > li.current > div > a:first-child {
  background-color: rgba(255, 194, 14, 0.25) !important;
  border-color: #FFC20E !important;
  color: #FFC20E !important;
  -webkit-text-fill-color: #FFC20E !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(255, 194, 14, 0.35) !important;
}

/* 2. DROPDOWN CONTAINERS (Floating Popover Menu Only - Must be Absolute) */
header.sticky div.absolute[x-show],
header.sticky div.absolute.right-0,
header.sticky [class*="origin-top-right"],
header.sticky .absolute[class*="rounded-md"] {
  background-color: #FFFFFF !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
  padding: 0.4rem 0 !important;
  min-width: 13rem !important;
  z-index: 1000 !important;
}

/* 3. DROPDOWN MENU ITEMS (Deep Navy Text on Clean White Background) */
header.sticky div.absolute[x-show] a,
header.sticky [class*="origin-top-right"] a,
header.sticky div.absolute.right-0 a,
header.sticky .absolute ul li a {
  color: #0D356A !important;
  -webkit-text-fill-color: #0D356A !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0.375rem !important;
  box-shadow: none !important;
  padding: 0.6rem 1.1rem !important;
  margin: 0.15rem 0.4rem !important;
  display: block !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  text-align: left !important;
  transform: none !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
  text-decoration: none !important;
}

/* Dropdown Menu Item Hover State: Soft Royal Blue Highlight */
header.sticky div.absolute[x-show] a:hover,
header.sticky [class*="origin-top-right"] a:hover,
header.sticky div.absolute.right-0 a:hover,
header.sticky .absolute ul li a:hover {
  background-color: #eef5fc !important;
  color: #0B4DA2 !important;
  -webkit-text-fill-color: #0B4DA2 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Dark Mode Dropdown Container & Items */
html.dark header.sticky div.absolute[x-show],
html.dark header.sticky [class*="origin-top-right"],
html.dark header.sticky div.absolute.right-0 {
  background-color: #092650 !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

html.dark header.sticky div.absolute[x-show] a,
html.dark header.sticky [class*="origin-top-right"] a,
html.dark header.sticky div.absolute.right-0 a {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
}

html.dark header.sticky div.absolute[x-show] a:hover,
html.dark header.sticky [class*="origin-top-right"] a:hover,
html.dark header.sticky div.absolute.right-0 a:hover {
  background-color: rgba(255, 194, 14, 0.2) !important;
  color: #FFC20E !important;
  -webkit-text-fill-color: #FFC20E !important;
}

/* 4. THEME TOGGLE (DARK/LIGHT MODE) BUTTON - PRECISE COMPACT PILL */
header.sticky button[aria-label="Theme"],
header.sticky button[id*="headlessui-listbox-button"],
header.sticky div:not(.pkp_navigation_search_wrapper) > button.rounded-xl {
  width: 2.15rem !important;
  min-width: 2.15rem !important;
  max-width: 2.15rem !important;
  height: 2.15rem !important;
  min-height: 2.15rem !important;
  max-height: 2.15rem !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

header.sticky button[aria-label="Theme"]:hover,
header.sticky button[id*="headlessui-listbox-button"]:hover {
  background-color: #FFC20E !important;
  border-color: #FFC20E !important;
  box-shadow: 0 4px 14px rgba(255, 194, 14, 0.6) !important;
  transform: translateY(-1px) !important;
}

/* Reset inner icon wrappers inside Theme Toggle (Allow Alpine x-show to control visibility) */
header.sticky button[aria-label="Theme"] div,
header.sticky button[aria-label="Theme"] div[x-show],
header.sticky button[id*="headlessui-listbox-button"] div {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Ensure Alpine.js x-show hide state is strictly respected */
header.sticky button[aria-label="Theme"] div[style*="display: none"],
header.sticky button[aria-label="Theme"] [style*="display: none"],
header.sticky button[id*="headlessui-listbox-button"] div[style*="display: none"],
header.sticky button[aria-label="Theme"] [hidden] {
  display: none !important;
}

/* Theme Toggle SVG Icon */
header.sticky button[aria-label="Theme"] svg,
header.sticky button[id*="headlessui-listbox-button"] svg {
  width: 1.15rem !important;
  height: 1.15rem !important;
  color: #FFC20E !important;
  stroke: #FFC20E !important;
  display: block !important;
  margin: auto !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

header.sticky button[aria-label="Theme"]:hover svg,
header.sticky button[id*="headlessui-listbox-button"]:hover svg {
  color: #0D356A !important;
  stroke: #0D356A !important;
  filter: none;
}

/* Search Icon Button in Header */
header.sticky .pkp_navigation_search_wrapper a {
  width: 2.15rem !important;
  min-width: 2.15rem !important;
  max-width: 2.15rem !important;
  height: 2.15rem !important;
  min-height: 2.15rem !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  flex-shrink: 0 !important;
}

header.sticky .pkp_navigation_search_wrapper a:hover {
  background-color: #FFC20E !important;
  border-color: #FFC20E !important;
  box-shadow: 0 4px 14px rgba(255, 194, 14, 0.6) !important;
  transform: translateY(-1px) !important;
}

header.sticky .pkp_navigation_search_wrapper a svg,
.pkp_navigation_search_wrapper a svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem !important;
  min-height: 1.25rem !important;
  fill: #FFC20E !important;
  color: #FFC20E !important;
  display: block !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transition: fill 0.15s ease, color 0.15s ease !important;
}

header.sticky .pkp_navigation_search_wrapper a:hover svg,
.pkp_navigation_search_wrapper a:hover svg {
  fill: #0D356A !important;
  color: #0D356A !important;
  filter: none;
}

/* Header User Navigation / Login Link */
header.sticky a[href*="login"],
header.sticky .login:not(.rounded-full) {
  color: var(--brand-white) !important;
  font-weight: 600;
}

header.sticky a[href*="login"]:hover {
  color: var(--brand-secondary) !important;
}

/* Header Register Button: High-visibility Amber Pill */
header.sticky a[href*="register"],
header.sticky .register,
header.sticky a.rounded-full[class*="bg-slate"] {
  background: linear-gradient(135deg, #FFC20E 0%, #ffcf33 100%) !important;
  color: var(--brand-secondary-text) !important;
  font-weight: 700 !important;
  font-size: 0.8125rem !important;
  padding: 0.45rem 1.15rem !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 2px 10px rgba(255, 194, 14, 0.35) !important;
  transition: all 0.2s ease !important;
}

header.sticky a[href*="register"]:hover,
header.sticky .register:hover,
header.sticky a.rounded-full[class*="bg-slate"]:hover {
  background: linear-gradient(135deg, #e5ad08 0%, #FFC20E 100%) !important;
  color: var(--brand-dark-text) !important;
  box-shadow: 0 4px 16px rgba(255, 194, 14, 0.6) !important;
  transform: translateY(-1px);
}

/* ==============================================================================
   5. MOBILE PHONE NAVBAR MENU & SLIDE-OUT DRAWER (SIDESTACK)
   ============================================================================== */

/* 5.1 Mobile Hamburger Button (On the Blue Sticky Header) */
header.sticky button[aria-label="Open navigation"],
header.sticky [x-data] > button[aria-label="Open navigation"] {
  width: 2.15rem !important;
  min-width: 2.15rem !important;
  height: 2.15rem !important;
  min-height: 2.15rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

header.sticky button[aria-label="Open navigation"] svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
  stroke: #FFC20E !important; /* Vivid Amber Hamburger Icon */
  stroke-width: 2.2 !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

header.sticky button[aria-label="Open navigation"]:hover {
  background-color: #FFC20E !important;
  border-color: #FFC20E !important;
  box-shadow: 0 4px 14px rgba(255, 194, 14, 0.6) !important;
}

header.sticky button[aria-label="Open navigation"]:hover svg {
  stroke: #0D356A !important;
  filter: none;
}

/* 5.2 Mobile Drawer Panel (Slide-out Navigation) - SOLID NAVBAR ROYAL BLUE COLOR */
div[id*="headlessui-dialog"] .max-w-xs,
div[aria-label="Navigation"] .max-w-xs,
div.h-screen.fixed .max-w-xs,
div[id*="headlessui-dialog-panel"].max-w-xs,
div[id*="headlessui-dialog-panel"].min-h-full,
div.max-w-xs[id*="headlessui-dialog-panel"],
div[id*="headlessui-dialog"] > div.min-h-full,
div[aria-label="Navigation"] > div.min-h-full,
div.h-screen.fixed > div.min-h-full {
  background: linear-gradient(180deg, #07254e 0%, #0B4DA2 50%, #083b7e 100%) !important;
  background-color: #0B4DA2 !important; /* Solid Navbar Royal Blue */
  border-right: 3px solid var(--brand-secondary) !important; /* Crisp Vivid Amber Gold Border */
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6) !important;
  color: #FFFFFF !important;
  opacity: 1 !important;
}

/* Ensure inner panel and content wrappers NEVER receive duplicate border-right or override outer background */
div.max-w-xs > div.pt-5,
div.max-w-xs [id*="headlessui-dialog-panel"],
div.max-w-xs div.space-y-9,
div.min-h-full > div.pt-5 {
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* 5.3 Close Button in the Mobile Drawer */
div[id*="headlessui-dialog"] div.h-8.w-8,
div.h-screen.fixed div.h-8.w-8 {
  background-color: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease !important;
}

div[id*="headlessui-dialog"] div.h-8.w-8 svg,
div.h-screen.fixed div.h-8.w-8 svg {
  stroke: #FFC20E !important; /* Vivid Amber Close 'X' Icon */
  stroke-width: 2.2 !important;
}

div[id*="headlessui-dialog"] div.h-8.w-8:hover,
div.h-screen.fixed div.h-8.w-8:hover {
  background-color: #FFC20E !important;
  border-color: #FFC20E !important;
}

div[id*="headlessui-dialog"] div.h-8.w-8:hover svg,
div.h-screen.fixed div.h-8.w-8:hover svg {
  stroke: #0D356A !important;
}

/* 5.4 Primary Menu Links inside Mobile Drawer (Current, Archives, About) */
div[id*="headlessui-dialog"] ul#navigationPrimary > li > a,
div[id*="headlessui-dialog"] ul#navigationPrimary > li > div > a:first-child,
div.h-screen.fixed ul#navigationPrimary > li > a,
div.h-screen.fixed ul#navigationPrimary > li > div > a:first-child,
div[id*="headlessui-dialog-panel"] ul#navigationPrimary a.font-display {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  text-transform: none !important; /* Clean Title Case: Current, Archives, About */
  letter-spacing: 0.01em !important;
  padding: 0.4rem 0.5rem !important;
  display: block !important;
  border-radius: 0.5rem !important;
  transition: all 0.18s ease !important;
  text-decoration: none !important;
}

div[id*="headlessui-dialog"] ul#navigationPrimary > li > a:hover,
div[id*="headlessui-dialog"] ul#navigationPrimary > li > div > a:first-child:hover,
div.h-screen.fixed ul#navigationPrimary > li > a:hover,
div.h-screen.fixed ul#navigationPrimary > li > div > a:first-child:hover,
div[id*="headlessui-dialog-panel"] ul#navigationPrimary a.font-display:hover {
  color: #FFC20E !important;
  -webkit-text-fill-color: #FFC20E !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  padding-left: 0.75rem !important;
}

/* 5.5 Continuous Tree Line for Submenus (About the Journal, Submissions, Contact, etc.) */
div[id*="headlessui-dialog"] ul[role="list"].border-l-2,
div[aria-label="Navigation"] ul[role="list"].border-l-2,
div.h-screen.fixed ul[role="list"].border-l-2,
div[id*="headlessui-dialog-panel"] ul.border-l-2 {
  border-left: 2px solid rgba(255, 255, 255, 0.22) !important; /* Continuous vertical tree line */
  margin-left: 0.5rem !important;
  padding-left: 0.75rem !important;
  margin-top: 0.35rem !important;
}

/* Submenu Links - Clean text without disconnected border-left segments */
div[id*="headlessui-dialog"] a[class*="pl-3.5"],
div.h-screen.fixed a[class*="pl-3.5"],
div[id*="headlessui-dialog"] ul#navigationPrimary ul li a,
div.h-screen.fixed ul#navigationPrimary ul li a,
div[id*="headlessui-dialog-panel"] [class*="material_submenu"] a,
div[id*="headlessui-dialog-panel"] ul#navigationPrimary ul a {
  border-left: none !important; /* Remove choppy per-item borders */
  border: none !important;
  color: rgba(255, 255, 255, 0.88) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  padding: 0.35rem 0.5rem !important;
  display: block !important;
  border-radius: 0.375rem !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
}

div[id*="headlessui-dialog"] a[class*="pl-3.5"]:hover,
div.h-screen.fixed a[class*="pl-3.5"]:hover,
div[id*="headlessui-dialog"] ul#navigationPrimary ul li a:hover,
div.h-screen.fixed ul#navigationPrimary ul li a:hover,
div[id*="headlessui-dialog-panel"] [class*="material_submenu"] a:hover,
div[id*="headlessui-dialog-panel"] ul#navigationPrimary ul a:hover {
  color: #FFC20E !important;
  -webkit-text-fill-color: #FFC20E !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  padding-left: 0.75rem !important;
}

/* 5.6 Drawer Section Headings (Information, Sidebar Titles) */
div[id*="headlessui-dialog"] .pkp_block h2,
div[id*="headlessui-dialog"] .pkp_block h3,
div[id*="headlessui-dialog"] .pkp_block .title,
div[id*="headlessui-dialog"] .pkp_block span.title,
div[id*="headlessui-dialog"] div.xl\:hidden h2,
div.h-screen.fixed .pkp_block h2,
div.h-screen.fixed .pkp_block h3,
div.h-screen.fixed .pkp_block .title {
  color: #FFC20E !important; /* Vivid Amber Section Headers */
  -webkit-text-fill-color: #FFC20E !important;
  font-weight: 700 !important;
  font-size: 0.8125rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  padding-bottom: 0.35rem !important;
}

/* 5.7 Sidebar Block Links (For Readers, Authors, Librarians) */
div[id*="headlessui-dialog"] .pkp_block li a,
div.h-screen.fixed .pkp_block li a,
div[id*="headlessui-dialog-panel"] .pkp_block a {
  border-left: none !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.88) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.88) !important;
  padding: 0.35rem 0.5rem !important;
  display: block !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  text-transform: none !important;
  border-radius: 0.375rem !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
}

div[id*="headlessui-dialog"] .pkp_block li a:hover,
div.h-screen.fixed .pkp_block li a:hover,
div[id*="headlessui-dialog-panel"] .pkp_block a:hover {
  color: #FFC20E !important;
  -webkit-text-fill-color: #FFC20E !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  padding-left: 0.75rem !important;
}

/* 5.8 User Menu in Drawer (Logged-in User, Dashboard, Profile) */
div[id*="headlessui-dialog"] ul#navigationUser,
div.h-screen.fixed ul#navigationUser {
  margin-top: 1.5rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
  padding-top: 0.75rem !important;
}

/* User identity header (e.g. ascadmin) */
div[id*="headlessui-dialog"] ul#navigationUser > li.profile > a.font-display,
div.h-screen.fixed ul#navigationUser > li.profile > a.font-display {
  color: #FFC20E !important;
  -webkit-text-fill-color: #FFC20E !important;
  font-weight: 700 !important;
  font-size: 0.8125rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  padding: 0.35rem 0.5rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  margin-bottom: 0.5rem !important;
  display: block !important;
}

/* User action links (Dashboard, View Profile, Logout) */
div[id*="headlessui-dialog"] ul#navigationUser ul li a,
div.h-screen.fixed ul#navigationUser ul li a {
  border-left: none !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.88) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.9375rem !important;
  font-weight: 400 !important;
  text-transform: none !important; /* Normal case: Dashboard, View Profile */
  letter-spacing: normal !important;
  padding: 0.35rem 0.5rem !important;
  display: block !important;
  border-radius: 0.375rem !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
}

div[id*="headlessui-dialog"] ul#navigationUser ul li a:hover,
div.h-screen.fixed ul#navigationUser ul li a:hover {
  color: #FFC20E !important;
  -webkit-text-fill-color: #FFC20E !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  padding-left: 0.75rem !important;
}

/* 5.9 Drawer Login & Register Buttons (When logged out) */
div[id*="headlessui-dialog"] a.login,
div[id*="headlessui-dialog"] a[href*="login"],
div.h-screen.fixed a.login,
div.h-screen.fixed a[href*="login"],
div.max-w-xs a.login,
div.max-w-xs a[href*="login"] {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
  padding: 0.45rem 0.65rem !important;
  display: inline-block !important;
  transition: all 0.15s ease !important;
  text-decoration: none !important;
}

div[id*="headlessui-dialog"] a.login:hover,
div[id*="headlessui-dialog"] a[href*="login"]:hover,
div.h-screen.fixed a.login:hover,
div.h-screen.fixed a[href*="login"]:hover,
div.max-w-xs a.login:hover,
div.max-w-xs a[href*="login"]:hover {
  color: #FFC20E !important;
  -webkit-text-fill-color: #FFC20E !important;
}

div[id*="headlessui-dialog"] a.register,
div[id*="headlessui-dialog"] a[href*="register"],
div.h-screen.fixed a.register,
div.h-screen.fixed a[href*="register"],
div.max-w-xs a.register,
div.max-w-xs a[href*="register"] {
  background: linear-gradient(135deg, #FFC20E 0%, #ffcf33 100%) !important;
  color: #0D356A !important;
  -webkit-text-fill-color: #0D356A !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  padding: 0.45rem 1.25rem !important;
  border-radius: 9999px !important;
  display: inline-flex !important;
  align-items: center !important;
  box-shadow: 0 4px 14px rgba(255, 194, 14, 0.4) !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0.5rem !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 0.18s ease !important;
}

div[id*="headlessui-dialog"] a.register:hover,
div[id*="headlessui-dialog"] a[href*="register"]:hover,
div.h-screen.fixed a.register:hover,
div.h-screen.fixed a[href*="register"]:hover,
div.max-w-xs a.register:hover,
div.max-w-xs a[href*="register"]:hover {
  background: linear-gradient(135deg, #e5ad08 0%, #FFC20E 100%) !important;
  box-shadow: 0 6px 20px rgba(255, 194, 14, 0.6) !important;
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------------------
   3. Updated Button System Across the Theme
   ------------------------------------------------------------------------------ */

/* 3.1 Primary CTA Button: "Make a Submission" in Hero Header */
a[href*="submissions"][role="button"],
a[href*="submissions"].rounded-full,
a.rounded-full[class*="bg-"][class*="-300"]:not(.galley_link) {
  background: linear-gradient(135deg, #FFC20E 0%, #ffcf33 100%) !important;
  color: var(--brand-secondary-text) !important;
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  padding: 0.65rem 1.6rem !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 16px rgba(255, 194, 14, 0.45) !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  letter-spacing: 0.01em;
}

a[href*="submissions"][role="button"]:hover,
a[href*="submissions"].rounded-full:hover,
a.rounded-full[class*="bg-"][class*="-300"]:not(.galley_link):hover {
  background: linear-gradient(135deg, #e5ad08 0%, #FFC20E 100%) !important;
  color: var(--brand-dark-text) !important;
  box-shadow: 0 8px 24px rgba(255, 194, 14, 0.65) !important;
  transform: translateY(-2px);
}

a[href*="submissions"][role="button"]:active,
a[href*="submissions"].rounded-full:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 194, 14, 0.4) !important;
}

/* 3.2 Hero Secondary Button: "Browse Archives" (Sleek Glass / Outline) */
div.relative.overflow-hidden a[href*="archive"].rounded-full,
div.relative.overflow-hidden a.rounded-full[class*="bg-slate"] {
  background: rgba(255, 255, 255, 0.12) !important;
  color: var(--brand-white) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
  font-weight: 600 !important;
  font-size: 0.9375rem !important;
  padding: 0.65rem 1.6rem !important;
  border-radius: 9999px !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
}

div.relative.overflow-hidden a[href*="archive"].rounded-full:hover,
div.relative.overflow-hidden a.rounded-full[class*="bg-slate"]:hover {
  background: rgba(255, 255, 255, 0.24) !important;
  border-color: var(--brand-white) !important;
  color: var(--brand-white) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
  transform: translateY(-1.5px);
}

/* 3.3 Galley Download Buttons (PDF, HTML, EPUB, XML Downloads) */
a.galley_link,
.galley_link,
a[class*="galley_link"],
a.rounded-full.galley_link,
a.rounded-full[href*="article/view/"] {
  background: linear-gradient(135deg, #FFC20E 0%, #ffc926 100%) !important;
  color: var(--brand-secondary-text) !important;
  font-weight: 700 !important;
  font-size: 0.8125rem !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 9999px !important;
  border: 1px solid rgba(13, 53, 106, 0.15) !important;
  box-shadow: 0 2px 10px rgba(255, 194, 14, 0.38) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
}

a.galley_link:hover,
.galley_link:hover,
a[class*="galley_link"]:hover,
a.rounded-full.galley_link:hover,
a.rounded-full[href*="article/view/"]:hover {
  background: linear-gradient(135deg, #e5ad08 0%, #FFC20E 100%) !important;
  color: var(--brand-secondary-text) !important;
  box-shadow: 0 5px 16px rgba(255, 194, 14, 0.55) !important;
  transform: translateY(-1.5px);
}

a.galley_link:active,
.galley_link:active {
  transform: translateY(0);
}

/* 3.4 Form Submit & Search Buttons (Royal Blue Primary) */
button[type="submit"]:not([class*="bg-slate"]),
.pkp_button_primary,
form button[type="submit"] {
  background: linear-gradient(135deg, #0B4DA2 0%, #1062cb 100%) !important;
  color: var(--brand-white) !important;
  border-radius: 9999px !important;
  padding: 0.6rem 1.5rem !important;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 14px rgba(11, 77, 162, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

button[type="submit"]:not([class*="bg-slate"]):hover,
.pkp_button_primary:hover,
form button[type="submit"]:hover {
  background: linear-gradient(135deg, #083d82 0%, #0B4DA2 100%) !important;
  box-shadow: 0 6px 18px rgba(11, 77, 162, 0.5) !important;
  transform: translateY(-1px);
}

button[type="submit"]:active,
.pkp_button_primary:active {
  transform: translateY(0);
}

/* 3.5 General Rounded Buttons (Login Page, Registration Page) */
.page_login .login.rounded-full,
.page_register .login.rounded-full,
a.login.rounded-full,
a.register.rounded-full {
  border-radius: 9999px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

/* ------------------------------------------------------------------------------
   4. Typography & Dark Contrast Text (Deep Navy Blue #0D356A)
   ------------------------------------------------------------------------------ */
h1:not(header h1):not(div.relative.overflow-hidden *):not([class*="bg-slate"] *):not(div[id*="headlessui-dialog"] *):not(div.h-screen.fixed *):not([aria-label="Navigation"] *),
h2:not(header h2):not(div.relative.overflow-hidden *):not([class*="bg-slate"] *):not(div[id*="headlessui-dialog"] *):not(div.h-screen.fixed *):not([aria-label="Navigation"] *),
h3:not(header h3):not(div.relative.overflow-hidden *):not([class*="bg-slate"] *):not(div[id*="headlessui-dialog"] *):not(div.h-screen.fixed *):not([aria-label="Navigation"] *),
h4:not(div[id*="headlessui-dialog"] *):not(div.h-screen.fixed *):not([aria-label="Navigation"] *),
h5:not(div[id*="headlessui-dialog"] *):not(div.h-screen.fixed *):not([aria-label="Navigation"] *),
h6:not(div[id*="headlessui-dialog"] *):not(div.h-screen.fixed *):not([aria-label="Navigation"] *),
.font-display:not(div.relative.overflow-hidden *):not([class*="bg-slate"] *):not(div[id*="headlessui-dialog"] *):not(div.h-screen.fixed *):not([aria-label="Navigation"] *),
.current_issue h2,
.homepage_about h2,
.page_title,
.pkp_structure_main h1,
.pkp_structure_main h2,
.pkp_structure_main h3 {
  color: var(--brand-dark-text) !important;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* ==============================================================================
   HERO BANNER TITLE & DESCRIPTION - ALWAYS PURE WHITE
   ============================================================================== */
div.relative.overflow-hidden p.font-extrabold,
div.relative.overflow-hidden [class*="font-display"],
div.relative.overflow-hidden .font-display,
div.relative.overflow-hidden h1,
div.relative.overflow-hidden h2,
div.relative.overflow-hidden p,
div.relative.overflow-hidden .tracking-tight,
div[class*="overflow-hidden"][class*="bg-slate"] p.font-extrabold,
div[class*="overflow-hidden"][class*="bg-slate"] [class*="font-display"],
div[class*="overflow-hidden"][class*="bg-slate"] h1,
div[class*="overflow-hidden"][class*="bg-slate"] h2,
div[class*="overflow-hidden"][class*="bg-slate"] .text-5xl,
div[class*="overflow-hidden"][class*="bg-slate"] p {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
}

/* Journal description in Hero */
div.relative.overflow-hidden div[class*="text-2xl"],
div[class*="overflow-hidden"][class*="bg-slate"] div[class*="text-2xl"] {
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

/* Article titles in lists and details */
.obj_article_summary h2 a,
.obj_article_summary h3 a,
.article_summary h2 a,
.article_summary h3 a,
a[id^="article-"] {
  color: var(--brand-dark-text) !important;
  transition: color 0.18s ease-in-out;
}

.obj_article_summary h2 a:hover,
.obj_article_summary h3 a:hover,
.article_summary h2 a:hover,
.article_summary h3 a:hover,
a[id^="article-"]:hover {
  color: var(--brand-primary) !important;
  text-decoration: underline;
}

/* Metadata Definition Terms */
dt,
dl dt,
.obj_article_details dt {
  color: var(--brand-dark-text) !important;
  font-weight: 600;
}

/* ------------------------------------------------------------------------------
   5. Links, Form Controls, and Badges (Royal Blue #0B4DA2)
   ------------------------------------------------------------------------------ */

/* Hyperlinks across the theme */
a:not([class*="bg-"]):not([class*="rounded-full"]):not(header a) {
  color: var(--brand-primary);
  transition: color 0.15s ease-in-out;
}

a:not([class*="bg-"]):not([class*="rounded-full"]):not(header a):hover {
  color: var(--brand-primary-hover);
}

/* Override theme text color utilities (excluding Header & Hero elements) */
[class*="text-"][class*="-400"]:not(header *):not(div.relative.overflow-hidden *):not([class*="bg-slate"] *),
[class*="text-"][class*="-500"]:not(header *):not(div.relative.overflow-hidden *):not([class*="bg-slate"] *),
.prose a,
.prose-a\:text-*-400,
a.doi,
a.orcid,
a.break-words {
  color: var(--brand-primary) !important;
}

[class*="text-"][class*="-400"]:not(header *):not(div.relative.overflow-hidden *):not([class*="bg-slate"] *):hover,
[class*="text-"][class*="-500"]:not(header *):not(div.relative.overflow-hidden *):not([class*="bg-slate"] *):hover,
.prose a:hover,
a.doi:hover,
a.orcid:hover,
a.break-words:hover {
  color: var(--brand-primary-hover) !important;
}

/* Breadcrumbs active item */
.breadcrumbs li.current,
[class*="breadcrumbs"] li.current {
  color: var(--brand-primary) !important;
  font-weight: 600;
}

/* SVG Icons with theme color */
svg[class*="text-"][class*="-400"]:not(header svg),
svg.text-brand,
svg[class*="fill-"][class*="-400"]:not(header svg) {
  color: var(--brand-primary) !important;
  fill: currentColor !important;
}

/* Form inputs & focus states */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--brand-primary) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px var(--brand-focus-ring) !important;
}

/* Checkboxes and Radios */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

/* Soft Badges (Pages, Dates, Categories) */
span.rounded-md[class*="bg-green-50"],
span.rounded-md[class*="bg-sky-50"],
.obj_article_summary span[class*="rounded-md"] {
  background-color: var(--brand-primary-light) !important;
  color: var(--brand-primary) !important;
  border: 1px solid var(--brand-primary-border) !important;
  font-weight: 600;
}

/* ------------------------------------------------------------------------------
   6. Callout / Pop (Megaphone) - Bright Red #D8232A
      Announcements, Urgent Alerts, Call for Papers & Notices
   ------------------------------------------------------------------------------ */

/* Announcement Summary Card */
.obj_announcement_summary,
article.obj_announcement_summary,
.page_announcement .obj_announcement_full,
.announcement_summary {
  background-color: var(--brand-pop-light) !important;
  border-left: 4px solid var(--brand-pop) !important;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(216, 35, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.obj_announcement_summary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(216, 35, 42, 0.14);
}

/* Announcement Title */
.obj_announcement_summary h2 a,
.obj_announcement_summary h3 a,
.announcement_summary h2 a {
  color: var(--brand-dark-text) !important;
  font-weight: 700;
}

.obj_announcement_summary h2 a:hover,
.announcement_summary h2 a:hover {
  color: var(--brand-pop) !important;
}

/* Announcement Date Badge / Callout */
.obj_announcement_summary .date,
.announcement_summary .date {
  color: var(--brand-pop) !important;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.obj_announcement_summary .date::before {
  content: "📢";
  font-size: 0.95rem;
}

/* Read More Links in Announcements */
.obj_announcement_summary a.read_more,
.announcement_summary a.read_more {
  color: var(--brand-pop) !important;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
}

.obj_announcement_summary a.read_more:hover {
  color: var(--brand-pop-hover) !important;
  text-decoration: underline;
}

/* Form Validation Asterisks and Alert Callouts */
.required,
span.required,
.pkp_form_error,
.error {
  color: var(--brand-pop) !important;
}

/* ------------------------------------------------------------------------------
   7. Dark Mode Fine-Tuning
   ------------------------------------------------------------------------------ */
html.dark body {
  background-color: #071526 !important;
  color: #e2e8f0 !important;
}

html.dark .bg-white {
  background-color: #0b1e36 !important;
}

html.dark .text-gray-900,
html.dark .text-slate-900 {
  color: #f8fafc !important;
}

html.dark header.sticky {
  background: linear-gradient(135deg, #051b3a 0%, #072a5a 60%, #0a3a78 100%) !important;
}

html.dark .obj_announcement_summary {
  background-color: rgba(216, 35, 42, 0.08) !important;
  border-left-color: var(--brand-pop) !important;
}

/* ------------------------------------------------------------------------------
   8. Login & Authentication Pages - Remove Brand Logo & Polished Card Layout
   ------------------------------------------------------------------------------ */

/* Hide the standalone brand logo sitting above the login card */
body.pkp_page_login main > a#pkp_content_main + div,
body.pkp_page_login main > div:first-of-type:not(.page_login),
body.pkp_page_login main > div:not(.page_login):not(.page),
body.pkp_page_login img.img-fluid,
body.pkp_page_login .site_logo {
  display: none !important;
}

/* Modern selector fallbacks to hide the logo wrapper container */
@supports selector(:has(img)) {
  body.pkp_page_login main > div:has(> a > img),
  body.pkp_page_login main > div:has(> a[aria-label="Home page"]),
  body.pkp_page_login a:has(> img.img-fluid) {
    display: none !important;
  }
}

/* Also hide standalone logo on password reset and registration pages */
body.pkp_page_login.pkp_op_lostPassword main > div:not(.page_login):not(.page),
body.pkp_page_user.pkp_op_register main > a#pkp_content_main + div,
body.pkp_page_user.pkp_op_register main > div:not(.page_register):not(.page) {
  display: none !important;
}

/* Clean, modern card polish on login page */
body.pkp_page_login main {
  justify-content: center !important;
  align-items: center !important;
}

body.pkp_page_login .page_login,
.page.page_login {
  margin-top: 1rem !important;
  border-top: 4px solid var(--brand-primary) !important;
  box-shadow: 0 10px 25px -5px rgba(11, 77, 162, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
  border-radius: 0.75rem !important;
}

html.dark body.pkp_page_login .page_login,
html.dark .page.page_login {
  border-top: 4px solid var(--brand-secondary) !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

/* Print Optimization */
@media print {
  header.sticky {
    background: transparent !important;
    color: #000000 !important;
  }
  a {
    color: #000000 !important;
    text-decoration: underline !important;
  }
  .galley_link,
  a[href*="submissions"] {
    display: none !important;
  }
}
