/* ============================================================
   NATIA ART - GALLERY STYLES
   ============================================================
   Alle Galerie-spezifischen Styles
   - Gallery List (list.html)
   - Gallery Items (Grid)
   - Artwork Detail (single.html)
   - Filter System
   - Legend
   
   Version: v1.0 - Final Clean
   ============================================================ */

/* ============================================================
   GALERIE: Volle Breite (Override main's max-width)
   ============================================================ */

body:has(.gallery-grid) main,
body:has(.gallery-header) main {
    max-width: 100% !important;
    width: 100% !important;
}

/* ============================================================
   GALLERY HEADER
   ============================================================ */

.gallery-header {
    margin-bottom: 3rem;
    text-align: center;
}

.gallery-header h1 {
    color: var(--color-text-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.gallery-header p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0 auto;
    max-width: 700px;
}

/* ============================================================
   FILTER SECTION
   ============================================================ */

.filter-section {
    background: var(--color-background-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-small);
    margin-bottom: 3rem;
    padding: 2rem;
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.filter-btn {
    background: var(--gallery-item-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    box-shadow: var(--shadow-small);
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    transition: all var(--transition-speed);
}

.filter-btn:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: white;
    font-weight: 600;
}

/* Filter-Gruppen Farben */
.filter-group:nth-child(1) .filter-btn.active {
    background: #e74c3c;
    border-color: #e74c3c;
}

.filter-group:nth-child(2) .filter-btn.active {
    background: #27ae60;
    border-color: #27ae60;
}

.filter-group:nth-child(3) .filter-btn.active {
    background: #3498db;
    border-color: #3498db;
}

/* ============================================================
   GALLERY GRID
   ============================================================ */

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

.gallery-item {
    background: var(--gallery-item-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    color: inherit;
    display: block;
    overflow: hidden;
    text-decoration: none;
    transition: all var(--transition-speed);
}

.gallery-item:hover {
    box-shadow: var(--gallery-item-hover-shadow);
    transform: translateY(-8px);
}

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

.gallery-item-image-wrapper {
    background: var(--color-background-tertiary);
    overflow: hidden;
    padding-top: 100%;
    position: relative;
    width: 100%;
}

.gallery-item-image-wrapper img {
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    transition: transform var(--transition-speed);
    width: 100%;
}

.gallery-item-info {
    padding: 1.5rem;
}

.gallery-item-title {
    color: var(--color-text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-item-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.gallery-item-serie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ============================================================
   STATUS INDICATORS (Grid-Ansicht)
   ============================================================ */

.status-corner {
    border-style: solid;
    border-width: 0 60px 60px 0;
    height: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: 0;
    z-index: 10;
}

.sold-corner {
    border-color: transparent var(--color-status-sold) transparent transparent;
}

.reserved-corner {
    border-color: transparent var(--color-status-reserved) transparent transparent;
}

.serie-tag-button {
    background: var(--color-accent-secondary);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    transition: all var(--transition-speed);
}

.serie-tag-button:hover {
    background: var(--color-accent-secondary-hover);
    transform: translateY(-2px);
}

/* ============================================================
   NO RESULTS MESSAGE
   ============================================================ */

.no-results {
    background: var(--color-background-secondary);
    border-radius: 12px;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin: 2rem 0;
    padding: 4rem 2rem;
    text-align: center;
}

/* ============================================================
   GALLERY LEGEND
   ============================================================ */

.gallery-legend {
    background: var(--color-background-secondary);
    border-radius: 8px;
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 3rem;
    padding: 1rem;
}

.legend-item {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.legend-triangle {
    border-style: solid;
    border-width: 0 20px 20px 0;
    height: 0;
    width: 0;
}

.legend-sold-triangle {
    border-color: transparent var(--color-status-sold) transparent transparent;
}

.legend-reserved-triangle {
    border-color: transparent var(--color-status-reserved) transparent transparent;
}

.legend-text {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* ============================================================
   ARTWORK DETAIL PAGE
   ============================================================ */

.back-link {
    color: var(--color-accent-primary);
    display: inline-block;
    font-weight: 500;
    margin-bottom: 2rem;
    text-decoration: none;
    transition: color var(--transition-speed);
}

.back-link:hover {
    color: var(--color-accent-primary-hover);
}

.artwork-container {
    display: block;
    margin: 0 auto;
    max-width: 1200px;
    padding: 2rem;
}

.artwork-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.artwork-title {
    color: var(--color-text-primary);
    flex: 1;
    font-size: 2rem;
    margin-bottom: 0;
    min-width: 200px;
}

.artwork-image-wrapper {
    display: inline-block;
    margin-bottom: 3rem;
    position: relative;
    width: 100%;
}

.artwork-image {
    border-radius: 8px;
    box-shadow: var(--shadow-artwork);
    display: block;
    height: auto;
    width: 100%;
}

/* ============================================================
   COPYRIGHT OVERLAY - LINKS UNTEN
   ============================================================ */

.copyright-minimal-left {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 4px;
    bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    left: 1rem;
    padding: 0.5rem 0.85rem;
    position: absolute;
    transition: background var(--transition-speed);
    z-index: 5;
}

.copyright-minimal-left:hover {
    background: rgba(0, 0, 0, 0.85);
}

.copyright-minimal-left a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.copyright-minimal-left a:hover {
    color: white;
    text-decoration: underline;
}

/* ============================================================
   SOLD/RESERVED OVERLAY BANNERS
   ============================================================ */

.sold-overlay {
    border-bottom-right-radius: 8px;
    bottom: 0;
    height: 140px;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
    width: 140px;
}

.sold-banner,
.reserved-banner {
    bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 0.95rem;
    font-weight: bold;
    line-height: 1.2;
    padding: 8px 60px;
    position: absolute;
    right: -40px;
    text-align: center;
    transform: rotate(-45deg);
    transform-origin: center center;
    white-space: nowrap;
}

.sold-banner {
    background: var(--color-status-sold);
    font-size: 1.05rem;
    padding: 9px 65px;
}

.reserved-banner {
    background: var(--color-status-reserved);
}

/* ============================================================
   ARTWORK DETAILS BOX
   ============================================================ */

.artwork-details {
    background: var(--gallery-item-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    margin: 0 auto 2rem;
    max-width: 1000px;
    padding: 2rem;
}

.artwork-description {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;
    max-width: 800px;
}

.meta-items-grid {
    display: grid;
    gap: 1.5rem 2rem;
    grid-template-columns: 1fr 1fr 1fr;
}

.meta-item {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.meta-item.full-width {
    grid-column: 1 / -1;
}

.meta-item.grid-col-span-2 {
    grid-column: span 2;
}

.meta-item:has(.cta-button-small) {
    align-items: center;
    display: flex;
    justify-content: center;
}

.meta-label {
    color: var(--color-text-muted);
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.meta-value {
    color: var(--color-text-primary);
    font-size: 1.1rem;
}

.price {
    color: var(--color-accent-secondary);
    font-size: 1.4rem;
    font-weight: bold;
}

.status-available {
    color: var(--color-status-available);
    font-weight: bold;
}

.status-sold {
    color: var(--color-status-sold);
    font-weight: bold;
}

.status-reserved {
    color: var(--color-status-reserved);
    font-weight: bold;
}

/* ============================================================
   SERIE TAGS
   ============================================================ */

.serie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.serie-tag {
    background: var(--color-accent-secondary);
    border-radius: 4px;
    color: white;
    display: inline-block;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    transition: background var(--transition-speed);
}

.serie-tag:hover {
    background: var(--color-accent-secondary-hover);
}

.serie-tags-compact {
    display: inline-block;
    margin-top: 0.25rem;
}

.serie-tag-compact {
    background: var(--color-accent-secondary);
    border-radius: 3px;
    color: white;
    display: inline-block;
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
    text-decoration: none;
    transition: background var(--transition-speed);
    white-space: nowrap;
}

.serie-tag-compact:hover {
    background: var(--color-accent-secondary-hover);
}

/* ============================================================
   CTA BUTTONS
   ============================================================ */

.cta-button-interesse {
    background: var(--color-accent-secondary);
    border-radius: 6px;
    box-shadow: var(--shadow-small);
    color: white;
    display: inline-block;
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
}

.cta-button-interesse:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.cta-button-interesse-primary {
    background: var(--color-accent-primary);
}

.cta-button-interesse-primary:hover {
    background: var(--color-accent-primary-hover);
}

.cta-button-small {
    border-radius: 4px;
    color: white;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.cta-button-primary {
    background: var(--color-accent-primary);
}

.cta-button-primary:hover {
    background: var(--color-accent-primary-hover);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.cta-button-secondary {
    background: var(--color-accent-secondary);
}

.cta-button-secondary:hover {
    background: var(--color-accent-secondary-hover);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE DESIGN - TABLET (max-width: 968px)
   ============================================================ */

@media (max-width: 968px) {

    .artwork-container {
        padding: 1rem;
    }

    .artwork-details {
        padding: 1.5rem;
    }

    .artwork-image-wrapper {
        margin-bottom: 2rem;
    }

    .artwork-title {
        font-size: 1.6rem;
    }

    .copyright-minimal-left {
        bottom: 0.75rem;
        font-size: 0.7rem;
        left: 0.75rem;
        padding: 0.4rem 0.7rem;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .filter-group {
        gap: 0.5rem;
    }

    .filter-section {
        padding: 1.5rem;
    }

    .gallery-grid {
        gap: 1.5rem;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery-item-info {
        padding: 1rem;
    }

    .gallery-item-title {
        font-size: 1.1rem;
    }

    .gallery-legend {
        align-items: center;
        flex-direction: column;
        gap: 1rem;
    }

    .meta-items-grid {
        gap: 1rem;
        grid-template-columns: 1fr 1fr;
    }

    .reserved-banner {
        bottom: 18px;
        font-size: 0.75rem;
        padding: 6px 45px;
        right: -34px;
    }

    .sold-banner {
        bottom: 20px;
        font-size: 0.85rem;
        padding: 7px 50px;
        right: -32px;
    }

    .sold-overlay {
        height: 110px;
        width: 110px;
    }
}

/* ============================================================
   RESPONSIVE DESIGN - MOBILE (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {

    .artwork-container {
        padding: 0.5rem;
    }

    .artwork-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .artwork-title {
        font-size: 1.4rem;
    }

    .copyright-minimal-left {
        bottom: 0.5rem;
        font-size: 0.65rem;
        left: 0.5rem;
        padding: 0.35rem 0.6rem;
    }

    .cta-button-interesse {
        text-align: center;
        width: 100%;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .filter-buttons {
        gap: 1rem;
    }

    .filter-section {
        padding: 1rem;
    }

    .gallery-grid {
        gap: 1rem;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .gallery-header {
        margin-bottom: 2rem;
    }

    .gallery-header h1 {
        font-size: 1.8rem;
    }

    .meta-items-grid {
        gap: 1rem;
        grid-template-columns: 1fr;
    }

    .meta-label {
        font-size: 0.85rem;
    }

    .meta-value {
        font-size: 1rem;
    }

    .price {
        font-size: 1.2rem;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {

    .back-link,
    .copyright-minimal-left,
    .filter-section,
    .gallery-legend {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item {
        break-inside: avoid;
    }
}
