/* ================================================
   MEDIA.CSS - Audio, Video, Photos & Flyers
   ================================================ */

/* Media Hub Cards */
.media-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem auto;
    max-width: 1200px;
}

.media-card {
    background-color: rgba(0, 0, 0, 0.35);
    border: 2px solid var(--apald-darkpurple);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.media-card:hover {
    background-color: rgba(0, 0, 0, 0.5);
    border-color: var(--apald-cyan);
    transform: translateY(-8px);
}

/* ================================================
   AUDIO PAGE
   ================================================ */

#audio-page {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-nav {
    text-align: center;
    margin: 2.5rem 0;
}

.tab-button {
    padding: 0.9rem 1.8rem;
    margin: 0 0.6rem;
    border: none;
    background: rgba(0,0,0,0.4);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.25s;
}

.tab-button.active,
.tab-button:hover {
    background: linear-gradient(var(--apald-litepurple), var(--apald-darkpurple));
    transform: translateY(-2px);
}

/* Audio Grid */
.audio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
    margin-top: 2rem;
}

/* Audio Player Card */
.audio-player-container {
    background: rgba(70, 20, 120, 0.55);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 18px;
    padding: 1.4rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 310px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.audio-player-container:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.35);
}

.audio-title {
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.audio-artist {
    opacity: 0.8;
    font-size: 0.95rem;
}

.audio-description {
    margin-bottom: 1.2rem;
    line-height: 1.55;
    opacity: 0.9;
}

/* Audio Player Controls */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
    overflow: hidden;
    cursor: pointer;
    margin: 1rem 0;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4facfe, #00f2fe);
    transition: width 0.1s linear;
}

.audio-player-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.audio-player button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.audio-player button:hover {
    transform: scale(1.15);
}

.loop-button.active {
    color: var(--apald-cyan);
}

/* ================================================
   PHOTO & FLYER GALLERIES
   ================================================ */

.photo-masonry,
.flyer-masonry {
    column-count: 4;
    column-gap: 1.8rem;
    margin-top: 2rem;
}

.photo-item,
.flyer-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.8rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    cursor: pointer;
    break-inside: avoid;
    background: rgba(0,0,0,0.25);
    transition: transform 0.3s ease;
}

.photo-item:hover,
.flyer-item:hover {
    transform: scale(1.04);
}

.photo-thumb,
.flyer-thumb {
    width: 100%;
    height: auto;
    display: block;
}

/* Info Bar */
.photo-info,
.flyer-info {
    padding: 1rem;
    background: #2c0b4e;
    color: white;
}

.media-label {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #ddd;
    font-size: 0.8rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal_content {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
}

.modal_close:hover, .modal_nav:hover {
    background-image: none;
    background-color: var(--apald-peach);
}

#modalImage {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
}

.modal_content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    border: 3px solid var(--apald-litepurple);
}
/* ================================================
   VIDEO PAGE
   ================================================ */

.video-featured,
.video-grid {
    max-width: 1200px;
    margin: 2.5rem auto;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.video {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1200px) {
    .photo-masonry, .flyer-masonry { column-count: 3; }
    .audio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .photo-masonry, .flyer-masonry { column-count: 2; }
    .audio-grid { grid-template-columns: 1fr; }
    .video-grid { grid-template-columns: 1fr; }
    
    #audio-page, #photos-page, #flyers-page, #video-page {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .photo-masonry, .flyer-masonry { column-count: 1; }
}