/**
 * Component Stylesheet for Center of Eastern Indonesian Studies
 * Academic layout, cards, buttons, heroes, badges, search modal, date badges, prose formatting
 */

/* ==========================================================================
   Header, Navigation & Top Bar
   ========================================================================== */
.site-topbar {
  background-color: var(--theme-primary);
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-header {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--theme-border);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-navigation a {
  font-family: var(--font-nav);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--theme-text);
  padding: 0.5rem 0;
  position: relative;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--theme-secondary);
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--theme-secondary);
  transition: width 0.2s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after {
  width: 100%;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.ceis-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  text-decoration: none;
}

.ceis-btn-primary {
  background-color: var(--theme-primary);
  color: #ffffff;
}
.ceis-btn-primary:hover {
  background-color: var(--theme-secondary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.ceis-btn-secondary {
  background-color: var(--theme-secondary);
  color: #ffffff;
}
.ceis-btn-secondary:hover {
  filter: brightness(1.1);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.ceis-btn-outline {
  background-color: transparent;
  border-color: var(--theme-border);
  color: var(--theme-primary);
}
.ceis-btn-outline:hover {
  background-color: var(--theme-surface);
  border-color: var(--theme-secondary);
  color: var(--theme-secondary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.ceis-hero {
  position: relative;
  background-color: var(--theme-primary);
  color: #ffffff;
  padding: 5rem 0;
  overflow: hidden;
}

.ceis-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.25), transparent 60%),
              radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.8), transparent 70%);
  pointer-events: none;
}

.ceis-hero h1 {
  color: #ffffff;
}

/* ==========================================================================
   Cards & Layout Components
   ========================================================================== */
.ceis-card {
  background-color: #ffffff;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ceis-card:hover {
  border-color: var(--theme-secondary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ceis-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--theme-primary);
  color: #ffffff;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-family: var(--font-heading);
}

.ceis-date-badge .day {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.ceis-date-badge .month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-sand);
  margin-top: 2px;
}

/* Citation Box */
.ceis-citation-box {
  background-color: #f8fafc;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  user-select: all;
  word-break: break-word;
}

/* Back to top button */
.ceis-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background-color: var(--theme-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
}

.ceis-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ceis-back-to-top:hover {
  background-color: var(--theme-secondary);
  transform: translateY(-2px);
}

/* Regional hotspot indicator pulse */
@keyframes ceis-pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(20, 184, 166, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(20, 184, 166, 0);
  }
}

.ceis-station-pulse {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background-color: #14b8a6;
  animation: ceis-pulse-dot 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

/* Modal Search Overlay */
.ceis-search-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 19, 43, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.ceis-search-overlay.hidden {
  display: none !important;
}

.ceis-search-modal {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  border: 1px solid var(--theme-border);
}

/* ==========================================================================
   Article Prose & Single Post Formatting
   ========================================================================== */
.prose {
  color: var(--theme-text);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--theme-border);
  padding-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose ul, .prose ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  border-left: 4px solid var(--theme-secondary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--theme-surface);
  font-style: italic;
  color: var(--theme-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Pagination */
.pagination-wrapper .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  margin: 0 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--theme-border);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--theme-text);
}

.pagination-wrapper .page-numbers.current {
  background-color: var(--theme-primary);
  color: #ffffff;
  border-color: var(--theme-primary);
}

.pagination-wrapper .page-numbers:hover:not(.current) {
  border-color: var(--theme-secondary);
  color: var(--theme-secondary);
}
