/*
 * Custom lightweight CSS framework to style the job aggregator without
 * relying on external CDNs. The classes defined here mimic a subset
 * of Bootstrap's layout and component system for basic typography,
 * navigation bars, cards, alerts, tables and forms. Keeping these
 * definitions local ensures the design renders even when external
 * resources are blocked.
 */

/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.5;
}

a {
    color: #0d6efd;
    text-decoration: underline;
}

a:hover {
    color: #0a58ca;
    text-decoration: none;
}

/* Container */
.container {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
}

/* Grid system */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.33333%;
        max-width: 33.33333%;
    }
}

/* Navbar */
.navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background-color: #343a40;
}

.navbar a {
    color: #f8f9fa;
    margin-right: 1rem;
    text-decoration: none;
}

.navbar a:last-child {
    margin-right: 0;
}

/* Nav list */
.nav-item {
    list-style: none;
}
.nav-link {
    color: #f8f9fa;
    margin-right: 1rem;
    text-decoration: none;
    display: inline-block;
}
.nav-link:hover {
    text-decoration: underline;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-toggler {
    display: none;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    background-color: transparent;
    border: none;
    color: #f8f9fa;
}

@media (max-width: 991.98px) {
    .navbar-nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    .navbar-toggler {
        display: block;
    }
    /* Zeigt das Menü an, wenn JavaScript die Klasse .show hinzufügt */
    .navbar-nav.show {
        display: flex;
    }
}

/* Cards */
.card {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Spezielle Klasse für Jobkarten */
.job-card {
    min-height: 100%;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}
.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}
.card-body {
    padding: 1.5rem;
}
.card-title {
    color: #0d6efd;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-text {
    flex-grow: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    text-decoration: none;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #565e64;
    border-color: #51585e;
}

/* Paywall overlay */
.paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.paywall-content {
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    text-align: center;
}

.paywall-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}
.paywall-content ul {
    text-align: left;
    margin: 0 0 1rem 0;
    padding-left: 1.25rem;
    list-style-type: disc;
}
.close-paywall {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
}

/* Filter drawer for mobile */
.filter-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1040;
    background-color: #0d6efd;
    color: #fff;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.filter-drawer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 80vh;
    background: #fff;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 1045;
    padding: 1rem;
}
.filter-drawer.open {
    transform: translateY(0);
}

