/* ==========================================================================
   PUBLICATIONS ARCHIVE & POPUP MODAL READER
   Palette: Deep Navy (#001833), Sky Blue (#38bdf8), Slate (#334155), Gold (#f59e0b)
   ========================================================================== */

.ehs-publications-page {
  background: #f8fafc;
  min-height: 80vh;
  padding-bottom: 70px;
}

/* Hero Section */
.ehs-pub-hero {
  background: linear-gradient(135deg, #001833 0%, #002b5c 100%);
  padding: 60px 0 50px 0;
  text-align: center;
  color: #ffffff;
  border-bottom: 2px solid rgba(56, 189, 248, 0.2);
}

.ehs-pub-pill {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 12px;
}

.ehs-pub-title {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
}

.ehs-pub-subtitle {
  max-width: 650px;
  margin: 0 auto 28px auto;
  font-size: 14.5px;
  color: #bae6fd;
  line-height: 1.6;
}

/* Filter Controls */
.ehs-pub-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ehs-filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ehs-filter-btn:hover,
.ehs-filter-btn.active {
  background: #38bdf8;
  color: #001833;
  border-color: #38bdf8;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

/* Grid Layout */
.ehs-pub-grid-section {
  padding: 50px 0;
}

.ehs-pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.ehs-pub-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(0, 34, 68, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ehs-pub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 34, 68, 0.12);
}

/* Thumbnail Visual Embed */
.ehs-pub-thumb-wrap {
  position: relative;
  background: #001833;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: pointer;
}

.ehs-pub-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ehs-pub-thumb-wrap:hover .ehs-pub-thumb {
  transform: scale(1.05);
}

.ehs-pub-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 24, 51, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ehs-pub-thumb-wrap:hover .ehs-pub-overlay {
  opacity: 1;
}

.ehs-pub-overlay-badge {
  background: #38bdf8;
  color: #001833;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 30px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* Card Body */
.ehs-pub-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ehs-pub-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.ehs-pub-tag {
  background: #f0fdf4;
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #bbf7d0;
}

.ehs-pub-date {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.ehs-pub-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #001833;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.ehs-pub-desc {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 18px 0;
  flex-grow: 1;
}

/* Card Action Buttons */
.ehs-pub-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.ehs-btn-read {
  flex: 1;
  background: #001833;
  color: #ffffff;
  border: none;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.ehs-btn-read:hover {
  background: #0284c7;
}

.ehs-btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #001833;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
}

.ehs-btn-download:hover {
  background: #f59e0b;
  color: #ffffff;
  border-color: #f59e0b;
}

/* ==========================================================================
   POPUP LIGHTBOX MODAL STYLING
   ========================================================================== */
.ehs-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 15, 35, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.ehs-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.ehs-modal-dialog {
  background: #001833;
  width: 100%;
  max-width: 1020px;
  height: 90vh;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.ehs-modal-backdrop.active .ehs-modal-dialog {
  transform: translateY(0);
}

/* Header */
.ehs-modal-header {
  padding: 14px 20px;
  background: #001e3d;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.ehs-modal-badge {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 700;
  display: block;
}

.ehs-modal-heading {
  margin: 3px 0 0 0;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 600px;
}

.ehs-modal-ctrls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ehs-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f59e0b;
  color: #001833;
  font-size: 12.5px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.ehs-modal-btn:hover {
  background: #ffffff;
}

.ehs-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  font-size: 24px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.ehs-modal-close:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Body / Viewport */
.ehs-modal-body {
  flex: 1;
  background: #0f172a;
}

.ehs-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .ehs-modal-dialog {
    height: 96vh;
    padding: 0;
  }
  .ehs-modal-heading {
    max-width: 200px;
    font-size: 13.5px;
  }
}