/* ============================================
   GALLERY PAGE — LOS TRIOS
   gallery-style.css
   Für: Gallery.html & Gallery-detail.html
   (style.css + navbar.css müssen ebenfalls eingebunden sein)
   ============================================ */

/* ============================================
   BASE OVERRIDES
   (style.css setzt .body und blendet .navbar aus —
    das passt nur für index.html, hier korrigieren wir das)
   ============================================ */

body {
    background-color: #000000;
    color: #ffffff;
}

/* Navbar soll auf Subpages sofort sichtbar sein */
.navbar {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    text-align: center;
    padding: 80px 20px 40px;
}

.page-title {
    font-family: 'Creepster', cursive;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #ff0000;
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-bottom: 15px;
    text-shadow:
        3px 3px 6px rgba(0,0,0,0.9),
        0 0 30px rgba(255,0,0,0.7);
}

.page-subtitle {
    font-family: 'Metal Mania', cursive;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: #ff6b6b;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 20px;
}

/* ============================================
   GALLERY OVERVIEW SECTION
   ============================================ */

.gallery-pg-section {
    width: 100%;
    min-height: 60vh;
    padding: 0 20px 100px;
}

.gallery-pg-container {
    max-width: 1100px;
    margin: 0 auto;
}

.gallery-pg-section-title {
    font-family: 'Creepster', cursive;
    font-size: 2.8rem;
    color: #ff0000;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin: 0 0 30px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(255,0,0,0.7);
}

.gallery-pg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 70px;
}

/* ============================================
   GALLERY CARD
   ============================================ */

.gallery-pg-card {
    background: linear-gradient(135deg, #1a0000 0%, #2d0000 50%, #1a0000 100%);
    border: 2px solid #4a0000;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    position: relative;
}

.gallery-pg-card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.gallery-pg-card:hover {
    border-color: #ff0000;
    box-shadow: 0 15px 50px rgba(255,0,0,0.3), inset 0 0 40px rgba(255,0,0,0.05);
    transform: translateY(-8px);
}

.gallery-pg-card:hover::after {
    left: 140%;
}

/* Card Image Area */
.gallery-pg-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0d0000;
    flex-shrink: 0;
}

.gallery-pg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s ease, filter 0.45s ease;
    filter: brightness(0.88);
}

.gallery-pg-card:hover .gallery-pg-img {
    transform: scale(1.06);
    filter: brightness(1);
}

/* Hover Overlay */
.gallery-pg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 35%,
        rgba(0,0,0,0.70) 65%,
        rgba(139,0,0,0.92) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 14px 16px;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 2;
}

.gallery-pg-card:hover .gallery-pg-overlay {
    opacity: 1;
}

.gallery-pg-overlay-text {
    font-family: 'Metal Mania', cursive;
    font-size: 0.78rem;
    color: #ffcccc;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
}

/* Skeleton shimmer while image loads */
.gallery-pg-img-wrap.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #1a0000 25%, #3a0000 50%, #1a0000 75%);
    background-size: 200% 100%;
    animation: pgShimmer 1.5s infinite;
    z-index: 2;
}

@keyframes pgShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Category Badge */
.gallery-pg-category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(100,0,0,0.9);
    color: #ffcccc;
    font-family: 'Metal Mania', cursive;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ff0000;
    z-index: 3;
}

/* Card Body Text */
.gallery-pg-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-grow: 1;
}

.gallery-pg-card-title {
    font-family: 'Creepster', cursive;
    font-size: 1.4rem;
    color: #ffffff;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9), 0 0 12px rgba(255,0,0,0.4);
    line-height: 1.2;
    margin: 0;
}

.gallery-pg-card-desc {
    font-family: 'Metal Mania', cursive;
    font-size: 0.85rem;
    color: #ff9999;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(255,0,0,0.3);
    margin: 0;
}

/* ============================================
   SKELETON PLACEHOLDER CARDS (while loading)
   ============================================ */

.gallery-pg-skeleton {
    background: linear-gradient(135deg, #1a0000 0%, #2d0000 50%, #1a0000 100%);
    border: 2px solid #2a0000;
    border-radius: 10px;
    height: 280px;
    position: relative;
    overflow: hidden;
}

.gallery-pg-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(80,0,0,0.2) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: pgShimmer 1.5s infinite;
}

