/* CrimeaWatch Custom Styles */

/* Add to static/custom.css */

/* Database section - always 3 cards in a row on desktop */
.database-section-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (max-width: 1024px) {
  .database-section-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .database-section-cards {
    grid-template-columns: 1fr;
  }
}

/* Database section cards - make them clickable */
.database-section-card {
  position: relative;
  cursor: pointer;
}

.database-section-card h3 a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.database-section-card h3 a {
  color: #1e3c72 !important;
  text-decoration: none !important;
}

.database-section-card h3 a:hover {
  color: #2a5298 !important;
}

.database-section-card:hover {
  border-color: #2a5298;
  box-shadow: 0 6px 16px rgba(30, 60, 114, 0.2);
}

/* Profile Header */
.profile-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  align-items: flex-start;
}

.profile-photo {
  flex-shrink: 0;
}

.profile-photo img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.profile-info {
  flex-grow: 1;
}

.profile-info h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #1e3c72;
  line-height: 1.2;
}

.profile-role {
  font-size: 1.1rem;
  color: #2a5298;
  font-weight: 500;
  margin: 0.25rem 0;
  line-height: 1.3;
}

.profile-organization {
  color: #555;
  font-size: 1rem;
  margin: 0.25rem 0;
  line-height: 1.3;
}

/* Profile Metadata Box - Compact */
.profile-metadata {
  background: #f8f9fa;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.profile-metadata h2 {
  color: #1e3c72;
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
  line-height: 1.2;
}

.profile-metadata dl {
  display: grid !important;
  grid-template-columns: auto 1fr !important;
  row-gap: 1rem !important;
  column-gap: 1.2rem !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  align-items: baseline !important;
}

