/* NOVAChild A–Z collapsible grid */
.az-nav {
    background: #13325e;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    white-space: normal;
    gap: 12px 20px;
    overflow-x: visible
}

.az-nav .az-letter {
    color: #fff;
    text-decoration: none;
    margin: 0;
    font-weight: 700;
    letter-spacing: .18em;
    font-size: 1.5rem;
    flex: 0 1 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition: color .25s ease
}

/* --- Responsive tweaks --- */
@media (max-width: 1200px) {
  .az-nav { gap: 8px; }
}

@media (max-width: 992px) {
  .az-nav { gap: 6px; }
  .az-nav .az-letter { font-size: 1.6rem; letter-spacing:.14em; }
}

/* Mobile: allow natural wrapping to next line instead of scroll */
@media (max-width: 768px) {
  .az-nav {
    justify-content: center;
    gap: 8px 14px;
    overflow-x: visible;
  }
  .az-nav .az-letter {
    font-size: 1.2rem;
    letter-spacing: .12em;
    flex: 0 1 auto;
  }
}

.az-nav .az-letter.active {
    text-decoration: underline !important
}

/* Subtle lighter hover on blue navbar */
.az-nav .az-letter:hover {
    color:  #9ec3f8  !important
}

.az-section {
    border-bottom: 1px solid #efe7e1;
    padding: 10px 0
}

.az-section.is-collapsed .az-body {
    display: none
}

.az-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 8px;
    cursor: pointer;
    color: #654;
    user-select: none
}

.az-title {
    font-weight: 700;
    letter-spacing: .05em;
    font-size: 28px;
    line-height: 1.4
}

.az-toggle {
    appearance: none;
    border: 0;
    background: transparent;
    font-size: 18px;
    color: #9a8f86;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: auto;
    transform: rotate(0deg);
    transition: transform .2s, color .2s;
    display: flex;
    align-items: center;
    justify-content: center
}

.az-section:not(.is-collapsed) .az-toggle {
    transform: rotate(180deg)
}

/* Hover state: color shifts to navbar color */
.az-header:hover,
.az-header:hover .az-title,
.az-header:hover .az-toggle {
    color: #13325e !important
}

/* Grid layout with consistent spacing */
.az-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px
}

@media(min-width:576px) {
    .az-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(min-width:768px) {
    .az-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

@media(min-width:992px) {
    .az-grid {
        grid-template-columns: repeat(4, 1fr)
    }
}

/* Keep 4 columns on very large screens as well */
@media(min-width:1200px) {
    .az-grid {
        grid-template-columns: repeat(4, 1fr)
    }
}

.az-cell {
    display: block
}

/* Card */
.az-card {
    display: block;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit
}

.az-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
    text-decoration: none
}

/* Ensure name AND link color turn navbar blue on hover/focus instead of theme red */
.az-card:hover,
.az-card:focus {
    color: #13325e !important
}

.az-card:hover .az-name,
.az-card:focus .az-name {
    color: #13325e !important
}

/* Media wrapper to enforce exact 3:2 height without layout shift */
.az-media {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 66.666%;
    background: #ffffff !important
}

.az-media>img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%
}

/* Consistent media box */
.az-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover
}

/* Placeholder visual balance */
.az-img.az-ph {
    object-fit: contain;
    padding: 10%
}

/* Caption */
.az-name {
    display: flex;
    margin-top: 10px;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    color: #4a4a4a;
    align-items: center;
    justify-content: center;
}

/* Smooth drawer animation for artist A–Z sections */
.artist-page .az-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: max-height 480ms cubic-bezier(.22, .61, .36, 1), opacity 360ms ease, transform 480ms cubic-bezier(.22, .61, .36, 1)
}

.artist-page .az-section:not(.is-collapsed) .az-body {
    max-height: 9999px;
    opacity: 1;
    transform: translateY(0)
}

@media (prefers-reduced-motion: reduce) {
    .artist-page .az-body {
        transition: none
    }
}