/**
 * AlterEgo Band - Gallery & Members Styles
 * Elegant photo gallery and band member profiles
 *
 * @package AlterEgo
 */

/* =============================================================
   PHOTO GALLERY
   ============================================================= */
.gallery-page {
    background: var(--color-off-white, #F5F5F0);
}

.gallery-header,
.members-header {
    background: linear-gradient(135deg, #3A2818 0%, #4A3728 50%, #C9A961 100%);
    color: #fff;
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-header::before,
.members-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(201, 169, 97, 0.05) 10px,
            rgba(201, 169, 97, 0.05) 20px
        );
    z-index: 0;
}

.gallery-header .container,
.members-header .container {
    position: relative;
    z-index: 1;
}

.gallery-header .page-title,
.members-header .page-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.gallery-header .page-subtitle,
.members-header .page-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    font-style: italic;
}

/* Photo Gallery Grid */
.photo-gallery-section {
    padding: 5rem 0;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(74, 55, 40, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(201, 169, 97, 0.25);
}

.gallery-link {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-link img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(74, 55, 40, 0.95) 0%, rgba(74, 55, 40, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    color: #fff;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.gallery-item:hover .gallery-icon {
    opacity: 1;
    transform: translateY(0);
}

.gallery-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.2s;
    color: #fff;
}

.gallery-item:hover .gallery-title {
    opacity: 1;
    transform: translateY(0);
}

.gallery-description {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.3s;
    color: rgba(255,255,255,0.9);
}

.gallery-item:hover .gallery-description {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================================
   VIDEO GALLERY
   ============================================================= */
.video-gallery-section {
    padding: 5rem 0;
    background: #fff;
}

.video-category {
    margin-bottom: 4rem;
}

.video-category:last-child {
    margin-bottom: 0;
}

.video-category-title {
    font-size: 2rem;
    color: #4A3728;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #C9A961, transparent) 1;
}

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

.video-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(74, 55, 40, 0.1);
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(201, 169, 97, 0.2);
}

.video-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-title {
    padding: 1.5rem;
    font-size: 1.1rem;
    color: #4A3728;
    margin: 0;
}

/* Video link cards (Facebook, Instagram) */
.video-link-card {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.video-link-card:hover {
    transform: scale(1.02);
}

.video-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #4A3728 0%, #5C4033 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-placeholder.instagram-gradient {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
}

.video-link-card:hover .video-placeholder {
    opacity: 0.9;
}

.video-platform {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: #999;
    text-align: right;
    font-style: italic;
}

/* =============================================================
   BAND MEMBERS
   ============================================================= */
.band-members-section {
    padding: 5rem 0;
    background: var(--color-cream, #FAF8F3);
}

.members-grid-detailed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.member-card-detailed {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(74, 55, 40, 0.15);
    transition: all 0.4s ease;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 0;
}

.member-card-detailed:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(201, 169, 97, 0.25);
}

.member-image-container {
    position: relative;
    overflow: hidden;
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.member-card-detailed:hover .member-photo {
    transform: scale(1.05);
}

.member-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(74, 55, 40, 0.9) 0%, transparent 100%);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.member-card-detailed:hover .member-overlay {
    transform: translateY(0);
}

.member-instrument {
    color: #C9A961;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
}

.member-info-detailed {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.member-name {
    font-size: 2rem;
    color: #4A3728;
    margin-bottom: 0.5rem;
    font-family: Georgia, serif;
}

.member-role {
    font-size: 1.25rem;
    color: #C9A961;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.member-bio {
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.member-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.member-meta-item {
    font-size: 0.9rem;
    color: #666;
}

.member-meta-item strong {
    display: block;
    color: #4A3728;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.member-social-links {
    display: flex;
    gap: 1rem;
}

.member-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #C9A961;
    border-radius: 8px;
    color: #4A3728;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.member-social-link:hover {
    background: linear-gradient(135deg, #C9A961 0%, #D4AF37 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.member-social-link.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.member-social-link.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%);
    border-color: #E4405F;
}

/* =============================================================
   MEMBERS CTA SECTION
   ============================================================= */
.members-cta {
    background: linear-gradient(135deg, #3A2818 0%, #4A3728 50%, #C9A961 100%);
    color: #fff;
    padding: 5rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* =============================================================
   RESPONSIVE DESIGN
   ============================================================= */
@media (max-width: 1024px) {
    .member-card-detailed {
        grid-template-columns: 1fr;
    }

    .member-image-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .gallery-header .page-title,
    .members-header .page-title {
        font-size: 2.5rem;
    }

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

    .member-info-detailed {
        padding: 2rem;
    }

    .member-name {
        font-size: 1.75rem;
    }

    .member-role {
        font-size: 1.1rem;
    }

    .member-meta {
        flex-direction: column;
        gap: 1rem;
    }

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

    .member-social-link {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .gallery-header,
    .members-header {
        padding: 4rem 0;
    }

    .gallery-header .page-title,
    .members-header .page-title {
        font-size: 2rem;
    }

    .photo-gallery-grid {
        gap: 1rem;
    }

    .members-cta h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1.1rem;
    }
}

/* =============================================================
   LIGHTBOX - FULL SCREEN IMAGE PREVIEW
   ============================================================= */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 0 50px rgba(201, 169, 97, 0.3);
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(201, 169, 97, 0.9);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    background: #C9A961;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(201, 169, 97, 0.9);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #C9A961;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 1.1rem;
    padding: 1rem;
}

.lightbox-counter {
    position: absolute;
    top: -50px;
    left: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

/* Prevent body scroll when lightbox is active */
body.lightbox-active {
    overflow: hidden;
}

/* Gallery item cursor for clickable images */
.gallery-link {
    cursor: zoom-in;
}

/* Responsive lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 80%;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.25rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        bottom: 10px;
        font-size: 0.9rem;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 8px;
    }

    .lightbox-counter {
        top: 10px;
        left: 10px;
        font-size: 0.8rem;
    }
}
