/**
 * Frontend CSS für Ohrenbeisser Gallery
 * Dia-Optik Design
 */

/* ==================== ALBEN-GRID (ÜBERSICHT) ==================== */

.obg-albums-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 Spalten */
    gap: 1rem;
    margin: 2rem 0;
}

/* Tablet: 2 Spalten */
@media (max-width: 1100px) {
    .obg-albums-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 2 Spalten */
@media (max-width: 768px) {
    .obg-albums-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Sehr kleine Screens: 1 Spalte */
@media (max-width: 480px) {
    .obg-albums-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== ALBUM-KARTE (DIA) ==================== */

.obg-album-card {
    display: flex;
    flex-direction: column;
}

.obg-album-card a {
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary, #2d2d2d);
    border: 2px solid var(--color-border, #3d3d3d);
    border-radius: 8px;
    /* padding: 1rem; */
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.obg-album-card a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

/* ==================== DIA-RAHMEN ==================== */

.obg-dia-frame {
    position: relative;
    width: 100%;
    background-color: #3d3d3d;
    border: 8px solid #3d3d3d;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    /* box-shadow: inset 0 0 10px rgba(0,0,0,0.3); */
    display: flex;
    align-items: center;
    justify-content: center;
}

.obg-dia-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.obg-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #666;
    font-size: 14px;
}

/* ==================== 18+ BADGE ==================== */

.obg-age-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-accent, #dc2626);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

/* ==================== ALBUM-INFO ==================== */

.obg-album-info {
    margin-top: 0.75rem;
    text-align: center;
}

.obg-album-info h3 {
    font-family: var(--font-heading, 'MontserratAlt1', sans-serif);
    font-size: 0.95rem;
    margin: 0 0 0.25rem 0;
    color: var(--color-text-primary, #e5e5e5);
}

.obg-image-count {
    margin: 0;
    font-size: 0.7rem;
    color: #999;
}

/* ==================== ALBUM-ANSICHT ==================== */

.obg-album-view {
    margin: 0;
}

.obg-album-header {
    margin-bottom: 1.5rem;
}

.obg-album-description {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ==================== BILDER-GRID ==================== */

.obg-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 Spalten */
    gap: 1.5rem;
    margin: 2rem 0;
}

.obg-image-card {
    cursor: pointer;
    display: flex;
}

.obg-image-card .obg-dia-frame {
    transition: transform 0.3s ease;
    width: 100%;
}

.obg-image-card:hover .obg-dia-frame {
    transform: scale(1.05);
}

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

.obg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.obg-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.obg-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
}

.obg-lightbox-image-container {
    max-width: 90%;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.obg-lightbox-image-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

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

.obg-lightbox-info {
    margin-top: 1.5rem;
    max-width: 800px;
    text-align: center;
    color: #e5e5e5;
}

.obg-lightbox-info h3 {
    font-family: var(--font-heading, 'MontserratAlt1', sans-serif);
    font-size: 1.3rem;
    margin: 0 0 0.5rem 0;
}

.obg-lightbox-info #obg-lightbox-exif {
    font-size: 0.9rem;
    color: #ccc;
    line-height: 1.6;
}

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

.obg-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    transition: opacity 0.2s;
}

.obg-lightbox-close:hover {
    opacity: 0.7;
}

.obg-lightbox-prev,
.obg-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    transition: background 0.2s;
}

.obg-lightbox-prev:hover,
.obg-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.obg-lightbox-prev {
    left: 20px;
}

.obg-lightbox-next {
    right: 20px;
}

/* ==================== ALTERSVERIFIKATION ==================== */

.obg-age-verification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.obg-age-dialog {
    background: var(--color-bg-secondary, #2d2d2d);
    border: 1px solid var(--color-border, #3d3d3d);
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    text-align: center;
}

.obg-age-dialog h2 {
    font-family: var(--font-heading, 'MontserratAlt1', sans-serif);
    color: var(--color-accent, #dc2626);
    margin: 0 0 1rem 0;
}

.obg-age-dialog p {
    color: var(--color-text-primary, #e5e5e5);
    margin: 0 0 1.5rem 0;
}

#obg-age-form label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary, #e5e5e5);
}

#obg-age-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.obg-age-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.obg-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.obg-btn-primary {
    background: var(--color-accent, #dc2626);
    color: white;
    border: none;
}

.obg-btn-primary:hover {
    background: #b91c1c;
}

.obg-btn-secondary {
    background: transparent;
    color: var(--color-text-primary, #e5e5e5);
    border: 1px solid var(--color-border, #3d3d3d);
}

.obg-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 1100px) {
    .obg-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .obg-images-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .obg-lightbox-prev,
    .obg-lightbox-next {
        font-size: 40px;
        padding: 15px;
    }

    .obg-lightbox-prev {
        left: 10px;
    }

    .obg-lightbox-next {
        right: 10px;
    }

    .obg-lightbox-image-container {
        max-height: 60vh;
    }

    .obg-lightbox-image-container img {
        max-height: 60vh;
    }

    .obg-age-dialog {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .obg-albums-grid,
    .obg-images-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== ZUFALLSBILD-WIDGET ==================== */

/* Widget verwendet Standard-Widget-Card-Styles vom Theme */
.widget.widget_obg_random_image {
    /* Theme-Styles werden übernommen: background, border, padding, etc. */
}

/* Titel verwendet Theme-Styles */
.widget.widget_obg_random_image .widget-title {
    /* Theme-Styles werden übernommen */
}

.obg-random-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.obg-random-link:hover {
    transform: translateY(-5px);
}

/* Das Zufallsbild nutzt die bereits definierten .obg-dia-frame Styles */
