/* modal.css - Separate Styles nur für das Lichtbild-Modal */

/* Hintergrund-Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px); /* Weichzeichner für den Hintergrund */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Sichtbarer Zustand */
.modal.show {
    display: block;
    opacity: 1;
    pointer-events: all;
}

/* Modal Inhalt (Bild + Text) */
.modal-content {
    position: relative;
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90vh;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

/* Das Bild im Modal */
.modal-image {
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
    display: block;
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Animation beim Öffnen */
.modal.show .modal-image {
    opacity: 1;
    transform: scale(1);
}

/* Bildunterschrift */
.modal-caption {
    color: #ccc;
    padding: 15px 0;
    text-align: center;
    font-family: var(--font-main, 'Inter', sans-serif); /* Fallback falls Variable nicht lädt */
}

.modal-caption h2 {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
    font-weight: 400;
    color: #fff;
}

.modal-caption p {
    font-size: 1rem;
    color: #aaa;
    margin: 0;
}

/* Schließen-Button (X) */
.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
  	width: 40px;
  	height: 40px;
    color: #fff;
    font-size: 40px;
    font-weight: 400;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s, transform 0.2s;
    line-height: 34px;
    background: none;
    border: none;
    padding: 0;
  	border-radius: 50%;
  	text-align: center;
}

.modal-close:hover,
.modal-close:focus {
    color: #fff;
    opacity: 0.8;
    /*transform: scale(1.1);*/
    outline: 1px solid #fff; /* Barrierefreiheit: Fokus sichtbar */
    /*outline-offset: 4px;*/
}

/* Mobile Anpassung */
@media (max-width: 700px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    .modal-close {
        top: auto;
        bottom:20px;
        right: 20px;
        font-size: 30px;
    }
    .modal-caption h2 {
        font-size: 1rem;
    }
    .modal-caption p {
        font-size: 0.9rem;
    }
}