@media (min-width: 768px) {
    /* Show inline filters on larger screens, hide mobile toggle */
    .filter-toggle {
        display: none;
    }
    .filter-drawer {
        display: none;
    }
    .filters-inline {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .filters-inline select {
        flex: 1 1 auto;
    }
}

@media (max-width: 767.98px) {
    /* Hide inline filters on small screens */
    .filters-inline {
        display: none;
    }
}

/* Alerts */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.table-light {
    background-color: #f8f9fa;
}

.display-6 {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.2;
}

.align-middle th,
.align-middle td {
    vertical-align: middle;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Form checkboxes and radios */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.form-check-input {
    margin-right: 0.5rem;
}
.form-check-label {
    margin: 0;
}

textarea {
    min-height: 200px;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Table */
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Flex utility */
.justify-content-center {
    justify-content: center !important;
}

/* Container fluid */
.container-fluid {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-success {
    color: #fff;
    background-color: #198754;
}

.badge-secondary {
    color: #fff;
    background-color: #6c757d;
}

.bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Margin & Text Utility Klassen (minimaler Bootstrap‑Ersatz) */
.mt-4 {
    margin-top: 2rem !important;
}
.text-center {
    text-align: center !important;
}

/* Suchformular */
.search-form {
    display: flex;
    /* Erlaube Zeilenumbruch, damit lange Filterlisten nicht den Bildschirm sprengen */
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}
.search-form button {
    white-space: nowrap;
}

/* Filter‑Selects im Suchformular */
.search-form select {
    padding: 0.375rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    flex: 1 1 150px;
    min-width: 120px;
}

/* Multi‑Select scrollbar, damit es nicht zu hoch wird */
.search-form select[multiple] {
    height: 6rem;
    overflow-y: auto;
}

/* Tag‑Badges in der Jobliste */
.tag-badge {
    display: inline-block;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.2;
    color: #0a58ca;
    background-color: #e7f1ff;
    border-radius: 0.375rem;
}

/* Hero‑Section */
.hero {
    /* Korrigierter Pfad: Die Datei hero.png liegt im selben Verzeichnis wie diese CSS‑Datei. */
    background-image: url('hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 4rem 1rem;
    text-align: center;
    border-radius: 0 0 0.75rem 0.75rem;
    /* Halbtransparente Überlagerung, damit die weiße Schrift vor dem Bild lesbar bleibt */
    background-color: rgba(0,0,0,0.55);
    background-blend-mode: overlay;
}
.hero h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.hero p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.hero .btn {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: #212529;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}
.hero .btn:hover {
    background-color: #0bb3d9;
    border-color: #0bb3d9;
    color: #212529;
}

/* Feature‑Abschnitt für Premium‑Vorteile */
.features {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.feature {
    flex: 1 1 250px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    text-align: center;
}
.feature img {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
}
.feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.feature p {
    font-size: 1rem;
    color: #6c757d;
}

.link-danger {
    color: #dc3545 !important;
}

.link-danger:hover {
    color: #bb2d3b !important;
    text-decoration: underline;
}

/* Card sections */
.card-header {
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.card-body {
    flex: 1 1 auto;
}

/* Utility classes (subset of Bootstrap) */
.text-white {
    color: #f8f9fa !important;
}

.text-muted {
    color: #6c757d !important;
}

.bg-primary {
    background-color: #0d6efd !important;
    color: #f8f9fa !important;
}

.bg-dark {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
}

.bg-secondary {
    background-color: #6c757d !important;
    color: #f8f9fa !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-auto { margin-top: auto !important; }

.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-2 { margin-top: 0.5rem !important; }

.w-100 { width: 100% !important; }

.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }

/* Gap utility */
.g-4 {
    gap: 1.5rem;
}

/* Margin utilities */
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }

.alert-link {
    font-weight: 700;
    color: inherit;
    text-decoration: underline;
}

.alert-link:hover {
    text-decoration: none;
}

.alert-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .col-md-8 {
        flex: 0 0 66.66667%;
        max-width: 66.66667%;
    }
}

@media (min-width: 992px) {
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.h-100 { height: 100% !important; }

.row-cols-1 > * {
    flex: 0 0 100%;
    max-width: 100%;
}

.row-cols-md-2 > * {
    flex: 0 0 50%;
    max-width: 50%;
}

.row-cols-lg-3 > * {
    flex: 0 0 33.33333%;
    max-width: 33.33333%;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .col-lg-5 {
        flex: 0 0 41.66667%;
        max-width: 41.66667%;
    }
}

/* Cookie banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(33, 37, 41, 0.95);
    color: #f8f9fa;
    padding: 1rem;
    box-shadow: 0 -0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

#cookie-banner .cookie-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

#cookie-banner p {
    margin: 0;
    margin-right: 1rem;
    flex: 1 0 auto;
}

#cookie-banner button {
    margin-top: 0.5rem;
}
/* Zusätzliche Utility-Klassen */
.gap-2 { gap: 0.5rem; }
.d-flex { display: flex !important; }
.flex-grow-1 { flex-grow: 1 !important; }

.btn-outline-secondary {
    color: #6c757d;
    background-color: transparent;
    border-color: #6c757d;
}
.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}
.btn-warning {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}
.btn-warning:hover {
    color: #212529;
    background-color: #ffca2c;
    border-color: #ffc720;
}
.btn-info {
    color: #fff;
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}
.btn-info:hover {
    color: #000;
    background-color: #31d2f2;
    border-color: #25cff2;
}
.link-danger {
    color: #dc3545;
    text-decoration: underline;
}
.link-danger:hover {
    color: #bb2d3b;
}
