/* =============================================
   JANAYUGAM E-PAPER  |  MODERN MINIMAL
   ============================================= */

:root {
  --accent: #1e4f7a;
  --accent-hover: #163c5e;
  --accent-light: #dbeafe;
  --accent-subtle: #eff6ff;
  --black: #0f172a;
  --gray-900: #1e293b;
  --gray-800: #27303f;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --font: 'Inter', 'Noto Sans Malayalam', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ml: 'Noto Sans Malayalam', sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: relative;
}

.logo-img {
  height: 34px;
  width: auto;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 42px;
  width: auto;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-date {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
}

.social-row {
  display: flex;
  gap: 2px;
}

.social-row a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  border-radius: 50%;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.social-row a:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* =============================================
   NAVIGATION
   ============================================= */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0;
}

.site-nav .navbar-toggler {
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  padding: 8px 16px;
  font-size: 14px;
  border-radius: var(--radius-xs);
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggler-text {
  font-size: 14px;
  font-weight: 500;
}

.site-nav .navbar-toggler:focus {
  box-shadow: none;
}

.site-nav .navbar-nav {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 0;
}

.site-nav .nav-link {
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 500;
  padding: 14px 16px;
  transition: all 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
}

.site-nav .nav-link:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.site-nav .nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

.site-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2.5px;
  background: linear-gradient(90deg, var(--accent), #2d74b8);
  border-radius: 2px 2px 0 0;
}

/* =============================================
   SHOWCASE (Homepage)
   ============================================= */
.showcase {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.showcase-inner {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 140px);
  position: relative;
  z-index: 1;
}

/* Left Panel */
.showcase-panel {
  width: 440px;
  flex-shrink: 0;
  padding: 56px 40px 48px;
  background: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  overflow-y: auto;
}

.panel-content {
  width: 100%;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--accent) 0%, #2d74b8 100%);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(30, 79, 122, 0.2);
}

.panel-title {
  font-size: 44px;
  font-weight: 900;
  color: var(--black);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.panel-date {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 36px;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.panel-edition-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gray-400);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-edition-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.edition-tabs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 32px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 8px;
}

.edition-tabs::-webkit-scrollbar {
  width: 3px;
}

.edition-tabs::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

.etab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xs);
  padding: 11px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: var(--font);
  position: relative;
  overflow: hidden;
}

.etab::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.etab:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}

.etab:hover::before {
  opacity: 1;
}

.etab.active {
  background: linear-gradient(135deg, var(--accent) 0%, #2d74b8 100%);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(30, 79, 122, 0.2);
}

.etab.active::before {
  opacity: 0;
}

.etab-en {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  transition: color 0.2s ease;
}

.etab:hover .etab-en {
  color: var(--accent-hover);
}

.etab.active .etab-en {
  color: var(--white);
}

.etab-ml {
  font-size: 12px;
  color: var(--gray-400);
  font-family: var(--font-ml);
  transition: color 0.2s ease;
}

.etab.active .etab-ml {
  color: rgba(255,255,255,0.8);
}

.panel-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: linear-gradient(135deg, var(--accent) 0%, #2d74b8 100%);
  color: var(--white);
  border: none;
  padding: 15px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30, 79, 122, 0.25);
  position: relative;
  overflow: hidden;
}

.panel-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.panel-cta:hover {
  color: var(--white);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(30, 79, 122, 0.4);
}

.panel-pages {
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 12px;
  letter-spacing: 0.5px;
}

/* Right Preview */
.showcase-preview {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--gray-900);
}

.preview-paper {
  width: 100%;
  height: 100%;
  background: var(--gray-900);
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: none;
}

.preview-paper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.preview-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--gray-200);
}

.preview-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 30px, var(--gray-100) 30px, var(--gray-100) 31px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, var(--gray-100) 40px, var(--gray-100) 41px);
  opacity: 0.3;
}

.preview-placeholder i {
  font-size: 80px;
  color: var(--gray-300);
  position: relative;
  z-index: 1;
  opacity: 0.4;
}

.preview-placeholder span {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
}

.preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 20px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  z-index: 2;
}

.preview-edition {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}

.preview-ml {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-ml);
  margin-top: 2px;
}

/* =============================================
   TOOLBAR (single compact bar)
   ============================================= */
.toolbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-xs);
}

.tb-bar {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 12px;
  gap: 4px;
}

.tb-divider {
  width: 1px;
  height: 20px;
  background: var(--gray-200);
  margin: 0 6px;
  flex-shrink: 0;
}

.tb-right-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Edition / Page selects inside toolbar */
.tb-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  min-width: 0;
}

.tb-sel-icon {
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}

.tb-page-group {
  min-width: 90px;
}

.tb-select-wrap {
  position: relative;
  min-width: 0;
}

.tb-select-wrap select {
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: var(--radius-xs);
  padding: 5px 24px 5px 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--gray-800);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  max-width: 220px;
}

/* Edition select can be wider for long names */
#editionSelect {
  max-width: 260px;
}

