/**
 * Frontend CSS für LohiBW Beratungsstellen
 * Datei: assets/css/frontend.css
 */

/* ===================================
   Allgemeine Styles
   =================================== */

.lohibw-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* E-Mail Schutz */
.lohibw-email {
    display: inline-block;
}

.lohibw-email a {
    color: #007cba;
    text-decoration: none;
}

.lohibw-email a:hover {
    text-decoration: underline;
}

/* ===================================
   Beratungsstellen Tabelle
   =================================== */

.beratungsstellen-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.beratungsstellen-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.beratungsstellen-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    margin-top: 10px;
    margin-bottom: 20px;
    border-radius: 2px;
}

.beratungsstellen-description {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 900px;
}

/* Suchfeld */
.beratungsstellen-search {
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.beratungsstellen-search label {
    font-weight: 600;
    color: #333;
}

.beratungsstellen-search input {
    padding: 10px 15px;
    border: 2px solid #ddd;
    font-size: 14px;
    width: 250px;
    background-color: #FFFACD;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.beratungsstellen-search input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
    background-color: #fff;
}

/* Tabelle */
.beratungsstellen-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    font-size: 14px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.beratungsstellen-table thead {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.beratungsstellen-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #FFD700;
    position: relative;
}

.beratungsstellen-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.beratungsstellen-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.beratungsstellen-table tbody tr:last-child {
    border-bottom: none;
}

.beratungsstellen-table td {
    padding: 14px 15px;
    vertical-align: middle;
    color: #333;
}

.beratungsstellen-table .ort-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.beratungsstellen-table .ort-link:hover {
    color: #FFA500;
    text-decoration: underline;
}

.beratungsstellen-table a {
    color: #007cba;
    text-decoration: none;
    transition: color 0.2s ease;
}

.beratungsstellen-table a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Spaltenbreiten */
.beratungsstellen-table .col-plz { width: 10%; }
.beratungsstellen-table .col-ort { width: 22%; font-weight: 500; }
.beratungsstellen-table .col-strasse { width: 28%; }
.beratungsstellen-table .col-tel { width: 18%; }
.beratungsstellen-table .col-website { width: 22%; }

/* No Results */
.no-results-row td {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
    background: #f8f9fa;
}

/* ===================================
   Einzelansicht Beratungsstelle
   =================================== */

.beratungsstelle-info-box {
    background: #f8f9fa;
    border-left: 4px solid #FFD700;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
}

.beratungsstelle-info-box h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
}

.beratungsstelle-info-box dl {
    margin: 0;
}

.beratungsstelle-info-box dt {
    font-weight: 600;
    color: #666;
    float: left;
    width: 120px;
    clear: left;
    margin-bottom: 10px;
}

.beratungsstelle-info-box dd {
    margin-left: 130px;
    margin-bottom: 10px;
}

/* ===================================
   Divi 5 Anpassungen
   =================================== */

/* Divi Builder Kompatibilität */
.et-db #et-boc .lohibw-container {
    width: 100%;
    max-width: 100%;
}

.et_pb_section .beratungsstellen-container {
    padding: 0;
}

/* Divi 5 Theme Builder */
.et-l--header + .lohibw-container {
    margin-top: 20px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .et_pb_section_dark .beratungsstellen-table {
        background: #2b2b2b;
        color: #fff;
    }
    
    .et_pb_section_dark .beratungsstellen-table th {
        background: #1a1a1a;
        color: #fff;
    }
    
    .et_pb_section_dark .beratungsstellen-table td {
        color: #e0e0e0;
        border-color: #444;
    }
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 980px) {
    .beratungsstellen-table {
        font-size: 13px;
    }
    
    .beratungsstellen-table th,
    .beratungsstellen-table td {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .beratungsstellen-container {
        padding: 15px;
    }
    
    .beratungsstellen-title {
        font-size: 24px;
    }
    
    .beratungsstellen-search {
        flex-direction: column;
        align-items: stretch;
    }
    
    .beratungsstellen-search input {
        width: 100%;
    }
    
    /* Tabelle horizontal scrollbar */
    .beratungsstellen-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .beratungsstellen-table {
        min-width: 600px;
    }
}

@media (max-width: 479px) {
    .beratungsstellen-table {
        font-size: 12px;
    }
    
    .beratungsstellen-table th,
    .beratungsstellen-table td {
        padding: 8px 5px;
    }
}