/* Loading / Error text */
.gallery-pg-section-loading {
    text-align: center;
    font-family: 'Metal Mania', cursive;
    color: #4a0000;
    font-size: 1rem;
    letter-spacing: 3px;
    padding: 40px;
    grid-column: 1 / -1;
}

/* ============================================
   "SEE FULL GALLERY" LINK — on index.html
   ============================================ */

.gallery-see-all {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
}

.gallery-see-all-link {
    font-family: 'Metal Mania', cursive;
    background: transparent;
    border: 2px solid #8b0000;
    color: #ff6b6b;
    padding: 12px 30px;
    font-size: 0.9rem;
    letter-spacing: 3px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}

.gallery-see-all-link:hover {
    border-color: #ff0000;
    color: #ff0000;
    background: rgba(139,0,0,0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,0,0,0.2);
}

/* ============================================
   GALLERY DETAIL PAGE
   ============================================ */

.gallery-detail-section {
    width: 100%;
    padding: 0 20px 100px;
}

.gallery-detail-text {
    font-family: 'Metal Mania', cursive;
    font-size: 1rem;
    color: #ff9999;
    letter-spacing: 2px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
    text-shadow: 0 0 8px rgba(255,0,0,0.2);
}

/* ============================================
   MASONRY GRID
   ============================================ */

.masonry-grid {
    columns: 3 260px;
    column-gap: 14px;
    max-width: 1100px;
    margin: 0 auto 60px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid #2a0000;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    background: #0a0000;
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.45s ease, filter 0.45s ease;
    filter: brightness(0.85);
}

.masonry-item:hover {
    border-color: #ff0000;
    box-shadow: 0 8px 30px rgba(255,0,0,0.35);
    transform: translateY(-4px);
}

.masonry-item:hover img {
    transform: scale(1.05);
    filter: brightness(1);
}

.masonry-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 40%,
        rgba(0,0,0,0.65) 70%,
        rgba(139,0,0,0.88) 100%
    );
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 12px 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.masonry-zoom-icon {
    color: #ffffff;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(255,0,0,0.8);
    line-height: 1;
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

body.lightbox-open {
    overflow: hidden;
}

.lightbox-img {
    max-width: 88vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #4a0000;
    box-shadow: 0 0 80px rgba(139,0,0,0.35);
    transition: opacity 0.25s ease;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    color: #ff6b6b;
    font-size: 1.6rem;
    cursor: pointer;
    background: rgba(20,0,0,0.7);
    border: 1px solid #4a0000;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 2;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ffffff;
    border-color: #ff0000;
    background: rgba(139,0,0,0.6);
    box-shadow: 0 0 16px rgba(255,0,0,0.4);
    transform: scale(1.1);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ff6b6b;
    font-size: 2.4rem;
    cursor: pointer;
    background: rgba(10,0,0,0.7);
    border: 1px solid #4a0000;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    user-select: none;
    line-height: 1;
}

.lightbox-btn:hover {
    background: rgba(139,0,0,0.55);
    border-color: #ff0000;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(255,0,0,0.4);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

.lightbox-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Metal Mania', cursive;
    font-size: 0.85rem;
    color: #5a0000;
    letter-spacing: 3px;
    pointer-events: none;
}

/* Back link */
.gallery-back-link {
    font-family: 'Metal Mania', cursive;
    color: #ff6b6b;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 20px;
    border: 1px solid #4a0000;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
    width: fit-content;
}

.gallery-back-link:hover {
    border-color: #ff0000;
    color: #ff0000;
    background: rgba(139,0,0,0.1);
}

/* ============================================
   RESPONSIVE — Detail Page
   ============================================ */

@media (max-width: 900px) {
    .masonry-grid { columns: 2 200px; }
}

@media (max-width: 480px) {
    .masonry-grid {
        columns: 2 140px;
        column-gap: 8px;
    }
    .masonry-item { margin-bottom: 8px; }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.8rem;
    }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-img  { max-width: 96vw; max-height: 78vh; }
}