/* ============================================
   Enhanced — Custom styles for Quarto site
   Digital Humanities and Artificial Intelligence
   LABHDUFBA
   ============================================ */

/* --- Identity Colors --- */
:root {
  --enh-primary: #1a1a2e;
  --enh-accent: #0f3460;
  --enh-highlight: #e94560;
  --enh-light: #f0f0f5;
  --enh-link: #0f3460;
  --enh-link-hover: #e94560;
  --enh-text: #16213e;
}

/* --- General --- */
body {
  font-feature-settings: "liga" 1, "calt" 1;
  color: var(--enh-text);
}

/* --- Navbar --- */
.navbar {
  border-bottom: 3px solid var(--enh-highlight) !important;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.3rem;
}

.navbar-brand .navbar-subtitle {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0.8;
  margin-top: -2px;
}

/* --- Hero section (homepage) --- */
.hero-section {
  background-image: linear-gradient(90deg, rgba(8, 22, 38, 0.84) 0%, rgba(8, 22, 38, 0.58) 48%, rgba(8, 22, 38, 0.18) 100%), url('https://enhanced.inovahd.org/files/images/home-hero.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--enh-primary);
  color: #fff;
  padding: 4rem 2rem;
  margin-bottom: 2rem;
  border-radius: 0;
  text-align: center;
}

.hero-section h1 {
  color: #fff;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.hero-section .subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.hero-section .description {
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.8;
  line-height: 1.6;
}

/* --- Page headers --- */
main.quarto-article section#heading h2,
main.quarto-article h2 {
  border-bottom: 2px solid var(--enh-accent);
  padding-bottom: 0.3em;
  margin-top: 2em;
}

/* --- Links --- */
a {
  color: var(--enh-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* --- Listing cards (post feed) --- */
.listing-item-img-placeholder.card-img-top {
  display: none;
}

.quarto-listing-cols-3 .listing-card,
.quarto-listing-cols-2 .listing-card {
  min-height: auto;
  border: 1px solid #e0e0ea;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(15, 52, 96, 0.15);
  border-color: var(--enh-accent);
}

.listing-card .listing-title {
  font-weight: 600;
  color: var(--enh-primary);
}

.listing-card .listing-author {
  font-style: italic;
  font-size: 0.9em;
  color: var(--enh-accent);
}

.listing-card .listing-date {
  font-size: 0.85em;
  color: #888;
}

/* --- Author byline in posts --- */
.author-byline {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin: 1em 0 2em 0;
  padding-bottom: 1em;
  border-bottom: 1px solid #e0e0ea;
}

.author-byline .author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--enh-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.author-byline .author-info {
  display: flex;
  flex-direction: column;
}

.author-byline .author-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.author-byline .author-meta {
  font-size: 0.8rem;
  color: #888;
}

/* --- Publication info boxes --- */
.pub-info {
  background: var(--enh-light);
  border-left: 4px solid var(--enh-highlight);
  border-radius: 0 6px 6px 0;
  padding: 1em 1.5em;
  margin: 1.5em 0;
}

/* --- Editorial board cards --- */
.editor-card {
  display: flex;
  gap: 1em;
  align-items: flex-start;
  padding: 1.2em;
  border: 1px solid #e0e0ea;
  border-radius: 8px;
  margin-bottom: 1em;
  transition: all 0.2s ease;
}

.editor-card:hover {
  border-color: var(--enh-accent);
  box-shadow: 0 2px 10px rgba(15, 52, 96, 0.1);
}

.editor-card .editor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--enh-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.editor-card .editor-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.2em;
}

.editor-card .editor-role {
  font-size: 0.85rem;
  color: var(--enh-highlight);
  font-weight: 500;
  margin-bottom: 0.3em;
}

.editor-card .editor-affiliation {
  font-size: 0.85rem;
  color: #666;
}

/* --- Edition badge --- */
.edition-badge {
  display: inline-block;
  background: var(--enh-accent);
  color: #fff;
  padding: 0.2em 0.8em;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* --- Footer --- */
.nav-footer {
  border-top: 3px solid var(--enh-highlight);
}

/* --- Language selector (from feudo.org) --- */
.lang-selector {
  display: inline-flex !important;
  gap: 0.25rem !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  height: 29px !important;
  padding: 0 !important;
  margin-right: 0.15rem !important;
  white-space: nowrap !important;
}
.lang-selector .lang-btn {
  background: rgba(255,255,255,0.18) !important;
  border: 1.5px solid rgba(255,255,255,0.4) !important;
  border-radius: 5px !important;
  color: #fff !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 0.2rem 0.5rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  letter-spacing: 0.04em !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 29px !important;
  padding: 0 0.5rem !important;
}
.lang-selector .lang-btn:hover {
  background: rgba(255,255,255,0.32) !important;
  border-color: rgba(255,255,255,0.7) !important;
}
.lang-selector .lang-btn-active {
  background: var(--enh-highlight) !important;
  border-color: var(--enh-highlight) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.15) !important;
}
/* Keep the selector compact with the right-side controls */
.lang-selector-item {
  display: flex !important;
  align-items: center !important;
}

@media (max-width: 991.98px) {
  .lang-selector {
    order: initial !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border-top: 0 !important;
    gap: 0.25rem !important;
  }
  .lang-selector .lang-btn {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.72rem !important;
    min-width: 2rem !important;
  }
  .navbar-collapse .navbar-nav.ms-auto {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.25rem !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }
  .navbar-collapse .navbar-nav.ms-auto .nav-item.compact {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Article language switch */
.article-language-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 2rem;
  padding: 0.55rem 0.75rem;
  width: fit-content;
  border: 1px solid var(--enh-border);
  border-radius: 6px;
  color: var(--enh-muted);
  font-size: 0.85rem;
}
.article-lang-btn {
  border: 1px solid var(--enh-border);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
}
.article-lang-btn:hover,
.article-lang-btn.article-lang-active {
  background: var(--enh-accent);
  border-color: var(--enh-accent);
  color: #fff;
}
.article-version[hidden] { display: none !important; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-section {
    padding: 2.5rem 1.5rem;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section .subtitle {
    font-size: 1rem;
  }
}