.profile-metadata dt {
  font-weight: 600 !important;
  color: #1e3c72 !important;
  font-size: 0.9rem !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

.profile-metadata dd {
  margin: 0 !important;
  padding: 0 !important;
  color: #333 !important;
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.badge-featured {
  background-color: #ffd700;
  color: #0f1e3a;
}

.badge-severity-high {
  background-color: #dc3545;
  color: white;
}

.badge-severity-medium {
  background-color: #ffc107;
  color: #0f1e3a;
}

.badge-severity-low {
  background-color: #28a745;
  color: white;
}

.badge-status {
  background-color: #2a5298;
  color: white;
}

.badge-verified {
  background-color: #17a2b8;
  color: white;
}

/* Profile Tags - Compact */
.profile-tags {
  margin-top: 0.75rem;
  line-height: 1.4;
}

.tag {
  display: inline-block;
  background: #2a5298;
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.8rem;
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

/* Evidence Dashboard */
.evidence-dashboard {
  display: block;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  text-decoration: none !important;
  transition: all 0.3s ease;
  cursor: pointer;
}

.evidence-dashboard:hover {
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.15);
  transform: translateY(-2px);
  border-color: #2a5298;
  text-decoration: none !important;
}

.evidence-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0;
}

.evidence-stat {
  text-align: center;
  padding: 0.75rem 1rem;
  border-right: 1px solid #e0e4ed;
}

.evidence-stat:last-child {
  border-right: none;
}

.stat-number {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.35rem;
  color: #1e3c72;
}

.stat-label {
  font-size: 0.72rem;
  color: #7a7065;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Content Sections */
.content-section {
  margin: 2.5rem 0;
}

.content-section h2 {
  color: #1e3c72;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
  font-size: 1.5rem;
}

.content-section h3 {
  color: #2a5298;
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1.2rem;
}

/* Violation Context Box */
/* Position at Violation box */
.violation-context-box {
  background: #ffffff;
  border: 1px solid #e0e4ed;
  border-top: 3px solid #c8973a;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}

.violation-context-box h3 {
  color: #1e3c72;
  margin: 0 0 0.85rem 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.violation-context-box p {
  margin: 0.4rem 0;
  color: #333;
  line-height: 1.6;
}

/* The Statement / Document box */
.instance-quote-box {
  background: #ffffff;
  border: 1px solid #e0e4ed;
  border-top: 3px solid #1e3c72;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}

.instance-quote-box h3 {
  color: #1e3c72;
  margin: 0 0 0.85rem 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quote-text {
  font-size: 1rem;
  font-style: italic;
  color: #2c2c2c;
  line-height: 1.75;
  margin: 0.75rem 0;
  padding-left: 1rem;
  border-left: 3px solid #c8d4e8;
}

.quote-context {
  margin: 0.85rem 0 0 0;
  color: #666;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Why This Is a Violation box */
.violation-explanation-box {
  background: #ffffff;
  border: 1px solid #e0e4ed;
  border-top: 3px solid #c0392b;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 6px;
}

.violation-explanation-box h3 {
  color: #1e3c72;
  margin: 0 0 0.85rem 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.violation-content {
  line-height: 1.7;
  color: #333;
}

.violation-content p {
  margin: 0.75rem 0;
}

.violation-content ul,
.violation-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.violation-content strong {
  font-weight: 700;
}

/* Instance Details Content */
.instance-details-content {
  background: white;
  padding: 1.5rem;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.instance-details-content h2 {
  color: #1e3c72;
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1.3rem;
}

.instance-details-content h3 {
  color: #2a5298;
  margin: 1.25rem 0 0.5rem 0;
  font-size: 1.1rem;
}

.instance-details-content p {
  margin: 0.75rem 0;
  line-height: 1.7;
}

.instance-details-content ul,
.instance-details-content ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

/* Evidence Box */
.evidence-box {
  background: #ffffff;
  border: 1px solid #e0e4ed;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.evidence-box h3 {
  color: #1e3c72;
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e0e4ed;
}

/* Additional Info Box */
.additional-info-box {
  background: #d1ecf1;
  border-left: 4px solid #17a2b8;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
  border-radius: 4px;
  color: #0c5460;
  line-height: 1.7;
}

/* Career Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #2a5298;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2a5298;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #2a5298;
}

.timeline-date {
  font-weight: 600;
  color: #2a5298;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.timeline-content {
  color: #333;
  line-height: 1.6;
}

/* Social Media Icons - Inside Profile Information Grid */
.profile-social-icons {
  display: inline-block;
}

.social-icon-inline {
  font-size: 1.4rem;
  transition: all 0.2s ease;
  text-decoration: none !important;
  display: inline-block;
  margin-right: 0.75rem;
}

.social-icon-inline:hover {
  transform: scale(1.15);
  text-decoration: none !important;
}

.social-icon-inline i {
  text-decoration: none !important;
}

/* Platform Brand Colors */
.social-icon-inline.social-twitter {
  color: #1DA1F2;
}

.social-icon-inline.social-facebook {
  color: #4267B2;
}

.social-icon-inline.social-linkedin {
  color: #0077B5;
}

.social-icon-inline.social-telegram {
  color: #0088cc;
}

.social-icon-inline.social-youtube {
  color: #FF0000;
}

.social-icon-inline.social-vk {
  color: #0077FF;
}

.social-icon-inline.social-ok {
  color: #EE8208;
}

.social-icon-inline.social-instagram {
  color: #E1306C;
}

.social-icon-inline.social-threads {
  color: #000000;
}

/* Photo Gallery */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.gallery-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none !important;
  color: inherit;
  display: block;
}

.gallery-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  text-decoration: none !important;
}

.gallery-item *,
.gallery-item:hover * {
  text-decoration: none !important;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.gallery-item img:hover {
  opacity: 0.9;
}

.gallery-caption {
  padding: 0.75rem 1rem 0.5rem 1rem;
  font-size: 0.9rem;
  color: #333;
  font-weight: 500;
}

.gallery-meta {
  padding: 0 1rem 0.75rem 1rem;
  font-size: 0.8rem;
  color: #666;
}

/* Media Coverage */
.media-list {
  margin: 1rem 0 2rem 0;
}

.media-item {
  display: flex;
  gap: 1.5rem;
  padding: 1rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

/* Clickable box styling */
.media-item.clickable-box {
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  display: flex;
}

.media-item.clickable-box *,
.media-item.clickable-box:hover *,
.media-item.clickable-box:focus *,
.media-item.clickable-box:active * {
  text-decoration: none !important;
}

.media-item:hover,
.media-item.clickable-box:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #2a5298;
  transform: translateY(-2px);
}

.media-date {
  flex-shrink: 0;
  width: 100px;
  color: #666;
  font-size: 0.85rem;
  font-weight: 600;
}

.media-content {
  flex-grow: 1;
}

.media-title {
  color: #1e3c72;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
}

/* Remove underline on hover for clickable boxes */
.media-item.clickable-box .media-title {
  text-decoration: none !important;
}

.media-item.clickable-box:hover .media-title {
  color: #2a5298;
  text-decoration: none !important;
}

.media-publication {
  color: #666;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Related Profiles Grid */
.related-profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.related-profile-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none !important;
  transition: all 0.3s ease;
  display: block;
}

.related-profile-card:hover {
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.15);
  transform: translateY(-2px);
  border-color: #2a5298;
  text-decoration: none !important;
}

.related-profile-card *,
.related-profile-card:hover * {
  text-decoration: none !important;
}

.related-profile-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.related-profile-info {
  padding: 1rem;
}

.related-profile-name {
  font-weight: 600;
  color: #1e3c72;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.related-profile-position {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.3;
}

/* Profile Cards (List View) */
.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.profile-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.profile-card:hover {
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.15);
  transform: translateY(-2px);
  border-color: #2a5298;
}

.profile-card-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.profile-card-photo {
  flex-shrink: 0;
}

.profile-card-photo img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;  
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.profile-card-info {
  flex-grow: 1;
}

.profile-card-info h3 {
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

.profile-card-info h3 a {
  color: #343a40 !important;
  text-decoration: none !important;
}

.profile-card-info h3 a:hover {
  color: #2a5298 !important;
  text-decoration: none !important;
}

.profile-card-role {
  font-size: 0.85rem;
  color: #555;
  margin: 0.2rem 0;
  line-height: 1.3;
}

.profile-card-stats {
  margin-top: 0.5rem;
}

.profile-card-meta {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
}

/* Instance Quote Styling */
.instance-quote {
  background: #f0f4f8;
  border-left: 3px solid #2a5298;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-style: italic;
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
}

/* Evidence Section */
.evidence-section {
  margin: 1.5rem 0;
}

.evidence-section h3 {
  color: #1e3c72;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.evidence-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.evidence-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  background: #f7f8fb;
  border-radius: 5px;
  border: 1px solid #eaecf3;
  line-height: 1.4;
}

.evidence-list a {
  color: #1e3c72;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  flex: 1;
}

.evidence-list a:hover {
  color: #2a5298;
  text-decoration: underline;
}

.evidence-list .tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  background: #1e3c72;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Remove extra spacing from markdown content */
.markdown p {
  margin: 0.75rem 0;
  line-height: 1.6;
}

.markdown h1 {
  margin: 1rem 0 0.75rem 0;
  line-height: 1.2;
}

.markdown h2 {
  margin: 1.5rem 0 0.75rem 0;
  line-height: 1.3;
}

.markdown h3 {
  margin: 1.25rem 0 0.5rem 0;
  line-height: 1.3;
}

.markdown ul, .markdown ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.markdown li {
  margin: 0.25rem 0;
  line-height: 1.5;
}

.instances-heading {
  color: #1e3c72;
  margin: 2rem 0 1.5rem 0;
}

/* Make entire card clickable */
.profile-card {
  position: relative;
  cursor: pointer;
}

.profile-card h3 a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.profile-card-meta a {
  position: relative;
  z-index: 2;
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
  }
  
  .profile-photo img {
    width: 150px;
    height: 150px;
  }
  
  .profile-cards {
    grid-template-columns: 1fr;
  }
  
  .profile-metadata {
    padding: 0.75rem 1rem;
  }
  
  .profile-metadata dl {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  
  .profile-metadata dt {
    font-weight: 700;
    margin-top: 0.4rem;
  }

  .evidence-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .social-links {
    flex-direction: column;
  }

  .photo-gallery {
    grid-template-columns: 1fr;
  }

  .media-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .media-date {
    width: auto;
  }

  .related-profiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline {
    padding-left: 1.5rem;
  }

/* Listing Page Filters and Pagination */
.listing-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 160px;
}

.filter-group label {
  font-weight: 600;
  color: #1e3c72;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-dropdown {
  padding: 0.65rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  color: #333;
}

.filter-dropdown:hover {
  border-color: #2a5298;
}

.filter-dropdown:focus {
  outline: none;
  border-color: #2a5298;
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.reset-button {
  padding: 0.65rem 1.5rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-button:hover {
  background: #c82333;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.reset-button:active {
  transform: translateY(0);
}

.results-count {
  margin: 1rem 0 1.5rem 0;
  color: #495057;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  background: #e9ecef;
  border-radius: 6px;
  display: inline-block;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0 2rem 0;
  flex-wrap: wrap;
}

#pagination .pagination-btn {
  padding: 0.625rem 1.125rem !important;
  border: 1px solid #dee2e6 !important;
  background: white !important;
  color: #495057 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  min-width: 44px !important;
  text-align: center !important;
  font-family: inherit !important;
  user-select: none !important;
}

#pagination .pagination-btn:hover:not(:disabled) {
  background: #f8f9fa !important;
  border-color: #2a5298 !important;
  color: #2a5298 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
  cursor: pointer !important;
}

#pagination .pagination-btn.active {
  background: #2a5298 !important;
  color: white !important;
  border-color: #2a5298 !important;
  box-shadow: 0 2px 6px rgba(42, 82, 152, 0.3) !important;
  cursor: default !important;
}

#pagination .pagination-btn.active:hover {
  transform: none !important;
  cursor: default !important;
}

#pagination .pagination-btn:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  background: #f8f9fa !important;
  color: #adb5bd !important;
  border-color: #e9ecef !important;
}

#pagination .pagination-btn:active:not(:disabled):not(.active) {
  transform: translateY(0) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.pagination-dots {
  padding: 0.625rem 0.5rem;
  color: #adb5bd;
  font-weight: bold;
  user-select: none;
}

@media (max-width: 768px) {
  .listing-filters {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filter-group {
    width: 100%;
    min-width: auto;
  }
  
  .filter-dropdown {
    width: 100%;
  }
  
  .reset-button {
    width: 100%;
  }
  
  .pagination {
    gap: 0.35rem;
  }
  
  .pagination-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-width: 40px;
  }
}

/* Sidebar Search Styles */
.individuals-search-container {
  padding: 0.5rem 0;
  margin: 0.5rem 0;
}

.individuals-search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.individuals-search-input:focus {
  outline: none;
  border-color: #2a5298;
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.search-hint {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
  font-style: italic;
}

.featured-section,
.search-results-section {
  margin: 0.5rem 0;
}

.featured-label,
.search-results-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.no-results-message {
  padding: 1rem;
  text-align: center;
  color: #6c757d;
  font-style: italic;
  font-size: 0.9rem;
}

.menu-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 0.75rem 0;
  list-style: none;
}

.view-all-link {
  margin: 0.5rem 0;
}

.view-all {
  display: block;
  padding: 0.5rem 0.75rem;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #2a5298;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.view-all:hover {
  background: #e9ecef;
  border-color: #2a5298;
  transform: translateX(2px);
}

/* Ensure search results links look consistent */
#search-results-list li a,
#featured-list li a {
  display: block;
  padding: 0.35rem 0.5rem;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

#search-results-list li a:hover,
#featured-list li a:hover {
  background: #f8f9fa;
}

/* Book menu footer styling */
.book-menu-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.75rem;
  color: #6c757d;
  font-style: italic;
}

/* Sidebar Individuals Enhancement */
.individuals-search-wrapper {
  padding: 0.5rem 0;
  margin: 0.5rem 0;
  list-style: none;
}

.individuals-search-box {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.individuals-search-box:focus {
  outline: none;
  border-color: #2a5298;
  box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.individuals-search-hint {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
  font-style: italic;
}

.individuals-featured-section,
.individuals-search-results {
  list-style: none;
  margin: 0.5rem 0;
}

.individuals-section-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.individuals-featured-section ul,
.individuals-search-results ul {
  list-style: none;
  padding-left: 0.5rem;
  margin: 0;
}

.individuals-no-results {
  padding: 1rem 0.5rem;
  text-align: center;
  color: #6c757d;
  font-style: italic;
  font-size: 0.875rem;
  list-style: none;
}

.individuals-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 0.75rem 0;
  list-style: none;
}

.individuals-view-all {
  margin: 0.5rem 0;
  list-style: none;
}

.individuals-view-all-link {
  display: block;
  padding: 0.5rem 0.75rem;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #2a5298 !important;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.individuals-view-all-link:hover {
  background: #e9ecef;
  border-color: #2a5298;
  transform: translateX(2px);
}
/* Violation Context Section */
.violation-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(248, 113, 113, 0.05);
  border-left: 3px solid #f87171;
  border-radius: 4px;
}

.violation-meta dt {
  font-weight: 600;
  color: #f87171;
  font-size: 0.85rem;
  white-space: nowrap;
}

.violation-meta dd {
  color: var(--text, #e2e8f0);
  font-size: 0.9rem;
}

.violation-explanation {
  background: #fff9f0;
  border: 1px solid #ffe4b5;
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  line-height: 1.7;
  color: #333;
}

.violation-explanation p { margin-bottom: 0.75rem; }
.violation-explanation ul { margin: 0.5rem 0 0.75rem 1.5rem; }
.violation-explanation li { margin-bottom: 0.3rem; }
.violation-explanation strong { color: #c0392b; }
/* ── Mobile / Tablet Responsive Fixes ─────────────────── */

/* Profile cards: single column on small phones */
@media (max-width: 480px) {
  .profile-cards {
    grid-template-columns: 1fr;
  }

  .profile-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-card-photo img {
    width: 80px;
    height: 80px;
  }
}

/* Evidence Summary: 2 stats per row on tablet, 2x2 on phone */
@media (max-width: 768px) {
  .evidence-dashboard {
    padding: 1rem;
  }

  .evidence-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .evidence-stat {
    border-right: none;
    border-bottom: 1px solid #e0e4ed;
    padding: 0.65rem 0.5rem;
  }

  .evidence-stat:nth-child(odd) {
    border-right: 1px solid #e0e4ed;
  }

  .evidence-stat:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }
}

/* Photo gallery: 2 cols on tablet, 1 on phone */
@media (max-width: 768px) {
  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
}

@media (max-width: 480px) {
  .photo-gallery {
    grid-template-columns: 1fr;
  }
}

/* Related profiles: 1 col on phone */
@media (max-width: 480px) {
  .related-profiles-grid {
    grid-template-columns: 1fr;
  }

  .related-profile-card {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }

  .related-profile-card img {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }
}

/* Profile header: stack photo above info on phone */
@media (max-width: 480px) {
  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-photo {
    margin-bottom: 1rem;
  }

  .profile-photo img {
    width: 120px;
    height: 120px;
  }

  .profile-info h1 {
    font-size: 1.4rem;
  }
}

/* Instance cards in documented instances section */
@media (max-width: 768px) {
  .profile-cards .profile-card .profile-card-header {
    display: block;
  }
}

/* Evidence list items: stack on very small screens */
@media (max-width: 480px) {
  .evidence-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .evidence-list .tag {
    align-self: flex-start;
  }
}

/* Content sections: tighter padding on mobile */
@media (max-width: 768px) {
  .content-section {
    margin: 1.5rem 0;
  }

  .profile-metadata {
    margin-bottom: 1.5rem;
  }

  .violation-context-box,
  .instance-quote-box,
  .violation-explanation-box,
  .evidence-box {
    padding: 0.85rem 1rem;
  }
}

/* Instances quicklink / evidence dashboard on mobile */
@media (max-width: 768px) {
  .evidence-dashboard {
    margin: 1.25rem 0;
  }
}