.tb-select-wrap select:hover,
.tb-select-wrap select:focus {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.tb-select-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: var(--gray-400);
  pointer-events: none;
}

.tb-date-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: center;
}

.tb-field-grow {
  flex: 1;
}

/* legacy – kept for safety */
.tb-left, .tb-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tb-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.tb-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tb-sep {
  width: 1px;
  height: 20px;
  background: var(--gray-200);
  margin: 0 2px;
}

.tb-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
}

.tb-btn:hover {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.tb-field {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xs);
  padding: 0 10px;
  transition: all 0.15s ease;
}

.tb-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 79, 122, 0.08);
}

.tb-field i {
  color: var(--gray-400);
  font-size: 13px;
  flex-shrink: 0;
}

.tb-field input,
.tb-field select {
  border: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--gray-900);
  outline: none;
  min-width: 120px;
}

.tb-field select option {
  font-size: 13px;
}

.tb-date-nav {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: none;
  color: var(--gray-500);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.tb-date-nav:hover {
  background: var(--gray-100);
  color: var(--accent);
}

.tb-date-nav:active {
  transform: scale(0.95);
}

.tb-zoom {
  display: flex;
  align-items: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xs);
  padding: 2px;
  gap: 1px;
}

.tb-zbtn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: none;
  color: var(--gray-500);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.tb-zbtn:hover {
  background: var(--white);
  color: var(--accent);
}

.tb-zval {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  min-width: 40px;
  text-align: center;
  padding: 0 4px;
}

.tb-download {
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tb-download:hover {
  background: var(--accent-hover);
}

/* =============================================
   VIEWER AREA
   ============================================= */
.viewer-area {
  background: var(--gray-100);
  padding: 0;
  min-height: calc(100vh - 260px);
}

.viewer-area.epaper-mode {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #e8ecef;
  height: calc(100vh - 102px);
  overflow: hidden;
}

/* Newspaper scroll area */
.viewer-main {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 44px;
  background: #e8ecef;
}

/* Left / Right page navigation arrows */
.viewer-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.95);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 50;
  box-shadow: var(--shadow-md);
}

.viewer-nav-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}

.viewer-nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.viewer-nav-btn:disabled:hover {
  background: rgba(255,255,255,0.95);
  color: var(--gray-600);
  border-color: var(--gray-200);
  transform: translateY(-50%);
}

#epPrevBtn { left: 12px; }
#epNextBtn { right: 12px; }

.page-frame {
  background: var(--white);
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.page-frame.epaper-frame {
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  overflow: visible;
  box-shadow: var(--shadow-md);
  background: var(--white);
  margin: 0 auto;
}

.page-frame img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.page-frame img.zoomed {
  cursor: zoom-out;
  transform: scale(1.5);
  transform-origin: center;
}

.page-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 60px 20px;
  text-align: center;
}

.page-error i {
  font-size: 56px;
  color: var(--gray-200);
  margin-bottom: 16px;
}

.page-error p {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-400);
  margin: 0;
}

.error-sub {
  font-size: 14px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* =============================================
   BOTTOM PAGER
   ============================================= */
.pager {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.pager-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.pager-btn:not(:disabled):hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.pager-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pager-info {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-50);
  padding: 8px 20px;
  border-radius: 50px;
  border: 1px solid var(--gray-200);
  min-width: 80px;
  text-align: center;
}

.pager-info span:first-child {
  color: var(--accent);
  font-weight: 700;
}

/* =============================================
   THUMBNAIL STRIP  (top horizontal strip)
   ============================================= */
.thumb-strip {
  width: 100%;
  flex-shrink: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 110px;
  overflow: hidden;
  z-index: 5;
}

.thumb-nav {
  width: 30px;
  flex-shrink: 0;
  background: var(--gray-50);
  border: none;
  color: var(--gray-400);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.thumb-nav:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.thumb-track-wrap {
  flex: 1;
  overflow: hidden;
}

.thumb-track {
  display: flex;
  flex-direction: row;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 6px;
  gap: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.thumb-track::-webkit-scrollbar {
  display: none;
}

.thumb-item {
  flex-shrink: 0;
  width: 68px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.15s ease;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

.thumb-item:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(30,79,122,0.2);
}

.thumb-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(30,79,122,0.25);
}

.thumb-img {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--gray-100);
}

.thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: opacity 0.15s;
}

.thumb-item:not(.active) .thumb-img img {
  opacity: 0.82;
}

.thumb-num {
  display: block;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 0;
  color: var(--gray-500);
  background: var(--gray-50);
  flex-shrink: 0;
  letter-spacing: 0.3px;
  transition: all 0.15s ease;
}

.thumb-item.active .thumb-num {
  background: var(--accent);
  color: var(--white);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 32px 0 0;
  margin-top: auto;
}

