/* =========================================================
   Astra Custom Archive + News + Beitragsansicht Styles v2.3
   ========================================================= */

/* ---------- Gesamter Archivbereich ---------- */
.ast-custom-archive-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 15px 0 20px;
}

/* ---------- Überschrift ---------- */
.ast-archive-hero,
.aca-archive-hero {
    margin-bottom: 15px;
}
.ast-archive-title,
.aca-archive-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

/* ---------- Kartenliste (2 Spalten) ---------- */
.ast-archive-list,
.aca-archive-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    max-width: 1140px;
    margin: 0 auto;
}

/* ---------- Karte ---------- */
.ast-archive-card,
.aca-archive-card {
    background: transparent;
    border-radius: 12px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    flex: 1 1 calc(50% - 12px); /* 2 Karten nebeneinander */
    display: flex;              /* damit innerer Container gleich hoch werden kann */
}

/* Weißer Innenbereich */
.ast-archive-card-inner,
.aca-archive-card-inner {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 40px;
    width: 100%;
    min-height: 460px;          /* sorgt für einheitliche Kartenhöhe */
}

/* Hover-Effekt: leicht anheben */
.ast-archive-card:hover .ast-archive-card-inner,
.aca-archive-card:hover .aca-archive-card-inner {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

/* ---------- Hero-Bild in Karten ---------- */
.ast-archive-thumb,
.aca-archive-thumb {
    background: linear-gradient(180deg, #ffffff 0%, #eef6fc 45%, #d3e9fa 100%);
    margin: 0 0 18px 0;
    padding: 0 0 14px 0;
    border-bottom: 2px solid #0074c2;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    overflow: hidden;
    transition: background 1.5s ease;

    /* einheitliche Bildbox */
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ast-archive-card:hover .ast-archive-thumb,
.aca-archive-card:hover .aca-archive-thumb {
    background: linear-gradient(180deg, #ffffff 0%, #e2f0fc 40%, #b6dbfa 100%);
}

.ast-archive-thumb img,
.aca-archive-thumb img {
    display: block;
    max-width: 100%;
    max-height: 180px;           /* gleiche Bildhöhe */
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.25s ease, filter 0.25s ease;
}

/* Bild leicht hervorheben */
.ast-archive-card:hover .ast-archive-thumb img,
.aca-archive-card:hover .aca-archive-thumb img {
    transform: scale(1.03);
    filter: brightness(1.04);
}

/* ---------- Inhalt ---------- */
.ast-archive-card-content,
.aca-archive-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;                     /* füllt die restliche Kartenhöhe */
}

/* Titel: gleiche Farbe wie "Weiterlesen" */
.ast-archive-item-title,
.aca-archive-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #0074c2;
}

.ast-archive-item-title a,
.aca-archive-item-title a {
    text-decoration: none;
    color: #0074c2;
}

/* Hover: dunkleres Blau */
.ast-archive-card:hover .ast-archive-item-title a,
.aca-archive-card:hover .aca-archive-item-title a {
    color: #00508f;
}

/* Auszug mit sauberem Abstand – wächst, um „Weiterlesen“ nach unten zu schieben */
.ast-archive-excerpt,
.aca-archive-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a4a4a;
    margin: 0;
    flex: 1;                     /* sorgt dafür, dass alle Excerpts gleich hoch wirken */
}

/* "Weiterlesen" im gleichen Blau wie Titel */
.ast-archive-readmore,
.aca-archive-readmore {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0074c2;
    text-decoration: none;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* Hover: dunkleres Blau */
.ast-archive-card:hover .ast-archive-readmore,
.aca-archive-card:hover .aca-archive-readmore {
    color: #00508f;
    text-decoration: underline;
}

/* ---------- Meta-Bereich (Datum) mit Trennstrich oben ---------- */
.ast-archive-date,
.aca-archive-date {
    font-size: 0.8rem;
    color: #9a9a9a;
    padding-top: 10px;
    margin-top: 6px;
    border-top: 2px solid #0074c2;
}

/* ---------- Pagination ---------- */
.ast-archive-pagination,
.aca-archive-pagination {
    margin: 28px auto 0;
    text-align: center;
}

.ast-archive-pagination ul,
.aca-archive-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ast-archive-pagination li a,
.ast-archive-pagination li span,
.aca-archive-pagination li a,
.aca-archive-pagination li span {
    display: block;
    padding: 6px 11px;
    font-size: 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.5);
    color: #ffffff;
    text-decoration: none;
    background: transparent;
    transition: all 0.18s ease;
}

.ast-archive-pagination li a:hover,
.aca-archive-pagination li a:hover {
    background: #ffffff;
    color: #00508f;
}

.ast-archive-pagination .current,
.aca-archive-pagination .current {
    background: #ffffff;
    color: #00508f;
    font-weight: 700;
    border-color: #ffffff;
}

/* ---------- Mobile Archiv: 1 Karte pro Zeile ---------- */
@media (max-width: 767px) {
    .ast-archive-card,
    .aca-archive-card {
        flex: 1 1 100%;
    }

    .ast-archive-card-inner,
    .aca-archive-card-inner {
        padding: 24px;
        min-height: auto;               /* Kartenhöhe darf auf Handy frei wachsen */
    }

    .ast-archive-item-title,
    .aca-archive-item-title {
        font-size: 1.05rem;
    }

    .ast-archive-thumb,
    .aca-archive-thumb {
        min-height: 170px;
    }

    .ast-archive-thumb img,
    .aca-archive-thumb img {
        max-height: 150px;
    }
}


/* =========================================================
   BEITRAGSANSICHT (Einzelseite)
   ========================================================= */

/* ---------- Hero-Titel (Headerbereich) ---------- */
/* Elementor-Shortcode-Widget mit Klasse "aca-hero-title" */
.aca-hero-title .elementor-shortcode,
.elementor-widget-shortcode.aca-hero-title .elementor-shortcode,
.aca-hero-title,
.aca-hero-title * {
    text-align: center !important;
    font-size: 28px !important;      /* kleiner als zuvor */
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    line-height: 1.25 !important;
    margin: 0 auto !important;
}

/* Mobile: noch etwas kleiner, damit nichts verrutscht */
@media (max-width: 767px) {
    .aca-hero-title,
    .aca-hero-title *,
    .aca-hero-title .elementor-shortcode {
        font-size: 22px !important;
        line-height: 1.3 !important;
    }
}

/* ---------- Body-Titel (unter dem Bild) ---------- */
/* Elementor-Shortcode-Widget mit Klasse "aca-body-title" */
.aca-body-title .elementor-shortcode,
.elementor-widget-shortcode.aca-body-title .elementor-shortcode,
.aca-body-title,
.aca-body-title * {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.35);
    margin: 0 0 18px 0 !important;
    line-height: 1.3 !important;
}

