/* Hauptlayout */
.main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 5%;
    gap: 40px;
    position: relative;
    z-index: 1;
}

/* Sidebar Parallelogramm */
/* Grundstruktur */
.sidebar {
    width: 300px;
    background-color: orange;
    padding: 0;
    position: relative;
    transform: skewY(-5deg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sidebar-inner {
    transform: skewY(5deg);
    padding: 50px 20px;
}

/* Suchfeld */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input[type="text"] {
    flex: 1;
    padding: 16px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    transform: skewY(0deg); /* Text nicht schräg */
    height: 3.5rem;
    box-sizing: border-box;
}

.search-box button {
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    background-color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #555;
}

.lupe-icon {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

/* Akkordeon */
.accordion-item {
    margin-bottom: 15px;
    transform: skewY(0deg); /* Inhalt nicht schräg */
}

.accordion-toggle {
    background-color: #eee;
    color: #222;
    font-weight: bold;
    border: none;
    width: 100%;
    text-align: left;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.accordion-toggle:hover,
.accordion-toggle.active {
    background-color: #ddd;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    margin-top: 8px;
}

.accordion-content.open {
    max-height: 500px; /* Genug für Filterinhalte */
    padding: 10px;
}

.accordion-toggle::after {
    content: "▾";
    float: right;
    transition: transform 0.3s ease;
}

.accordion-toggle.active::after {
    transform: rotate(180deg);
}

.accordion-content label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95em;
}

/* Suchbutton mit Lupe */
.search-box .search-button {
    padding: 0;
    background-color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.search-box .search-button:hover {
    background-color: #555;
}

/* Filter-Button */
.sidebar > .sidebar-inner > form > button[type="submit"]:not(.search-button) {
    margin-top: 2%;
    width: 100%;
    padding: 10px;
    background-color: #222;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transform: skewY(0deg);
}

.sidebar button[type="submit"]:not(.search-button):hover {
    background-color: #444;
}

/* Rechter Bereich Galerie */
.content {
    flex: 1;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

/* Überschrift */
.content h1 {
    font-size: 2em;
    color: #222;
    margin-bottom: 1rem;
}

/* Beschreibungstext */
.content p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #444;
    max-width: 90%;
}

/* Galerie-Grid */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
    margin-top: 1.5rem;
}

/* Einzelner Rahmen */
.rahmen {
    background-color: #f9f9f9;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease;
    cursor: pointer;
}

/* Hover-Effekt fürs Bild */
.rahmen:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rahmen:hover {
    transform: scale(1.03);
}

/* Bild im Rahmen */
.rahmen img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: box-shadow 0.2s ease;
}

/* Cursor bei klickbaren Bildern */
.gallery img.clickable {
    cursor: pointer;
}


/* Ladespinner Animation */
.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #444;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}




/* Responsives Design */

/* Tablet */
@media (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .main {
        padding: 40px 3%;
        gap: 30px;
    }
}

/* Kleine Tablets & größere Smartphones */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
        align-items: center;
        padding: 30px 5%;
        gap: 20px;
    }

    .sidebar {
        flex: 1 1 100%;
        max-width: 100%;
        transform: none; /* Skew aufheben für mobile */
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .sidebar-inner {
        transform: none;
        padding: 30px 15px;
    }

    .content {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 15px 10px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        max-width: 100%;
    }
}

/* Kleine Smartphones */
@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 100%;
    }

    .content h1 {
        font-size: 1.5rem;
    }

    .content p {
        font-size: 1rem;
        line-height: 1.4;
    }

    .search-box input[type="text"] {
        height: 3rem;
        font-size: 0.9rem;
    }

    .search-box button {
        width: 3rem;
        height: 3rem;
    }

    .sidebar-inner {
        padding: 20px 10px;
    }
}