/*****************************************
 * SUCHMODUL – GRUNDLAYOUT
 *****************************************/

.mod_search {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 0 1.5rem; /* unten nur wenig Abstand → kein „hinter dem Footer“ */
    font-size: 1.05rem;
    color: #222;
}

/* Info-Zeile "Ergebnisse 1–10 von …" */
.mod_search .km-search-header {
    font-size: 0.9rem;
    color: #777;
    margin: 0.5rem 0 1.25rem;
}

/* Falls Contao doch zwei info-Absätze rendert:
   den zweiten (z.B. "Beachten Sie …") ausblenden */
.mod_search p.info + p.info {
    display: none;
}

/*****************************************
 * SUCHFORMULAR (mod_search_km)
 *****************************************/

.mod_search .km-search-form {
    margin: 0 0 1.5rem;
}

.mod_search .km-search-form .formbody {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: stretch;
}

/* Textfeld */
.mod_search .km-search-form .widget-text {
    flex: 1 1 auto;
}

.mod_search .km-search-form .widget-text label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
    color: #555;
}

.mod_search .km-search-form .widget-text input[type="search"],
.mod_search .km-search-form .widget-text input[type="text"] {
    width: 100%;
    height: 42px;
    padding: 0 0.75rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mod_search .km-search-form .widget-text input[type="search"]:focus,
.mod_search .km-search-form .widget-text input[type="text"]:focus {
    border-color: #ff9f2a;
    box-shadow: 0 0 0 2px rgba(255,159,42,0.2);
}

/* Submit-Button */
.mod_search .km-search-form .submit_container {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
}

.mod_search .km-search-form .submit_container .submit {
    height: 42px;
    padding: 0 1.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    background: #ff9f2a;
    color: #fff;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: background-color 0.15s ease, transform 0.15s ease,
                box-shadow 0.15s ease;
}

.mod_search .km-search-form .submit_container .submit:hover,
.mod_search .km-search-form .submit_container .submit:focus {
    background: #ff8b00;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/*****************************************
 * ERGEBNISLISTE
 *****************************************/

/* UL/OL ohne Bulletpoints */
.mod_search .search-results,
.mod_search ol.search-results,
.mod_search ul.search-results {
    list-style: none;
    margin: 0 0 0;
    padding: 0;
}

/*****************************************
 * RESULT-CARDS
 *****************************************/

.mod_search .km-serp-result {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #f2f2f2;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

/* Hover-Effekt */
.mod_search .km-serp-result:hover {
    border-color: #ffd19b;
    box-shadow: 0 16px 30px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

/* Titel-Link */
.mod_search .km-serp-title {
    display: inline-block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: #222222;
    text-decoration: none;
}

.mod_search .km-serp-title:hover {
    color: #ff8a00;
    text-decoration: underline;
}

/* URL-Zeile */
.mod_search .km-serp-url {
    font-size: 0.85rem;
    color: #999999;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

/* Snippet / Kontext */
.mod_search .km-serp-snippet {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333333;
    margin: 0;
}

/* Hervorhebung im Snippet */
.mod_search .km-serp-snippet mark,
.mod_search .km-serp-snippet .highlight {
    background: rgba(255,159,42,0.18);
    padding: 0 0.05em;
    border-radius: 2px;
}

/*****************************************
 * PAGINATION
 *****************************************/

.mod_search .km-serp-pagination {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f1f1;
    text-align: center;
    font-size: 0.9rem;
}

/* Text "Seite 1 von 3" */
.mod_search .km-serp-pagination > .pagination > p,
.mod_search .km-serp-pagination > p {
    margin-bottom: 0.75rem;
    color: #777;
}

/* Liste der Seiten */
.mod_search .km-serp-pagination .pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    gap: 0.4rem;
}

/* Elemente */
.mod_search .km-serp-pagination .pagination li {
    display: inline-block;
}

/* Links/Spans */
.mod_search .km-serp-pagination .pagination li a,
.mod_search .km-serp-pagination .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    text-decoration: none;
    color: #555;
    background: #f6f6f6;
    transition: background-color 0.15s ease, color 0.15s ease,
                border-color 0.15s ease, transform 0.15s ease;
}

/* Hover auf Seitenlink */
.mod_search .km-serp-pagination .pagination li a:hover,
.mod_search .km-serp-pagination .pagination li a:focus {
    background: #ffefe0;
    border-color: #ffd19b;
    color: #222;
    transform: translateY(-1px);
}

/* Aktive Seite */
.mod_search .km-serp-pagination .pagination li.active span,
.mod_search .km-serp-pagination .pagination li span.current {
    background: #ff9f2a;
    color: #fff;
    border-color: #ff9f2a;
}

/*****************************************
 * „MEHR ERGEBNISSE LADEN“-BUTTON
 *****************************************/

.mod_search .km-serp-loadmore-wrap {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 0; /* kein großer bottom-Abstand */
}

.mod_search .km-serp-loadmore {
    border: none;
    border-radius: 999px;
    padding: 0.8rem 2.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #ff8a00;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease,
                box-shadow 0.15s ease,
                background 0.15s ease;
}

.mod_search .km-serp-loadmore:hover,
.mod_search .km-serp-loadmore:focus {
    background: #ff9f2d;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.mod_search .km-serp-loadmore.is-loading {
    opacity: 0.7;
    cursor: wait;
}

/*****************************************
 * MOBILE
 *****************************************/

@media (max-width: 767px) {

    .mod_search {
        max-width: 100%;
        padding: 1.5rem 1rem 1.5rem;
        font-size: 1rem;
    }

    .mod_search .km-search-form .formbody {
        flex-direction: column;
    }

    .mod_search .km-search-form .submit_container {
        width: 100%;
        align-items: center;
    }

    .mod_search .km-search-form .submit_container .submit {
        width: 100%;
        text-align: center;
    }

    .mod_search .km-serp-result {
        padding: 1rem 1rem;
    }

    .mod_search .km-serp-title {
        font-size: 1.05rem;
    }

    .mod_search .km-serp-snippet {
        font-size: 0.95rem;
    }

    .mod_search .km-serp-pagination .pagination ul {
        gap: 0.3rem;
    }

    .mod_search .km-serp-pagination .pagination li a,
    .mod_search .km-serp-pagination .pagination li span {
        min-width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .mod_search .km-serp-loadmore {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}
