/* Digital Curation Exchange (DCE) - Authentic Academic Portal Stylesheet */
:root {
  --unc-navy: #13294b;
  --unc-blue: #4b9cd3;
  --dce-blue-dark: #1b365d;
  --dce-blue-mid: #2c5282;
  --dce-blue-light: #ebf4ff;
  --dce-teal: #2b6cb0;
  --dce-accent: #c53030;
  --bg-page: #eef2f6;
  --bg-card: #ffffff;
  --bg-subtle: #f7fafc;
  --border-color: #cbd5e0;
  --border-light: #e2e8f0;
  --text-main: #1a202c;
  --text-muted: #4a5568;
  --text-light: #718096;
  --link-color: #1e4e8c;
  --link-hover: #0f294a;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
}

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

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Top Institutional Bar */
.top-bar {
  background-color: #0d1f38;
  color: #cbd5e0;
  font-size: 12.5px;
  padding: 6px 0;
  border-bottom: 1px solid #233858;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar a {
  color: #90cdf4;
}

.top-bar-links {
  display: flex;
  gap: 16px;
}

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

/* Site Header */
.site-header {
  background: linear-gradient(135deg, #13294b 0%, #1e4273 60%, #285791 100%);
  color: #ffffff;
  padding: 24px 0 0 0;
  border-bottom: 4px solid var(--unc-blue);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(75, 156, 211, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: #ffffff;
  flex-shrink: 0;
}

.site-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.site-title a {
  color: #ffffff;
  text-decoration: none;
}

.site-slogan {
  margin: 4px 0 0 0;
  font-size: 14.5px;
  color: #bee3f8;
  font-style: italic;
}

.header-search {
  display: flex;
  gap: 6px;
  align-items: center;
}

.header-search input[type="search"] {
  padding: 7px 12px;
  border-radius: 4px;
  border: 1px solid #4a6991;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-main);
  font-size: 13.5px;
  width: 220px;
}

.header-search button {
  padding: 7px 14px;
  background-color: var(--unc-blue);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.header-search button:hover {
  background-color: #3a89c2;
}

/* Primary Drupal Navigation */
.primary-nav {
  background-color: rgba(10, 24, 44, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 10px 16px;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--unc-blue);
  color: #ffffff;
  text-decoration: none;
}

/* Submenu dropdown on hover */
.subnav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  list-style: none;
  padding: 4px 0;
  margin: 0;
  z-index: 50;
}

.nav-item:hover .subnav {
  display: block;
}

.subnav li a {
  display: block;
  padding: 7px 14px;
  color: var(--text-main);
  font-size: 13px;
  border-bottom: 1px solid #f1f5f9;
}

.subnav li a:hover {
  background-color: var(--dce-blue-light);
  color: var(--unc-navy);
  text-decoration: none;
}

/* Main Page 2-Column / 3-Column Grid */
.page-body {
  padding: 24px 0 40px 0;
}

.layout-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* Sidebar Blocks */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.block-title {
  margin: 0;
  padding: 10px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
  color: var(--unc-navy);
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.block-content {
  padding: 12px 14px;
  font-size: 13.5px;
}

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

.block-menu li {
  border-bottom: 1px solid var(--border-light);
}

.block-menu li:last-child {
  border-bottom: none;
}

.block-menu li a {
  display: block;
  padding: 6px 4px;
  color: var(--link-color);
  font-size: 13.5px;
}

.block-menu li a:hover {
  color: var(--unc-navy);
  background-color: #f8fafc;
}

/* Main Content Area */
.main-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 26px 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  min-width: 0;
}

.breadcrumb {
  font-size: 12.5px;
  color: var(--text-light);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.breadcrumb a {
  color: var(--link-color);
}

.page-title {
  margin: 0 0 14px 0;
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--unc-navy);
  line-height: 1.3;
}

.node-submitted {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
  padding: 6px 10px;
  background-color: var(--bg-subtle);
  border-left: 3px solid var(--unc-blue);
}

.node-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  background-color: var(--dce-blue-light);
  color: var(--unc-navy);
  border: 1px solid #bee3f8;
}

.badge-type {
  background-color: #edf2f7;
  color: #2d3748;
  border-color: #cbd5e0;
}

/* Callout / Welcome Box */
.welcome-box {
  background: linear-gradient(to right, #ebf8ff, #f7fafc);
  border: 1px solid #bee3f8;
  border-left: 4px solid var(--unc-blue);
  padding: 16px 20px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.welcome-box h2 {
  margin: 0 0 8px 0;
  font-size: 19px;
  color: var(--unc-navy);
}

.welcome-box p {
  margin: 0;
}

/* Tables (Drupal Views style) */
.views-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px 0;
  font-size: 14px;
}

.views-table th {
  background-color: #edf2f7;
  color: var(--unc-navy);
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 13px;
}

.views-table td {
  padding: 9px 12px;
  border: 1px solid var(--border-light);
  vertical-align: top;
}

.views-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.views-table tr:hover {
  background-color: #ebf8ff;
}

/* Attachments Box */
.attachments-box {
  margin-top: 24px;
  padding: 16px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.attachments-box h3 {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: var(--unc-navy);
}

/* Filter Form on /resources */
.filter-panel {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 6px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.filter-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 7px 15px;
  background-color: var(--unc-navy);
  color: #ffffff;
  border-radius: 4px;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--dce-blue-mid);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  background-color: #e2e8f0;
  color: #1a202c;
}

.btn-secondary:hover {
  background-color: #cbd5e0;
  color: #1a202c;
}

/* Content Typography */
.content-prose h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--unc-navy);
  margin-top: 24px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
}

.content-prose h3 {
  font-size: 16.5px;
  color: var(--dce-blue-dark);
  margin-top: 18px;
  margin-bottom: 8px;
}

.content-prose p {
  margin: 0 0 14px 0;
}

.content-prose ul,
.content-prose ol {
  margin: 0 0 16px 0;
  padding-left: 22px;
}

.content-prose li {
  margin-bottom: 6px;
}

.content-prose blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  background: var(--bg-subtle);
  border-left: 4px solid var(--unc-blue);
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background-color: #13294b;
  color: #cbd5e0;
  padding: 32px 0 24px 0;
  font-size: 13px;
  border-top: 4px solid var(--unc-blue);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}

.site-footer h4 {
  color: #ffffff;
  margin: 0 0 12px 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.site-footer a {
  color: #93c5fd;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
  background-color: transparent !important;
}

/* Explicit overrides for footer menus to avoid blue-on-blue and white hover boxes */
.site-footer .block-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer .block-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .block-menu li:last-child {
  border-bottom: none;
}

.site-footer .block-menu li a {
  display: block;
  padding: 6px 0;
  color: #bae6fd;
  font-size: 13.5px;
  background-color: transparent !important;
  text-decoration: none;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.site-footer .block-menu li a:hover {
  color: #ffffff;
  background-color: transparent !important;
  text-decoration: none;
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  color: #a0aec0;
}

@media (max-width: 840px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
  .filter-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
