/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #2c3e50;
    background-color: #f0f4f8;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #2980b9;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
    color: #1a5276;
}

/* ===== LAYOUT ===== */
.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(135deg, #4a7c8f 0%, #6a9fb5 50%, #87b5c4 100%);
    margin: 0 -20px;
    padding: 2.5em 20px;
    text-align: center;
    color: #fff;
}

.site-header h1 {
    font-size: 2em;
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: 0.2em;
}

.header-subtitle {
    font-size: 1em;
    font-weight: 300;
    opacity: 0.85;
}

/* ===== FILTER SECTION ===== */
.filter-section {
    background: #fff;
    margin: 0 -20px;
    padding: 1.5em 20px 2em;
    border-bottom: 1px solid #d5dde5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filter-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.filter-title {
    font-size: 1.05em;
    font-weight: 600;
    color: #4a7c8f;
    margin-bottom: 1em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85em;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1em;
    align-items: end;
}

.filter-group label {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: #5a6a7a;
    margin-bottom: 0.35em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.55em 0.75em;
    border: 1px solid #c8d5e0;
    border-radius: 5px;
    font-size: 0.95em;
    color: #2c3e50;
    background: #fff;
    transition: border-color 0.2s;
    font-family: inherit;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #4a7c8f;
    box-shadow: 0 0 0 2px rgba(74, 124, 143, 0.15);
}

.filter-group input::placeholder {
    color: #a0b0c0;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
}

.btn-reset {
    width: 100%;
    padding: 0.6em 1em;
    background: none;
    border: 1px solid #c8d5e0;
    border-radius: 5px;
    color: #5a6a7a;
    cursor: pointer;
    font-size: 0.9em;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: #f0f4f8;
    border-color: #4a7c8f;
    color: #4a7c8f;
}

/* ===== RESULTS SECTION ===== */
.results-section {
    margin-top: 1.5em;
}

.results-info {
    margin-bottom: 0.75em;
    font-size: 0.9em;
    color: #5a6a7a;
    font-weight: 500;
}

/* ===== DATATABLES OVERRIDES ===== */

/* Hide default DT search (we have our own) */
.dataTables_filter {
    display: none !important;
}

/* Top bar: length selector + info */
.dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75em;
    font-size: 0.88em;
    color: #5a6a7a;
}

.dt-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1em;
    font-size: 0.88em;
    color: #5a6a7a;
}

/* DT Length select */
.dataTables_length select {
    padding: 0.3em 0.5em;
    border: 1px solid #c8d5e0;
    border-radius: 4px;
    margin: 0 0.3em;
    font-family: inherit;
}

/* DT Pagination */
.dataTables_paginate .paginate_button {
    padding: 0.4em 0.8em !important;
    margin: 0 2px !important;
    border: 1px solid #c8d5e0 !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #2c3e50 !important;
    font-size: 0.9em;
}

.dataTables_paginate .paginate_button.current,
.dataTables_paginate .paginate_button.current:hover {
    background: #4a7c8f !important;
    border-color: #4a7c8f !important;
    color: #fff !important;
}

.dataTables_paginate .paginate_button:hover {
    background: #e8eff5 !important;
    border-color: #4a7c8f !important;
    color: #2c3e50 !important;
}

.dataTables_paginate .paginate_button.disabled,
.dataTables_paginate .paginate_button.disabled:hover {
    color: #aaa !important;
    background: #f8f8f8 !important;
    border-color: #ddd !important;
}

/* ===== THE TABLE → CARD LAYOUT ===== */

#therapeuten-table {
    width: 100% !important;
    border-collapse: collapse;
}

/* Table header: 3 visible columns as column titles */
#therapeuten-table thead {
    display: table-header-group;
}

#therapeuten-table thead th {
    background: #4a7c8f !important;
    color: #fff !important;
    font-weight: 500;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.8em 1em !important;
    border: none !important;
}

/* Table body rows */
#therapeuten-table tbody tr {
    background: #fff;
    border-bottom: 1px solid #e4eaf0;
    transition: background 0.15s;
}

#therapeuten-table tbody tr:hover {
    background: #f5f9fc;
}

#therapeuten-table tbody td {
    padding: 1em !important;
    vertical-align: top;
    border: none !important;
}

/* The Spezialisierung column spans full width below */
#therapeuten-table tbody td:nth-child(4) {
    /* Spezialisierung column - this will be styled via CSS grid or left as-is */
}

/* ===== CARD CONTENT STYLES ===== */

.therapeut-name {
    font-size: 1.05em;
    font-weight: 600;
    color: #1a2a3a;
    margin-bottom: 0.15em;
}

.therapeut-titel {
    display: block;
    font-size: 0.88em;
    color: #6a7a8a;
    font-weight: 400;
}

.therapeut-adresse {
    font-size: 0.95em;
    color: #3a4a5a;
    line-height: 1.5;
}

.therapeut-kontakt {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
}

.kontakt-item {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.93em;
    color: #3a4a5a;
    white-space: nowrap;
}

.kontakt-item a {
    color: #2980b9;
}

.kontakt-item .icon {
    width: 16px;
    height: 16px;
    fill: #4a7c8f;
    flex-shrink: 0;
}

.therapeut-spez {
    font-size: 0.85em;
    color: #5a6a7a;
    line-height: 1.5;
    padding-top: 0.3em;
}

.therapeut-spez strong {
    color: #4a7c8f;
    font-weight: 600;
}

/* ===== EMPTY STATE ===== */
.dataTables_empty {
    text-align: center;
    padding: 3em 1em !important;
    color: #8a9aaa;
    font-style: italic;
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    #therapeuten-table thead {
        display: none;
    }

    #therapeuten-table,
    #therapeuten-table tbody,
    #therapeuten-table tr,
    #therapeuten-table td {
        display: block;
        width: 100%;
    }

    #therapeuten-table tbody tr {
        padding: 1em;
        margin-bottom: 0.5em;
        border-radius: 6px;
        border: 1px solid #e4eaf0;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    }

    #therapeuten-table tbody td {
        padding: 0.3em 0 !important;
    }

    .dt-top, .dt-bottom {
        flex-direction: column;
        gap: 0.5em;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .site-header h1 {
        font-size: 1.5em;
    }
}
