/* ==========================================================
   galerie-widget.css
   Gemeinsames Styling für ALLE Galerie-Seiten
   (Hunde, Pferde, Wildtiere, Hoftiere, Vögel, Verschiedenes, Haus, Gesamt)
   Diese Datei EINMAL hochladen und von jeder Galerie-Seite einbinden:
   <link rel="stylesheet" href="galerie-widget.css">
   ========================================================== */
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #fafafa;
    --color-text: #757575;
    --color-text-muted: #444444;
    --color-accent: #8b7355;
    --color-border: #e0e0e0;
    --shadow-3d: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 30px 60px -15px rgba(0, 0, 0, 0.25);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --font-serif: "Georgia", "Times New Roman", "Times", serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

.zs-gallery-widget { font-family: var(--font-sans); color: var(--color-text); line-height: 1.6; }

.zs-gallery-header { padding: 60px 5% 30px; text-align: center; background: var(--color-bg); }
.zs-page-title { font-family: var(--font-serif); font-size: clamp(2rem, 6vw, 3.5rem); font-weight: normal; letter-spacing: 0.02em; margin-bottom: 0.3rem; color: var(--color-text); }
.zs-page-subtitle { font-size: 0.85rem; letter-spacing: 0.15em; color: var(--color-text-muted); text-transform: uppercase; }
.zs-page-info { margin-top: 10px; font-size: 0.8rem; color: var(--color-accent); }

.zs-loading-container { padding: 80px 5%; text-align: center; }
.zs-loading-spinner { width: 40px; height: 40px; border: 3px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: zs-spin 1s linear infinite; margin: 0 auto 15px; }
@keyframes zs-spin { to { transform: rotate(360deg); } }
.zs-loading-text { color: var(--color-text-muted); font-size: 0.85rem; }
.zs-error-text { color: #b3413a; font-size: 0.85rem; }

.zs-gallery-container { padding: 15px 5% 60px; background: var(--color-bg); display: none; }
.zs-gallery-container.zs-active { display: block; }

.zs-gallery-section { margin-bottom: 50px; }
.zs-gallery-section-title { font-family: var(--font-serif); font-size: 1.6rem; font-weight: normal; text-align: center; margin-bottom: 20px; color: var(--color-text); }

.zs-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.zs-gallery-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--transition-smooth), transform 0.7s var(--transition-smooth);
}
.zs-gallery-item.zs-visible { opacity: 1; transform: translateY(0); }

.zs-gallery-card {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: var(--shadow-3d);
    transition: all 0.5s var(--transition-smooth);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.zs-gallery-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

.zs-gallery-card-img {
    position: relative;
    background: var(--color-bg-alt);
    padding: 2px;
    overflow: hidden;
    flex-shrink: 0;
    height: 340px;
}

.zs-gallery-card-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    border: 2px solid var(--color-border);
    transition: transform 0.8s var(--transition-smooth);
}
.zs-gallery-card:hover .zs-gallery-card-img img { transform: scale(1.02); }

.zs-gallery-caption {
    padding: 12px;
    background: #f1f1f1;
    border-top: 1px solid var(--color-border);
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zs-gallery-caption h3 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: normal;
    letter-spacing: 0.03em;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* LIGHTBOX */
.zs-lightbox {
    position: fixed;
    inset: 0;
    background: #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--transition-smooth);
    padding: 0;
    touch-action: none;
}
.zs-lightbox.zs-active { opacity: 1; visibility: visible; }

.zs-lightbox-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    max-width: 1400px;
    width: 100%;
    max-height: 90vh;
    align-items: center;
    position: relative;
    z-index: 10001;
}

.zs-lightbox-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt);
    padding: 39px 15px;
    border-radius: 2px;
    min-height: 400px;
    box-shadow: var(--shadow-3d);
}

.zs-lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 78px);
    object-fit: contain;
    border: 2px solid var(--color-border);
    transform: scale(0.97);
    opacity: 0;
    transition: transform 0.4s var(--transition-smooth), opacity 0.3s var(--transition-smooth);
    user-select: none;
    -webkit-user-drag: none;
}
.zs-lightbox.zs-active .zs-lightbox-img { transform: scale(1); opacity: 1; }

.zs-lightbox-info {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    padding: 30px;
    border-radius: 2px;
    box-shadow: var(--shadow-3d);
    overflow-y: auto;
    max-height: 85vh;
    overscroll-behavior: contain;
}

.zs-lightbox-title {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: normal;
    letter-spacing: 0.02em;
    color: var(--color-text);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    line-height: 1.3;
}

.zs-lightbox-description {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.zs-lightbox-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 15px;
}
.zs-lightbox-meta strong { color: var(--color-text); font-weight: 500; }
.zs-lightbox-meta .zs-date-container { display: flex; flex-direction: column; }

.zs-lightbox-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.zs-lightbox-tags span {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 15px;
    color: var(--color-text-muted);
}

.zs-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    background: var(--color-bg-alt);
    color: var(--color-text);
    z-index: 10002;
}
.zs-lightbox-close:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; transform: rotate(90deg); }

.zs-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    background: var(--color-bg-alt);
    color: var(--color-text);
    z-index: 10002;
    user-select: none;
}
.zs-lightbox-nav:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }
.zs-lightbox-prev { left: 20px; }
.zs-lightbox-next { right: 20px; }

.zs-gallery-footer { padding: 40px 5%; text-align: center; border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: 0.8rem; letter-spacing: 0.05em; background: var(--color-bg-alt); }

/* RESPONSIVE - HANDY / MOBILE */
@media (max-width: 768px) {
    .zs-gallery-grid { grid-template-columns: 1fr; gap: 0; padding: 0; }
    .zs-gallery-card { border: none; box-shadow: none; border-radius: 0; background: transparent; height: auto; }
    .zs-gallery-card:hover { transform: none; box-shadow: none; }
    .zs-gallery-card-img { height: auto; padding: 0; background: transparent; border: none; width: 100%; }
    .zs-gallery-card-img img { width: 100%; height: auto; border: none; display: block; }
    .zs-gallery-caption { display: none; }
    .zs-lightbox-nav { display: none; }

    .zs-lightbox { align-items: flex-start; overflow-y: auto; padding: 0; touch-action: pan-y; }

    .zs-lightbox-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
        margin: 0;
        padding: 50px 10px 30px;
        gap: 20px;
    }

    .zs-lightbox-image-wrapper { width: 100%; padding: 20px 0; background: transparent; box-shadow: none; min-height: auto; flex-shrink: 0; }
    .zs-lightbox-img { width: 100%; max-height: 60vh; border: none; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

    .zs-lightbox-info {
        width: 100%;
        background: var(--color-bg-alt);
        border: 1px solid var(--color-border);
        padding: 20px 15px;
        box-shadow: var(--shadow-3d);
        margin-top: 0;
        max-height: none;
        overflow: visible;
        border-radius: 8px;
    }

    .zs-lightbox-title { font-size: 1.3rem; margin-bottom: 10px; padding-bottom: 10px; }
    .zs-lightbox-close { top: 10px; right: 10px; width: 40px; height: 40px; z-index: 10003; }

    .zs-gallery-header { padding: 30px 5% 15px; }
    .zs-page-title { font-size: 2rem; }
}
