/* Backend Layout */

.cns-admin-wrap h1 {
    margin-bottom: 20px;
}

.cns-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
    gap: 24px;
    align-items: flex-start;
}

.cns-admin-form-card,
.cns-admin-list-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Frontend Slider */

.cns-slider {
    position: relative;
    /*max-width: 1200px;*/
    margin: 0 auto 40px auto;
    font-family: inherit;
}

.cns-slider-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
    gap: 8px;
}

.cns-slider-nav {
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.cns-slider-nav:hover:not(:disabled) {
    background: #f5f5f5;
    transform: translateY(-1px);
    border-color: #ccc;
}

.cns-slider-nav:disabled {
    opacity: 0.4;
    cursor: default;
}

.cns-slider-window {
    overflow: hidden;
}

.cns-slider-track {
    display: flex;
    gap: 30px;
    transition: transform 0.4s ease;
    will-change: transform;
    align-items: stretch;
}

/* Desktop: 3 Elemente sichtbar */
.cns-slide {
    flex: 0 0 calc((100% - 60px) / 3);
    display: flex;
}

@media (max-width: 1000px) {
    .cns-slide {
        flex: 0 0 calc((100% - 30px) / 2);
    }
}

@media (max-width: 600px) {
    .cns-slide {
        flex: 0 0 100%;
    }
}

/* Cards */
.cns-card {
    background: #ffffff;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.cns-card-image {
    /*height: 450px;*/
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .cns-card-image {
        height: 200px;
    }
}

.cns-card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.cns-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.cns-card-title {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.cns-card-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-line-clamp: 4;          /* Anzahl der sichtbaren Zeilen im Teaser */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cns-card-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 4px;
}

.cns-card-date {
    text-transform: none;
}

/* Weiterlesen Button */
.cns-read-more {
    margin-top: auto;
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.cns-read-more:hover {
    background: #b41e1f;
    border-color: #b41e1f;
    transform: translateY(-1px);
}

/* Modal Overlay */

.cns-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.cns-modal-overlay.is-open {
    display: flex;
}

.cns-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.cns-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 3px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
    padding: 20px 24px 24px;
    z-index: 1;
}

/* Modal Close Button */

.cns-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

/* Modal Inhalt */

.cns-modal-content {
    margin-top: 14px;
}

.cns-modal-article {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cns-modal-image img {
    /*width: 100%;*/
    height: auto;
    border-radius: 10px;
    display: block;
}

.cns-modal-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 4px;
}

.cns-modal-title {
    font-size: 1.4rem;
    margin: 0 0 10px;
}

.cns-modal-text p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .cns-modal-dialog {
        padding: 16px 14px 18px;
        border-radius: 12px;
    }

    .cns-modal-title {
        font-size: 1.2rem;
    }
}