/**
 * @file
 * SAHO Context & Details Section
 * 
 * Modern horizontal layout for context information that appears
 * after the main body content, providing related information
 * in an accessible and scannable format.
 */

/* ==========================================================================
   Context & Details Section - Main Layout
   ========================================================================== */

.saho-context-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  margin: 3rem 0;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.saho-context-details h2 {
  color: #1e293b;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #900;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.saho-context-details h2::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23900'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 0.5rem;
}

/* Accordion Layout for Context Sections */
.saho-context-details .saho-accordion {
  margin-top: 1.5rem;
}

/* Legacy grid styles removed - now using accordion layout */

/* Content styling within sections */
.saho-context-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.saho-context-list li {
  margin-bottom: 0.75rem;
}

.saho-context-list li:last-child {
  margin-bottom: 0;
}

.saho-context-item {
  display: block;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  color: #475569;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  transition: all 0.15s ease;
  font-weight: 500;
}

.saho-context-item:hover {
  background: #900;
  color: #fff;
  border-color: #900;
  text-decoration: none;
  transform: translateX(4px);
}

.saho-context-item a {
  color: inherit;
  text-decoration: none;
}

/* Tag-style layout for categories */
.saho-context-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.saho-context-tag {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.8125rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
  font-weight: 500;
}

.saho-context-tag:hover {
  background: #900;
  color: #fff;
  border-color: #900;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.saho-context-tag a {
  color: inherit;
  text-decoration: none;
}

/* Synopsis content styling */
.saho-context-synopsis {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #475569;
}

.saho-context-synopsis p {
  margin-bottom: 0.75rem;
}

.saho-context-synopsis p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .saho-context-details {
    margin: 2rem 0;
    padding: 1.5rem;
  }
  
  .saho-context-details h2 {
    font-size: 1.25rem;
  }
  
  /* Legacy grid styles removed */
  
  .saho-context-tags {
    gap: 0.375rem;
  }
  
  .saho-context-tag {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
  }
}

@media (max-width: 576px) {
  .saho-context-details {
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 0.375rem;
  }
  
  .saho-context-details h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .saho-context-details h2::before {
    font-size: 1rem;
  }
  
  /* Legacy section heading styles removed */
  
  .saho-context-item {
    padding: 0.625rem;
    font-size: 0.8125rem;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .saho-context-details {
    background: #fff;
    border: 1px solid #000;
    box-shadow: none;
    margin: 1rem 0;
    page-break-inside: avoid;
  }
  
  /* Legacy grid styles removed */
  
  .saho-context-item:hover,
  .saho-context-tag:hover {
    background: inherit;
    color: inherit;
    transform: none;
  }
}