/* zen-art-website/assets/css/gallery.css */

/* Estilos específicos para las galerías */
.back-btn {
    padding: 0.5rem 1.5rem;
    background: var(--secondary-bg);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 25px;
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--gold);
    color: var(--primary-bg);
    transform: translateY(-2px);
}

/* Hero Section específico para galerías */
.gallery-hero {
    background: linear-gradient(rgba(36, 21, 13, 0.9), rgba(36, 21, 13, 0.9)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="zen-pattern" patternUnits="userSpaceOnUse" width="200" height="200"><circle cx="100" cy="100" r="3" fill="%23663300" opacity="0.2"/><circle cx="50" cy="150" r="2" fill="%23CC9" opacity="0.1"/></pattern></defs><rect width="1000" height="1000" fill="url(%23zen-pattern)"/></svg>');
    background-size: cover;
    padding: 8rem 2rem 5rem;
    text-align: center;
    min-height: auto;
}

.gallery-hero h1 {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
}

.gallery-hero .hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-warm);
    margin-bottom: 3rem;
}

.work-meta {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.meta-item {
    background: rgba(139, 69, 19, 0.3);
    padding: 1rem 2rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    text-align: center;
}

.meta-label {
    color: var(--text-warm);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.meta-value {
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: bold;
}

.philosophy-section {
    background: linear-gradient(135deg, var(--secondary-bg), var(--primary-bg));
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.philosophy-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(204, 204, 153, 0.1) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.zen-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.zen-highlight {
    color: var(--gold);
    font-weight: bold;
}

.samsara-note {
    font-style: italic;
    color: var(--text-warm);
    font-size: 0.95rem;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    border-left: 3px solid var(--gold);
}

/* Galería de imágenes */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: var(--secondary-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.gallery-image {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-bg), var(--secondary-bg));
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    object-position: center;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(36, 21, 13, 0.7);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.gallery-image::after {
    content: '🔍 Ver imagen completa';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-weight: bold;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.gallery-item:hover .gallery-image::before,
.gallery-item:hover .gallery-image::after {
    opacity: 1;
}

.gallery-caption {
    padding: 1.5rem;
    text-align: center;
}

.image-title {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.image-number {
    color: var(--text-warm);
    font-size: 0.9rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(36, 21, 13, 0.95);
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: var(--secondary-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.lightbox-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    background: var(--primary-bg);
}

.lightbox-info {
    padding: 1.5rem;
    text-align: center;
    background: var(--secondary-bg);
}

.lightbox-title {
    color: var(--gold);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.lightbox-description {
    color: var(--text-warm);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(36, 21, 13, 0.8);
    color: var(--gold);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--gold);
    color: var(--primary-bg);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(36, 21, 13, 0.8);
    color: var(--gold);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.lightbox-nav:hover {
    background: var(--gold);
    color: var(--primary-bg);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(36, 21, 13, 0.8);
    color: var(--gold);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    z-index: 10;
}

/* Versión del maestro Xia Gui */
.xia-section {
    margin: 4rem 0;
    text-align: center;
}

.xia-title {
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 2rem;
    font-style: italic;
}

.xia-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    justify-items: center;
}

/* Cuando hay solo una imagen, centrarla */
.xia-gallery .gallery-item:only-child {
    max-width: 400px;
    width: 100%;
}

.lead {
    font-size: 1.1rem;
    color: var(--text-warm);
    margin-bottom: 2rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 6rem 1rem 3rem;
    }

    .gallery-hero h1 {
        font-size: 2.5rem;
    }

    .work-meta {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .meta-item {
        padding: 0.8rem 1.5rem;
    }

    .philosophy-section {
        padding: 2rem;
        margin: 2rem 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .zen-text {
        text-align: left;
    }

    .xia-gallery {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .xia-gallery .gallery-item:only-child {
        max-width: 350px;
    }
}