/* ================================================
   ke_search Custom Styling für poerner2025
   Corporate Design: Blau #00304a, Rot #ab0033
   ================================================ */

/* CSS Custom Properties für Corporate Design */
:root {
    --primary-blue: #00304a;
    --accent-red: #ab0033;
    --text-dark: #333;
    --text-medium: #666;
    --text-light: #888;
    --border-light: #e0e0e0;
    --background-light: #f8f9fa;
    --white: #ffffff;
}

/* ================================================
   SUCHFORMULAR STYLING - Standard ke_search
   ================================================ */

/* Haupt-Container für die ke_search Suchbox - einfach */
.tx-kesearch #kesearch_searchform {
    background: none;
    border: none;
    padding: 1rem 0;
    margin-bottom: 3rem;
    text-align: left;
}

/* Das ke_search Suchformular */
.tx-kesearch #kesearch_searchform form {
    margin: 0;
    display: flex;
    gap: 0;
    align-items: center;
    max-width: 400px;
}

/* Das ke_search Suchfeld */
.tx-kesearch #kesearch_searchform input[type="text"] {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 3px 0 0 3px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.tx-kesearch #kesearch_searchform input[type="text"]:focus {
    border-color: var(--primary-blue);
}

/* Der ke_search Such-Button */
.tx-kesearch #kesearch_searchform input[type="submit"] {
    padding: 0.6rem 1rem;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 0 3px 3px 0;
    font-size: 0.9rem;
    font-weight: normal;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tx-kesearch #kesearch_searchform input[type="submit"]:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* ================================================
   SUCHFORMULAR STYLING - Für Ihr eigenes Template
   ================================================ */

/* Container für Ihr Suchformular */
.kesearch-searchform-container {
    background: none;
    border: none;
    padding: 1rem 0;
    margin-bottom: 3rem;
    text-align: left;
}

/* Ihr Suchformular */
.kesearch-searchform {
    margin: 0;
    display: flex;
    gap: 0;
    align-items: center;
    max-width: 400px;
}

/* Wrapper für Suchfeld und Button */
.kesearch-search-field-wrapper {
    display: flex;
    gap: 0;
    width: 100%;
}

/* Ihr Suchfeld */
.kesearch-search-field {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 3px 0 0 3px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.kesearch-search-field:focus {
    border-color: var(--primary-blue);
}

/* Ihr Such-Button */
.kesearch-search-button {
    padding: 0.6rem 1rem;
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 0 3px 3px 0;
    font-size: 0.9rem;
    font-weight: normal;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.kesearch-search-button:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* Filter-Wrapper falls vorhanden */
.kesearch-filters-wrapper {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.kesearch-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.kesearch-filter-item label {
    font-size: 0.85rem;
    color: var(--text-medium);
    font-weight: 500;
}

.kesearch-filter-item select {
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* Clear-Link */
.kesearch-clear-wrapper {
    margin-top: 1rem;
}

.kesearch-clear-link {
    color: var(--accent-red);
    text-decoration: none;
    font-size: 0.85rem;
}

.kesearch-clear-link:hover {
    text-decoration: underline;
}

/* ================================================
   SUCHERGEBNISSE STYLING - Final Version
   ================================================ */

/* Container für alle ke_search Suchergebnisse */
.tx-kesearch #kesearch_results {
    margin: 0;
    padding: 0;
}

/* ke_search Ergebnisanzahl - mehr Abstand */
.tx-kesearch #kesearch_num_results {
    margin-bottom: 3rem;  /* Mehr Abstand */
    font-size: 1.1rem;
    color: var(--text-medium);
    font-weight: 500;
}

/* Einzelnes ke_search Suchergebnis */
.tx-kesearch #kesearch_results .search-result-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.tx-kesearch #kesearch_results .search-result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Titel mit Nummer in einer Zeile - OpenSans statt Notes */
.tx-kesearch .search-result-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 600;
    font-family: 'Open Sans', sans-serif; /* Body-Schrift statt Header-Schrift */
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.tx-kesearch .search-result-number {
    color: var(--text-medium);
    font-weight: normal;
    flex-shrink: 0;
}

.tx-kesearch .search-result-title a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.tx-kesearch .search-result-title a:hover {
    color: var(--accent-red);
}

/* Datum darunter */
.tx-kesearch .search-result-date {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: normal;
}

/* Body-Container für Bild und Text (nur wenn Bild vorhanden) */
.tx-kesearch .search-result-body {
    display: flex;
    gap: 1.5rem;
}

/* Bild-Container */
.tx-kesearch .search-result-image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 4px;
}

.tx-kesearch .search-result-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Text-Container (mit Bild) */
.tx-kesearch .search-result-content {
    flex: 1;
    min-width: 0;
}

/* Text-Container (ohne Bild) - kein Leerraum */
.tx-kesearch .search-result-content-with-icon {
    /* Normales Block-Layout */
}

/* Icon inline (ohne Leerraum) */
.tx-kesearch .search-result-inline-icon {
    float: left;
    margin-right: 0.5rem;
    margin-top: 0.2rem;
}

.tx-kesearch .search-result-type-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Abstract */
.tx-kesearch .search-result-abstract {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 1rem;
}

/* Meta-Informationen */
.tx-kesearch .search-result-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.tx-kesearch .search-result-meta div {
    margin-bottom: 0.3rem;
}

.tx-kesearch .search-result-meta strong {
    color: var(--text-medium);
}

/* Hit-Highlighting - dezenter aber bold */
.tx-kesearch .hit,
.tx-kesearch span.hit {
    color: #ab0033;
    background: none;
    padding: 0;
    border-radius: 0;
    font-weight: bold; /* Bold hinzugefügt */
}

/* ================================================
   PAGINATION / PAGEBROWSER
   ================================================ */

.tx-kesearch #kesearch_pagebrowser_top,
.tx-kesearch #kesearch_pagebrowser_bottom {
    margin: 2rem 0;
    text-align: center;
}

.tx-kesearch .pagebrowser {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.tx-kesearch .pagebrowser a {
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tx-kesearch .pagebrowser a:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.tx-kesearch .pagebrowser .current {
    padding: 0.5rem 0.8rem;
    background-color: var(--accent-red);
    color: var(--white);
    border-radius: 4px;
    font-weight: 500;
}

/* ================================================
   KEINE ERGEBNISSE
   ================================================ */

.tx-kesearch .no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-medium);
    font-size: 1.1rem;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablet (768px+) */
@media (max-width: 768px) {
    .tx-kesearch #kesearch_searchform {
        padding: 1rem 0;
    }
    
    .tx-kesearch #kesearch_searchform form {
        flex-direction: column;
        gap: 0.5rem;
        max-width: 100%;
    }
    
    .tx-kesearch #kesearch_searchform input[type="text"] {
        border-radius: 3px;
        border-right: 1px solid #ccc;
    }
    
    .tx-kesearch #kesearch_searchform input[type="submit"] {
        border-radius: 3px;
        border: 1px solid #ccc;
    }
    
    /* Responsive für Ihr Suchformular */
    .kesearch-searchform {
        flex-direction: column;
        gap: 0.5rem;
        max-width: 100%;
    }
    
    .kesearch-search-field-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .kesearch-search-field {
        border-radius: 3px;
        border-right: 1px solid #ccc;
    }
    
    .kesearch-search-button {
        border-radius: 3px;
        border: 1px solid #ccc;
    }
    
    .tx