/* ==========================================================================
   LUMINA — REFINED COMPONENTS (3-Column Magazine Grid & High-Contrast Cards)
   ========================================================================== */

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.badge-investigation {
  background-color: #2563EB;
  color: #FFFFFF;
}

.badge-deanon {
  background-color: #DC2626;
  color: #FFFFFF;
}

[data-theme="dark"] .badge-investigation {
  background-color: #3B82F6;
  color: #FFFFFF;
}

[data-theme="dark"] .badge-deanon {
  background-color: #EF4444;
  color: #FFFFFF;
}

/* Pillar Dual Switcher Header */
.pillar-switcher-container {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.pillar-switcher-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  overflow-x: auto;
}

.pillar-tab {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.pillar-tab:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
}

.pillar-tab.active {
  background-color: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
  font-weight: 800;
}

/* ===========================================================================
   3-COLUMN MAGAZINE EDITORIAL GRID & HIGH-CONTRAST CARD SYSTEM
   =========================================================================== */

.grid-editorial {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.card {
  background-color: var(--bg-surface);
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: transform 220ms var(--ease-smooth), border-color 220ms var(--ease-smooth), box-shadow 220ms var(--ease-smooth);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--bg-elevated);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms var(--ease-smooth);
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-badge-floating {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.card-content {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--text-primary) !important;
  margin-bottom: 12px;
  transition: color var(--transition-fast);
}

.card:hover .card-title {
  color: var(--accent-active) !important;
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary) !important;
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-muted) !important;
  font-weight: 600;
}

/* Featured Hero Card (2-Column Horizontal Split across grid) */
.card-featured {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: stretch;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-hover);
}

[data-theme="dark"] .card-featured {
  background: linear-gradient(135deg, #0F1218, #181C26);
}

.card-featured .card-media {
  height: 100%;
  min-height: 340px;
  aspect-ratio: auto;
}

.card-featured .card-content {
  padding: 32px;
}

.card-featured .card-title {
  font-size: 1.85rem;
  line-height: 1.2;
}

/* Responsive Grid Layout */
@media (max-width: 1024px) {
  .grid-editorial {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-featured {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .grid-editorial {
    grid-template-columns: 1fr;
  }
  .card-featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .card-featured .card-media {
    aspect-ratio: 16 / 9;
    min-height: auto;
  }
}

/* File Attachment Card */
.attachment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.attachment-card:hover {
  border-color: var(--border-strong);
}

.attachment-info {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.attachment-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  background-color: var(--bg-elevated);
}

.btn-download {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background-color: var(--accent-subtle);
  color: var(--accent-subtle-text);
  font-size: 0.825rem;
  font-weight: 700;
  transition: all var(--transition-fast);
}

.btn-download:hover {
  background-color: var(--accent-primary);
  color: #FFFFFF;
}

/* ===========================================================================
   STRICT MODAL OVERLAYS (STRICTLY HIDDEN BY DEFAULT)
   =========================================================================== */
.modal-overlay {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 500;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.modal-overlay.active {
  display: flex !important;
  animation: pageFadeIn 180ms var(--ease-smooth) forwards;
}

.command-modal {
  width: 100%;
  max-width: 540px;
  background-color: #11141A;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

/* Lightbox Overlay */
.lightbox-overlay {
  display: none !important;
  position: fixed;
  inset: 0;
  z-index: 600;
  background-color: rgba(0, 0, 0, 0.92);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.lightbox-overlay.active {
  display: flex !important;
  animation: pageFadeIn 200ms var(--ease-smooth) forwards;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  margin-top: var(--space-4);
  color: #F8FAFC;
  font-size: 0.9rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Local File Drop Zone Styling */
.file-drop-area {
  padding: var(--space-4);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  text-align: center;
  background-color: var(--bg-canvas);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-drop-area:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-surface-hover);
}

/* Form controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-canvas);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-primary);
}
