/* Instagram Posts Slider Styles - Erdmannhausen Design */

.instagram {
    position: relative;
    background: #E9EBF0;
}

.instagram__lines {
    /* Dekorative Linien wie bei Veranstaltungen */
}

.instagram__box {
    max-width: 1600px;
    padding: clamp(2rem, 2rem + (1vw - 0.32rem) * 3.125, 6rem) clamp(1rem, 1rem + (1vw - 0.32rem) * 4.2969, 6.5rem) clamp(2rem, 2rem + (1vw - 0.32rem) * 3.125, 6rem) clamp(1rem, 1rem + (1vw - 0.32rem) * 4.2969, 6.5rem);
    margin: 0 auto;
}

.instagram h2 {
    margin-bottom: 40px;
    color: #2952a3;
}

.instagram__items {
    margin-bottom: 40px;
}

/* Instagram Card - Erdmannhausen Style mit Spitzen */
.splide .instagram__card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 20px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1607843137);
    margin: 0 8px 6px 8px;
    height: calc(100% - 6px);
}

.instagram__card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0;
    padding: 0;
    border-top-right-radius: 20px;
}

/* Weiße Caption-Fläche unter dem Bild */
.instagram__caption {
    background: #fff;
    padding: 15px;
    border-bottom-left-radius: 20px;
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.instagram__caption p {
    margin: 0;
    color: #333;
}

/* Link-Button rechts unten - Erdmannhausen Style */
.instagram__link-overlay {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background-color: #2f52a1;
    border-radius: 50%;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.instagram__link-overlay i {
    color: #fff !important;
    font-size: 16px;
}

/* Verhindert das automatische externe Link-Icon vom Website-CSS */
.instagram__link-overlay::after {
    display: none !important;
    content: none !important;
}

/* Slider Controls - Erdmannhausen Style */
.instagram__control {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.splide__arrows {
    display: flex;
    align-items: center;
    gap: 20px;
}

.splide__arrow {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
}

.splide__arrow:hover {
    transform: scale(1.1);
}

.splide__arrow svg {
    fill: #2952a3;
    width: 24px;
    height: 24px;
}

.splide__arrow--prev svg {
    transform: rotate(180deg);
}

.splide__arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.splide__arrow:disabled:hover {
    transform: none;
}

.splide__pagination {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.splide__pagination__page {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(41, 82, 163, 0.3);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.splide__pagination__page.is-active {
    background: #2952a3;
    transform: scale(1.3);
}

.instagram__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF 0% 0% no-repeat padding-box;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1607843137);
    border: 1px solid #2F53A1;
    border-radius: 20px;
    text-decoration: none !important;
    font-size: clamp(1.8rem, 1.8rem + (1vw - 0.32rem) * 0.1562, 2rem);
    color: #000000;
    padding: 4px 15px 1px 15px;
    white-space: nowrap;
}

.instagram__btn:hover {
    background-color: #cfdeff;
    color: #000000;
    text-decoration: none !important;
}

/* Verhindert das automatische externe Link-Icon vom Website-CSS */
.instagram__btn::after {
    display: none !important;
    content: none !important;
}

/* Error Messages */
.instagram__no-posts,
.instagram__error {
    text-align: center;
    padding: 20px;
    color: #666;
}

.instagram__errors {
    margin-top: 20px;
}

.instagram__error {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    color: #c00;
}

/* Responsive */
@media (max-width: 1024px) {
    .instagram__control {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .instagram__btn {
        font-size: 1.6rem;
        padding: 3px 12px 1px 12px;
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .instagram {
        padding: 40px 0;
    }
    
    .instagram__btn {
        font-size: 1.4rem;
        padding: 2px 10px 0px 10px;
    }
}