.ft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.ft-logo {
  height: 28px;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.ft-logo:hover {
  opacity: 1;
}

.ft-links {
  display: flex;
  gap: 24px;
}

.ft-links a {
  color: var(--gray-400);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.ft-links a:hover {
  color: var(--accent);
}

.ft-social {
  display: flex;
  gap: 4px;
}

.ft-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ft-social a:hover {
  color: var(--accent);
  background: var(--accent-subtle);
}

.ft-copy {
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  padding: 14px 0;
  border-top: 1px solid var(--gray-100);
}

/* =============================================
   COORDINATES / CLICKABLE REGIONS
   ============================================= */
#coords-holder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.coords {
  position: absolute;
  display: block;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.coords:hover,
.coords:active,
.coords.touch-active {
  background: rgba(100, 100, 100, 0.45);
  border-color: rgba(80, 80, 80, 0.7);
  outline: 2px solid rgba(100, 100, 100, 0.4);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 991.98px) {
  .header-row {
    height: 60px;
  }

  .logo-img {
    height: 36px;
  }

  .header-center {
    display: none;
  }

  .site-nav .nav-link {
    font-size: 13px;
    padding: 12px 14px;
  }

  /* Showcase tablet */
  .showcase-inner {
    flex-direction: column;
    min-height: auto;
  }

  .showcase {
    min-height: auto;
  }

  .showcase-panel {
    width: 100%;
    padding: 36px 24px;
  }

  .showcase-preview {
    min-height: 420px;
    display: block;
  }

  .panel-title {
    font-size: 34px;
  }

  .edition-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .etab {
    padding: 9px 14px;
    flex: 0 0 auto;
  }

  .etab::before {
    display: none;
  }

  .etab-ml {
    display: none;
  }

  /* Toolbar tablet – already 2-row, just tighten */
  .tb-row1, .tb-row2 {
    padding: 5px 12px;
  }
}

@media (max-width: 767.98px) {
  .header-row {
    height: 56px;
  }

  .logo-img {
    height: 32px;
  }

  .social-row {
    display: none;
  }

  .site-nav .navbar-nav {
    gap: 0;
  }

  .site-nav .nav-link {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
  }

  .site-nav .nav-link.active::after {
    display: none;
  }

  /* Showcase mobile */
  .showcase-panel {
    padding: 28px 20px 24px;
  }

  .panel-title {
    font-size: 28px;
    margin-bottom: 4px;
  }

  .panel-date {
    margin-bottom: 24px;
  }

  .edition-tabs {
    gap: 5px;
    margin-bottom: 24px;
  }

  .etab {
    padding: 8px 12px;
  }

  .etab-en {
    font-size: 12px;
  }

  .panel-cta {
    padding: 13px 20px;
    font-size: 14px;
  }

  .showcase-preview {
    min-height: 360px;
  }

  /* Toolbar mobile – compact rows */
  .tb-row1, .tb-row2 {
    padding: 5px 8px;
    gap: 5px;
  }

  .tb-row2 {
    border-top: 1px solid var(--gray-100);
  }

  .tb-field-grow {
    flex: 1;
    min-width: 0;
  }

  .tb-field input,
  .tb-field select {
    min-width: 0;
    width: 100%;
    font-size: 12px;
  }

  .tb-icon-hide {
    display: none;
  }

  /* Zoom – hide % text to save space */
  .tb-zval {
    display: none;
  }

  /* Nav arrows smaller */
  .viewer-nav-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  #epPrevBtn { left: 4px; }
  #epNextBtn { right: 4px; }

  /* Viewer: already column layout, just adjust heights */
  .viewer-area.epaper-mode {
    height: auto;
    overflow: visible;
  }

  .viewer-main {
    width: 100%;
    overflow: auto;
    padding: 8px 40px;
    min-height: 300px;
  }

  /* Nav arrows on mobile */
  .viewer-nav-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  #epPrevBtn { left: 4px; }
  #epNextBtn { right: 4px; }

  /* Thumbnail strip: compact on mobile */
  .thumb-strip {
    height: 86px;
  }

  .thumb-item {
    width: 52px;
  }

  .pager-btn {
    width: 38px;
    height: 38px;
  }

  /* Footer mobile */
  .ft-row {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .ft-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .ft-social {
    justify-content: center;
  }
}

@media (max-width: 479px) {
  .showcase-panel {
    padding: 24px 16px;
  }

  .panel-title {
    font-size: 24px;
  }

  .panel-badge {
    margin-bottom: 14px;
  }

  .etab {
    padding: 6px 9px;
  }

  .etab-en {
    font-size: 11px;
  }

  .showcase-preview {
    min-height: 300px;
  }

  .page-error {
    min-height: 260px;
    padding: 40px 16px;
  }

  .page-error i {
    font-size: 40px;
  }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
  .site-header,
  .site-nav,
  .site-footer,
  .toolbar,
  .pager,
  .thumb-strip,
  .showcase {
    display: none !important;
  }

  body { background: white; }

  .viewer-area,
  .viewer-area.epaper-mode {
    padding: 0;
    background: white;
  }

  .page-frame,
  .page-frame.epaper-frame {
    box-shadow: none;
    border-radius: 0;
    border: none;
  }
}
