/**
 * Certificaten – cert-style.css
 * Kopieer naar je actieve thema map: /wp-content/themes/Salient/cert-style.css
 */

/* ============================================================
   CATEGORIE KEUZE PAGINA
   ============================================================ */
.cert-categorieen-wrapper {
    width: 100%;
    padding: 40px 0px;
    font-family: inherit;
    box-sizing: border-box;
}

.cert-title {
    font-size: 2em;
    color: #1074b3;
    margin-bottom: 8px;
}

.cert-subtitle {
    color: #1074b3;
    margin-bottom: 30px;
    font-size: 1.05em;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.cert-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    background: #fff;
    border: 2px solid #d0e4ee;
    border-radius: 10px;
    text-decoration: none !important;
    color: #1074B3;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.cert-cat-card:hover {
    background: #0d75b2;
    color: #fff !important;
    border-color: #0d75b2;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(13,117,178,0.25);
    text-decoration: none !important;
}

.cert-cat-card:hover * {
    color: #fff !important;
}

.cert-cat-icon {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

/* ============================================================
   RESULTATEN PAGINA
   ============================================================ */
.cert-resultaten-wrapper {
    width: 100%;
    font-family: inherit;
}

/* Header zoekbalk */
.cert-header {
    background: #0d75b2;
    border-radius: 10px 10px 0px 0px;
    padding: 40px 40px 35px;
    color: #fff;
}

.cert-search-title {
    color: #fff;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 700;
}

.cert-search-title em {
    font-style: normal;
    color: #ffffff;
}

.cert-search-bar {
    display: flex;
    width: 100%;
}

.cert-search-bar input,
.cert-search-bar input[type="text"],
.cert-search-bar input:focus {
    all: unset;
    display: block;
    flex: 1;
    box-sizing: border-box;
    padding: 14px 18px;
    font-size: 1em;
    font-family: inherit;
    line-height: 1.4;
    background: #ffffff !important;
    color: #0d75b2 !important;
    border: none !important;
    border-radius: 4px 0 0 4px !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.cert-search-bar input::placeholder {
    color: #1a6a8a;
    opacity: 1;
    transition: opacity 0.2s;
}
.cert-search-bar input::-webkit-input-placeholder { color: #1a6a8a; }
.cert-search-bar input::-moz-placeholder { color: #1a6a8a; opacity: 1; }
.cert-search-bar input:-ms-input-placeholder { color: #1a6a8a; }

.cert-search-bar input:focus::placeholder { opacity: 0; }
.cert-search-bar input:focus::-webkit-input-placeholder { opacity: 0; }
.cert-search-bar input:focus::-moz-placeholder { opacity: 0; }
.cert-search-bar input:focus:-ms-input-placeholder { color: transparent; }

.cert-search-bar button,
.cert-search-bar button:not([class]),
.cert-resultaten-wrapper .cert-search-bar button {
    all: unset !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px 20px !important;
    background: #5bb6e8 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 10px 10px 0 !important;
    cursor: pointer !important;
    font-size: 1.1em !important;
    line-height: 1 !important;
    transition: background 0.2s !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.cert-resultaten-wrapper .cert-search-bar button:hover {
    background: #ffffff !important;
    color: #0d75b2 !important;
}

.cert-resultaten-wrapper .cert-search-bar button:hover::before {
    background: #0d75b2 !important;
}

/* Vergrootglas icoon – simpel wit SVG */
.cert-search-bar button::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background: #ffffff;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6' stroke='white' stroke-width='2.5' fill='none'/%3E%3Cline x1='14.5' y1='14.5' x2='20' y2='20' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10' cy='10' r='6' stroke='white' stroke-width='2.5' fill='none'/%3E%3Cline x1='14.5' y1='14.5' x2='20' y2='20' stroke='white' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Content layout */
.cert-content {
    display: flex;
    gap: 0;
    align-items: flex-start;
    background: #e0e7e7;
    min-height: 500px;
    border-radius: 0px 0px 10px 10px;
}

/* Sidebar */
.cert-sidebar {
    width: 33%;
    min-width: 280px;
    padding: 30px 25px;
    background: #e0e7e7;
    border-right: 1px solid #d0e4ee;
    border-bottom: 1px solid #0d75b240;
}

.cert-sidebar h3 {
    color: #1a6a8a;
    font-size: 1.2em;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: none;
}

.cert-back-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9em;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #0d75b2;
    border-radius: 10px;
    font-weight: 800;
}

.cert-back-link:hover {
    text-decoration: none;
    background-color: #ffffff;
    color: #0d75b2;
}

.cert-filter-group {
    margin-bottom: 16px;
}

.cert-filter-group label {
    display: block;
    color: #0d75b2;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 5px;
}

.cert-filter-group input[type="text"],
.cert-filter-group input[type="number"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c8dde8;
    border-radius: 4px;
    font-size: 0.9em;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.cert-filter-group input:focus {
    border-color: #1a6a8a;
}

.cert-range {
    display: flex;
    gap: 8px;
}

.cert-range input {
    flex: 1;
}

.cert-sort-group {
    margin-top: 25px;
}

.cert-sort-group h4 {
    color: #1a6a8a;
    font-size: 1em;
    margin-bottom: 10px;
}

.cert-sort-group ul {
    list-style: disc;
    padding-left: 18px;
    margin: 0;
}

.cert-sort-group li {
    margin-bottom: 6px;
}

.cert-sort {
    color: #1a6a8a;
    text-decoration: none;
    font-size: 0.9em;
    cursor: pointer;
}

.cert-sort:hover {
    text-decoration: underline;
}

.cert-sort.active {
    font-weight: 700;
}

.cert-sort.asc::after {
    content: ' ↑';
}

.cert-sort.desc::after {
    content: ' ↓';
}

/* Resultaten */
.cert-results {
    flex: 1;
    padding: 25px 30px;
}

.cert-count {
    color: #0d75b2;
    font-size: 1.1em;
}

.cert-item {
    background: #fff;
    border-radius: 6px;
    padding: 20px 25px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    border-left: 4px solid #1a6a8a;
    transition: box-shadow 0.2s;
}

.cert-item:hover {
    box-shadow: 0 4px 14px rgba(26,106,138,0.12);
}

.cert-item-titel {
    color: #1a6a8a;
    font-size: 1.1em;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.cert-item-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cert-field {
    margin: 4px 0;
    font-size: 0.9em;
    color: #444;
}

.cert-label {
    color: #00314e;
    font-weight: 300;
    min-width: 140px;
}

.cert-field strong {
    color: #0d75b2;
    font-weight: 400;
}

.cert-field a {
    color: #1a6a8a;
    word-break: break-all;
}

.cert-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.1em;
}

.cert-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #d0e4ee;
    border-top-color: #1a6a8a;
    border-radius: 50%;
    animation: cert-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes cert-spin {
    to { transform: rotate(360deg); }
}

.cert-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 1.1em;
    background: #fff;
    border-radius: 6px;
}

.cert-error {
    text-align: center;
    padding: 40px 20px;
    color: #c0392b;
    background: #fff5f5;
    border-radius: 6px;
    border: 1px solid #f0c0c0;
}

/* Responsive */
@media (max-width: 768px) {
    .cert-content {
        flex-direction: column;
        border-radius: 0px 0px 10px 10px;
}

    .cert-search-title {
        font-size: 1.4em;
    }

    .cert-sidebar {
        width: 100%;
        min-width: unset;
        border-right: none;
        border-bottom: 1px solid #0d75b28f;
    }

    .cert-item-grid {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .cert-cat-card {
        font-size: 0.75em;
    }

    .cert-header {
        padding: 25px 20px;
    }

    .cert-results {
        padding: 20px 15px;
    }
}

/* ============================================================
   NEDERLAND KAART FILTER
   ============================================================ */
.cert-map-filter {
    margin-top: 20px;
}

.cert-map-title {
    color: #1a6a8a;
    font-size: 1em;
    margin-bottom: 10px;
    font-weight: 600;
}

#cert-nl-map-wrapper {
    width: 100%;
    background: #e0e7e7;
    border-radius: 8px;
    padding: 8px;
    box-sizing: border-box;
}

#cert-nl-map {
    display: block;
    width: 100%;
    height: auto;
}

.cert-province {
    fill: #ffffff;
    stroke: #b0d8ee;
    stroke-width: 1.5;
    cursor: pointer;
    transition: fill 0.15s, stroke 0.15s;
}

.cert-province:hover {
    fill: #5bb6e8;
    stroke: #5bb6e8;
}

.cert-province.active {
    fill: #0d75b2;
    stroke: #0d75b2;
}

.cert-province.active:hover {
    fill: #0d75b2;
    stroke: #0d75b2;
}

.cert-map-reset {
    margin-top: 6px;
    font-size: 0.85em;
}

.cert-map-reset a {
    color: #e74c3c;
    text-decoration: none;
}

.cert-map-reset a:hover {
    text-decoration: underline;
}

/* ============================================================
   MOBIEL INKLAPBAAR FILTER
   ============================================================ */
.cert-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
}

.cert-sidebar-header h3 {
    margin: 0;
}

.cert-sidebar-arrow {
    display: none;
    transition: transform 0.25s;
    color: #1a6a8a;
    flex-shrink: 0;
    margin-bottom: 17px;
    line-height: 1;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.cert-sidebar-body {
    display: block;
}

@media (max-width: 768px) {
    .cert-sidebar-header {
        cursor: pointer;
        padding: 4px 0;
    }

    .cert-sidebar-arrow {
        display: inline-flex;
        align-items: center;
    }

    .cert-sidebar-body {
        display: none;
        overflow: hidden;
    }

    .cert-sidebar-body.open {
        display: block;
    }

    .cert-sidebar-arrow.open {
        opacity: 0.5;
    }
}

/* Laat meer zien button */
#cert-load-more {
    text-align: center;
    padding: 24px 0 12px;
    width: 100%;
}

#cert-load-more-btn {
    background: #0d75b2;
    color: #fff;
    border: none;
    padding: 18px 28px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'ubuntu';
    font-weight: 500;
    border-radius: 10px !important;
    width: 100%;
}

#cert-load-more-btn:hover {
    background: #5bb6e8;
    color: #fff;
}

/* Criteria full-width onder de 2 kolommen */
.cert-item-criteria {
    padding: 0px 0px 10px;
}

.cert-item-criteria .cert-field {
    margin: 0;
}

/* WebScope boven de titel */
.cert-item-scope {
    font-size: 1em;
    color: #1a6a8a;
    margin: 0px;
    font-style: normal;
    border-bottom: 1px solid #1a6a8a;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
