/* Fix Artists page layout issues - MUST match Pivot Productions exactly */

/* Design tokens for visual consistency - MUST match Pivot Productions exactly */
:root {
  --card-width: 234.6px;        /* MUST match Pivot Productions exactly */
  --card-image-height: 263.8px; /* MUST match Pivot Productions exactly */
  --card-total-height: 360px;   /* MUST match Pivot Productions exactly */
  --grid-gutter: 1%;            /* MUST match Pivot Productions exactly */
  --font-nantes: "NantesWeb-Bold", Times, serif; /* MUST match Pivot Productions exactly */
  --font-untitled: "untitled-sans-web-regular", sans-serif; /* MUST match Pivot Productions exactly */
}

/* Ensure artist image containers have exact dimensions - MUST match Pivot Productions exactly */
.artists .content div:first-child {
  width: var(--card-width) !important;
  height: var(--card-image-height) !important;
  min-width: var(--card-width) !important;
  min-height: var(--card-image-height) !important;
  max-width: var(--card-width) !important;
  max-height: var(--card-image-height) !important;
  overflow: hidden !important;
  position: relative !important;
  margin: 0 auto !important;
}

.artists .content img {
  width: var(--card-width) !important;
  height: var(--card-image-height) !important;
  min-width: var(--card-width) !important;
  min-height: var(--card-image-height) !important;
  max-width: var(--card-width) !important;
  max-height: var(--card-image-height) !important;
  object-fit: cover !important;
  display: block !important;
}

/* Ensure artist cards have proper height - MUST match Pivot Productions exactly */
.list-group section.artists {
  height: var(--card-total-height) !important;
  margin-top: 40px !important;
}

/* Remove excessive top spacing on Artists h1 - MUST match Pivot Productions exactly */
.page-artists-page #content {
  margin-bottom: 0;
}

.page-artists-page .entry-header {
  margin-bottom: 0;
  min-height: 0;
  padding-bottom: 0;
}

.page-artists-page .page-title {
  margin-bottom: 0;
  margin-top: 0;
}

/* Add spacing between artist category sections - MUST match Pivot Productions exactly */
#section-finishing-long-form,
#section-finishing-advertising,
#section-sound,
#section-editors {
  margin-top: 80px !important;
}

/* Reduce margin after section intro/divider - MUST match Pivot Productions exactly */
.page-artists-page .intro {
  margin-bottom: 15px !important;
  margin-top: 0 !important;
}

.list-group .intro {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: var(--card-total-height) !important;
}

.list-group .intro .divider {
  width: 36px !important;
  height: 1px !important;
  background: #ccc !important;
  border: 0 !important;
  margin: 12px auto !important;
  display: block !important;
}

/* Ensure proper grid clearing for 4-column layout - MUST match Pivot Productions exactly */
.list-group section.artists:nth-child(4n+1) {
  clear: left;
}

/* Add bottom border to ALL sections EXCEPT the last one - MUST match Pivot Productions exactly */
.list-group {
  border-bottom: 1px solid #ccc !important;
}

#section-editors {
  border-bottom: none !important;
}

/* Add spacing after the last artist card before the border - MUST match Pivot Productions exactly */
.list-group section.artists:last-of-type {
  margin-bottom: 60px;
}

/* Fix spacing between artist image and name - MUST match Pivot Productions exactly */
.page-artists-page .artists .title {
  margin-top: 10px !important;
}

/* Fix spacing between artist role subtitle and next artist card - MUST match Pivot Productions exactly */
.page-artists-page .artists .subtitle {
  padding-top: 2px;
  margin-bottom: 0;
}

/* Increase gap between artist cards vertically - MUST match Pivot Productions exactly */
.list-group section.artists {
  margin-top: 40px !important;
}

/* Grid system - MUST match Pivot Productions 960.gs exactly */
.container_12 .grid_3,
.site-content .grid_3 {
  width: 23.0% !important; /* MUST match Pivot Productions exactly */
  margin-left: var(--grid-gutter) !important;
  margin-right: var(--grid-gutter) !important;
}

/* MUST match Pivot Productions responsive breakpoints exactly */
@media all and (min-width: 601px) {
  .list-group {
    border-bottom: 1px solid #ccc !important; /* MUST match Pivot Productions exactly */
  }
  
  .list-group section.artists {
    height: var(--card-total-height) !important; /* MUST match Pivot Productions exactly */
  }
}

/* MUST match Pivot Productions mobile behavior exactly */
@media all and (max-width: 600px) {
  .container_12 .grid_3,
  .site-content .grid_3 {
    width: 100% !important; /* MUST match Pivot Productions exactly */
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
