/* Annalis Gadea Documentation Stylesheet */
:root {
  --bg-primary: #fcfcfb;
  --bg-surface: #ffffff;
  --bg-sidebar: #1f2421;
  --bg-card: #ffffff;
  --text-primary: #1a1e21;
  --text-secondary: #5a6571;
  --text-muted: #8b95a5;
  --accent: #9c27b0;
  --accent-light: #f3e5f5;
  --accent-dark: #7b1fa2;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --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.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
}

/* Sidebar Navigation */
.app-sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  color: #f1f5f9;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  text-decoration: none;
  display: block;
}

.sidebar-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #94a3b8;
  margin-top: 4px;
}

.sidebar-nav {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #64748b;
  padding: 12px 10px 4px;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: #cbd5e1;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.active {
  background-color: var(--accent);
  color: #ffffff;
  font-weight: 500;
}

.nav-badge {
  font-size: 0.72rem;
  background-color: rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 10px;
  color: #cbd5e1;
}

.nav-link.active .nav-badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Main Content Area */
.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header & Search Bar */
.top-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.header-search-wrapper {
  position: relative;
  width: 100%;
  max-width: 540px;
}

.header-search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s ease;
}

.header-search-input:focus {
  background-color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.15);
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Live Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 480px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.search-dropdown.open {
  display: block;
}

.search-result-group {
  padding: 8px 0;
}

.search-group-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 6px 16px;
  font-weight: 600;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background-color 0.15s ease;
}

.search-result-item:hover {
  background-color: #f1f5f9;
}

.search-result-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  background-color: #e2e8f0;
  flex-shrink: 0;
}

.search-result-info {
  flex-grow: 1;
  min-width: 0;
}

.search-result-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-see-all {
  display: block;
  padding: 10px 16px;
  text-align: center;
  background-color: #f8fafc;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border-top: 1px solid var(--border-color);
}

.search-see-all:hover {
  background-color: var(--accent-light);
}

/* Page Container */
.page-container {
  padding: 36px 48px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* Hero & Header Section */
.page-hero {
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.page-meta-badge {
  background-color: var(--accent-light);
  color: var(--accent-dark);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Bio / Article Layout */
.bio-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.bio-sidebar {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.bio-portrait {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.bio-portrait-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

.bio-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.bio-quote {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-primary);
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  background-color: #faf5ff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 32px;
  line-height: 1.5;
}

.bio-section-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 28px 0 12px;
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 6px;
}

.bio-paragraph {
  margin-bottom: 16px;
  color: #2d3748;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* Overview Category Cards Grid (on Index) */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.category-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.category-card-thumb-wrap {
  width: 100%;
  height: 200px;
  background-color: #edf2f7;
  overflow: hidden;
  position: relative;
}

.category-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-card-thumb {
  transform: scale(1.05);
}

.category-card-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.category-card-body {
  padding: 16px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.category-card-link-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
}

/* Artwork Gallery Grid */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.artwork-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.artwork-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.artwork-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f1f5f9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.artwork-card:hover .artwork-thumb {
  transform: scale(1.04);
}

.artwork-zoom-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #ffffff;
}

.artwork-card:hover .artwork-zoom-overlay {
  opacity: 1;
}

.artwork-info {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  background-color: #ffffff;
}

.artwork-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.artwork-caption {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Category Navigation (Footer of each category) */
.category-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.cat-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.cat-nav-btn:hover {
  background-color: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* Dedicated Search Page */
.search-page-header {
  margin-bottom: 32px;
}

.search-hero-box {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 32px;
  text-align: center;
}

.search-hero-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.search-hero-input-wrap {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  display: flex;
  gap: 10px;
}

.search-hero-input {
  flex-grow: 1;
  padding: 14px 20px 14px 48px;
  border: 2px solid var(--border-color);
  border-radius: 30px;
  font-size: 1.05rem;
  outline: none;
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-hero-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(156, 39, 176, 0.15);
}

.search-filter-select {
  padding: 12px 18px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  background-color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.search-stats-bar {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 15, 20, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image-wrap {
  max-width: 88vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.lightbox-meta {
  color: #f1f5f9;
  text-align: center;
  margin-top: 14px;
}

.lightbox-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.lightbox-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 3px;
}

.lightbox-close {
  position: absolute;
  top: -44px;
  right: -20px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-arrow:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.lightbox-arrow.prev {
  left: 20px;
}

.lightbox-arrow.next {
  right: 20px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  body {
    flex-direction: column;
  }
  .app-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    max-height: 300px;
  }
  .bio-layout {
    grid-template-columns: 1fr;
  }
  .page-container {
    padding: 24px 20px;
  }
}