/* ----------------------------------------------
   Beitragsbild auf der Einzelseite (optimiert)
   ---------------------------------------------- */
/* ---------- Single Post Beitragsbild (400px Höhe + 40px Padding) ---------- */

.aca-single-thumb-wrapper {
    max-width: 1200px;
    width: calc(100% - 40px);   /* Abstand links/rechts zum blauen Bereich */
    margin: 0 auto 32px auto;

    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);

    height: 400px;              /* feste, gewünschte Höhe */
    padding: 40px;              /* überall 40px Innenabstand */

    box-sizing: border-box;
    display: flex;              /* Bild sauber zentrieren */
    align-items: center;
    justify-content: center;
}

/* Hover-Effekt */
.aca-single-thumb-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

/* Das eigentliche Bild */
.aca-single-thumb {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;

    object-fit: contain;        /* Bild vollständig sichtbar */
    object-position: center;
    display: block;
}

/* Mobile Version */
@media (max-width: 767px) {
    .aca-single-thumb-wrapper {
        width: calc(100% - 20px);
        height: 300px;          /* mobile etwas kleiner */
        padding: 20px;
        margin-bottom: 24px;
    }
}

/* =========================================================
   NEWS-LEISTE (Shortcode [news_bar])
   ========================================================= */

.aca-news-bar {
    width: 100%;
    background: rgba(0, 183, 255, 0.40);          /* #00B7FF66 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.21);
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
}

/* Label vor den Beiträgen */
.aca-news-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

/* Wrapper für Items + Pfeile */
.aca-news-track-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Scrollleiste */
.aca-news-track {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    gap: 8px;
}

/* Einzelner Beitrag */
.aca-news-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 4px;
    background: rgba(0, 183, 255, 0.40);
    text-decoration: none;
    color: #ffffff;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

/* Titel + Datum */
.aca-news-title {
    font-weight: 600;
    margin-right: 6px;
}
.aca-news-date {
    opacity: 0.85;
}

/* Hover-Effekt */
.aca-news-item:hover {
    background: rgba(0, 183, 255, 0.85);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.20);
    color: #ffffff;
}

