/* ChurchTools Posts - Feed Styles */
.ct-posts-feed {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ct-posts-error,
.ct-posts-empty {
    text-align: center;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 4px;
}

.ct-posts-error {
    color: #e74c3c;
    background: #fdf2f2;
}

/* Post Card */
.ct-post {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ct-post-header {
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.ct-post-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.ct-post-header-top h3 {
    font-size: 1.4rem;
    margin: 0;
    padding: 0;
    font-weight: bold;
    font-style: normal;
    flex: 1;
    line-height: 1.2;
}

.ct-post-header-top h3 a {
    color: #000;
    text-decoration: none;
}

.ct-post-header-top h3 a:hover {
    color: #333;
}

.ct-post-header-top > .ct-read-more {
    flex-shrink: 0;
}

.ct-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    width: 100%;
}

.ct-post-meta i {
    margin-right: 4px;
    color: #666;
}

.ct-post-group {
    background: none;
    padding: 0;
    font-size: 0.85rem;
    color: #666;
}

.ct-post-group i {
    margin-right: 4px;
}

.ct-post-content {
    padding: 10px 20px;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
}

.ct-post-content a {
    color: #5ab9c1;
    text-decoration: underline;
    word-break: break-all;
}

.ct-post-content a:hover {
    color: #4aa8b0;
}



/* Read More Button - dezent */
.ct-read-more {
    display: inline-block;
    padding: 8px 18px;
    background: #fff;
    color: #333 !important;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.ct-read-more:hover {
    border-color: #5ab9c1;
    color: #5ab9c1 !important;
}

/* Feed Bildergalerie - Goldener Schnitt */
.ct-feed-gallery {
    display: grid;
    gap: 4px;
    margin: 0 20px 15px;
    border-radius: 8px;
    overflow: hidden;
}

.ct-gallery-1 {
    grid-template-columns: 1fr;
}

.ct-gallery-1 .ct-feed-gallery-item {
    max-height: 500px;
    overflow: hidden;
}

.ct-gallery-1 .ct-feed-gallery-item img {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: cover;
    object-position: center center;
}

.ct-gallery-2 {
    grid-template-columns: 1fr 1fr;
    aspect-ratio: 3.236 / 1;
}

.ct-gallery-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1.618 / 1;
}

.ct-gallery-3 .ct-feed-gallery-item:first-child {
    grid-row: span 2;
}

.ct-gallery-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1.618 / 1;
}

.ct-feed-gallery-item {
    display: block;
    overflow: hidden;
    position: relative;
}

.ct-feed-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.3s;
}

.ct-feed-gallery-item:hover img {
    transform: scale(1.03);
}

.ct-more-images {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 12px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Pagination */
.ct-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.ct-pagination a,
.ct-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.ct-pagination a:hover {
    border-color: #5ab9c1;
    color: #5ab9c1;
}

.ct-page-link {
    background: #fff !important;
    color: #333 !important;
}

.ct-page-link:hover {
    border-color: #5ab9c1 !important;
    color: #5ab9c1 !important;
}

.ct-page-info {
    border: none !important;
    color: #666;
    font-size: 0.9rem;
}

/* Single Post View */
.ct-single-post {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ct-single-back {
    display: inline-block;
    margin-bottom: 12px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.ct-single-back:hover {
    color: #333;
}

.ct-single-back i {
    margin-right: 5px;
}

.ct-single-title {
    font-size: 1.4rem;
    margin: 0 0 12px 0;
    font-weight: bold;
}

.ct-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    color: #666;
}

.ct-single-meta i {
    margin-right: 5px;
    color: #666;
}

.ct-single-content {
    line-height: 1.6;
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 12px;
}

.ct-single-content a {
    color: #5ab9c1;
    word-break: break-word;
}

.ct-single-gallery {
    margin: 0 0 12px 0;
    padding: 0;
}

.ct-single-footer {
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-start;
}

/* Lightbox */
.ct-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

.ct-lightbox.active {
    display: flex;
}

.ct-lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ct-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.ct-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1000001;
}

.ct-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ct-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1000001;
}

.ct-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

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

.ct-lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

.ct-lightbox-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Responsive */
@media (max-width: 600px) {
    .ct-post-header {
        flex-direction: column;
    }

    .ct-gallery-3,
    .ct-gallery-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ct-single-post {
        padding: 20px;
    }

    .ct-single-title {
        font-size: 1.4rem;
    }

    .ct-lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

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

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