/* ---------- Pfeile links / rechts ---------- */

.aca-news-arrow {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border-radius: 50%;                /* runder Kreis */

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,183,255,0.40);
    color: #ffffff;                    /* Pfeil weiß */
    font-size: 16px;
    font-weight: bold;

    border: 1px solid rgba(255,255,255,0.4);
    cursor: pointer;

    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;

    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover: dezenter Leuchteffekt */
.aca-news-arrow:hover {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 8px rgba(255,255,255,0.15);
    transform: scale(1.07);
}

/* Deaktiviert */
.aca-news-arrow.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Kein Fokus-Rand in Mobilbrowsern */
.aca-news-arrow:active,
.aca-news-arrow:focus {
    color: #ffffff !important;
    outline: none !important;
}

/* ---------- Mobile News-Leiste ---------- */
@media (max-width: 768px) {
    .aca-news-item {
        font-size: 0.78rem;
        padding: 5px 10px;
    }
    .aca-news-title {
        margin-right: 3px;
    }
    .aca-news-arrow {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        font-size: 16px;
    }
}

/* ===============================
   Kommentarbereich – neues Layout
   =============================== */

/* Pflichtstern Hellrot */
.aca-comments-wrap label .required,
.aca-comments-wrap .comment-form-author label .required,
.aca-comments-wrap .comment-form-email label .required {
    color: #ff6b6b !important;
}

/* Abstand & volle Breite des Kommentarbereichs */
.aca-comments-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Eingabefelder (Name, E-Mail) – einheitlich */
.aca-comments-wrap input[type="text"],
.aca-comments-wrap input[type="email"],
.aca-comments-wrap textarea {
    width: 100% !important;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #c6d4e1;
    background: #ffffff;
    font-size: 16px;
}

/* Abstand der Felder */
.aca-comments-wrap .aca-field-wrap {
    margin-bottom: 18px;
}

/* Kommentar-Textarea volle Breite */
.aca-comments-wrap textarea#comment {
    width: 100% !important;
    min-height: 180px;
}

/* Checkbox + Text in einer Zeile */
.aca-comments-wrap .comment-form-consent label,
.aca-comments-wrap .comment-form-cookies-consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px; /* Zwischen Checkbox + Text */
    line-height: 1.4;
}

.aca-comments-wrap .comment-form-consent input[type="checkbox"],
.aca-comments-wrap .comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 3px;
}

/* Button – schöner, dunkleres Blau */
.aca-comment-submit {
    background: #0077c8 !important;
    padding: 10px 26px !important;
    border-radius: 24px !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.25s ease;
}

/* Hover Effekt */
.aca-comment-submit:hover {
    background: #005fa3 !important;
    color: #ffffff !important;
}

/* Kleinere Breite des Buttons */
.aca-comment-submit {
    width: auto !important;
}

/* =========================================================
   PDF Viewer in der Beitragsansicht
   ========================================================= */

.aca-pdf-viewer-wrap {
    max-width: 1000px;
    margin: 30px auto 40px auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.aca-pdf-viewer-frame {
    width: 100%;
    border: none;
    display: block;
}

.aca-pdf-viewer-empty {
    max-width: 900px;
    margin: 20px auto;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(0,183,255,0.08);
    color: #ffffff;
    font-size: 0.95rem;
}
