/* ========================================
   Faciliteiten - Card Layout
   ======================================== */

.po-faciliteiten {
    position: relative;
    width: 100%;
    padding: 60px 0;
    background: transparent;
}

.po-faciliteiten-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    max-width: 1248px; /* sluit aan bij Avada content-breedte */
    margin: 0 auto;
    align-items: start;
}

.po-faciliteiten-sidebar {
    position: sticky;
    top: 160px;
    align-self: start;
    z-index: 10;
}

.po-faciliteiten-sidebar-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    color: #0f172a;
    margin: 0 0 24px 0;
}

.po-faciliteiten-sidebar-text {
    font-size: 18px;
    line-height: 1.6;
    color: #575754;
    margin: 0 0 32px 0;
}

.po-faciliteiten-video {
    margin-top: 8px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    background: #000000;
}

.po-faciliteiten-video video {
    display: block;
    width: 100%;
    height: auto;
}

.po-faciliteiten-sidebar-button {
    display: inline-block;
    padding: 14px 32px;
    background: #575853;
    color: #ffffff;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.po-faciliteiten-sidebar-button:hover {
    background: #3d3d3a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(87, 88, 83, 0.3);
    color: #ffffff;
}

.po-faciliteiten-grid-wrapper {
    position: relative;
}

.po-faciliteiten-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.po-faciliteit-card {
    position: relative;
    display: block;
    width: 100%;
    /* verhouding uit Figma: 392.67 x 276 */
    aspect-ratio: 392.67 / 276;
    /* rechtsonder geen radius, zodat button strak aansluit */
    border-radius: 15px 15px 0 15px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
}

.po-faciliteit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

.po-faciliteit-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.po-faciliteit-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.po-faciliteit-card:hover .po-faciliteit-image {
    transform: scale(1.05);
}

.po-faciliteit-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    border-radius: 15px 15px 0 15px;
}

.po-faciliteit-content {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    padding: 0 24px;
    z-index: 2;
}

.po-faciliteit-title {
    font-family: "Albert Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 23px;
    line-height: 100%;
    letter-spacing: 0;
    color: #ffffff !important;
    margin: 0;
    transition: transform 0.3s ease;
    transform: translateY(0);
}

.po-faciliteit-subtitle {
    font-family: "Albert Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 8px 0 0 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

.po-faciliteit-readmore {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-top: 0;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
}

.po-faciliteit-readmore::after {
    content: "";
    display: inline-block;
    width: 31px;
    height: 8px;
    margin-left: 8px;
    background-image: url("/wp-content/uploads/2025/12/Arrow-1.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    vertical-align: middle;
}

.po-faciliteit-card:hover .po-faciliteit-title {
    transform: translateY(-8px);
}

.po-faciliteit-card:hover .po-faciliteit-subtitle {
    transform: translateY(-8px);
    opacity: 0.85;
}

.po-faciliteit-card:hover .po-faciliteit-readmore {
    opacity: 1;
    max-height: 40px;
    transform: translateY(0);
}

.po-faciliteit-button {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 53px;
    height: 53px;
    /* alleen de andere hoeken afgerond, rechtsonder is scherp */
    border-radius: 15px 0 0 0;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.po-faciliteit-button-icon {
    width: 18px;
    height: 36px;
    display: block;
    object-fit: contain;
    /* Icoontje wijst standaard naar beneden, draai -90 graden om naar rechts te wijzen */
    transform: rotate(-90deg);
    transition: transform 0.2s ease;
}

.po-faciliteit-card:hover .po-faciliteit-button {
    background: #E27203;
    transform: scale(1.05);
}

/* Icoontje blijft altijd naar rechts wijzen, ook bij hover */
.po-faciliteit-card:hover .po-faciliteit-button-icon {
    transform: rotate(-90deg);
}

/* Tablet breakpoint voor Faciliteiten */
@media (max-width: 1024px) {
    .po-faciliteiten {
        padding: 50px 0;
    }

    .po-faciliteiten-container {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 32px;
        max-width: 100%;
    }

    .po-faciliteiten-sidebar {
        position: relative;
        top: 0;
        z-index: auto;
        text-align: center;
    }

    .po-faciliteiten-sidebar-title {
        font-size: 40px;
        margin-bottom: 20px;
    }

    .po-faciliteiten-sidebar-text {
        font-size: 17px;
        margin-bottom: 28px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .po-faciliteiten-video {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .po-faciliteiten-sidebar-button {
        margin: 0 auto;
    }

    .po-faciliteiten-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

/* Medium tablet breakpoint */
@media (max-width: 900px) {
    .po-faciliteiten-container {
        padding: 0 24px;
    }

    .po-faciliteiten-sidebar-title {
        font-size: 36px;
    }
}

/* Responsive voor Faciliteiten - Mobiel */
@media (max-width: 768px) {
    .po-faciliteiten {
        padding: 40px 0;
    }

    .po-faciliteiten-container {
        padding: 0 20px;
        gap: 32px;
    }

    .po-faciliteiten-sidebar {
        text-align: left;
    }

    .po-faciliteiten-sidebar-title {
        font-size: 32px;
        margin-bottom: 16px;
        line-height: 1.2;
    }

    .po-faciliteiten-sidebar-text {
        font-size: 16px;
        margin-bottom: 24px;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .po-faciliteiten-video {
        margin-top: 0;
    }

    .po-faciliteiten-sidebar-button {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .po-faciliteiten-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .po-faciliteit-card {
        max-width: 100%;
        height: auto;
        aspect-ratio: 392.67 / 276;
    }

    .po-faciliteit-title {
        font-size: 16px;
    }

    .po-faciliteit-subtitle {
        font-size: 13px;
        margin-top: 6px;
        color: #fff;
    }

    .po-faciliteit-button {
        width: 44px;
        height: 44px;
        border-radius: 15px 0 0 0;
    }
}

/* Kleine mobiel */
@media (max-width: 480px) {
    .po-faciliteiten {
        padding: 32px 0;
    }

    .po-faciliteiten-container {
        padding: 0 16px;
        gap: 28px;
    }

    .po-faciliteiten-sidebar-title {
        font-size: 28px;
        margin-bottom: 14px;
    }

    .po-faciliteiten-sidebar-text {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .po-faciliteiten-sidebar-button {
        padding: 12px 24px;
        font-size: 15px;
    }

    .po-faciliteiten-grid {
        gap: 16px;
    }
}

/* ========================================
   Popup / Modal voor Faciliteiten
   ======================================== */

html.po-faciliteit-modal-open,
body.po-faciliteit-modal-open {
    overflow: hidden;
}

.po-faciliteit-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.po-faciliteit-modal.is-open {
    display: flex;
}

.po-faciliteit-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.po-faciliteit-modal-dialog {
    position: relative;
    z-index: 1;
    max-width: 640px;
    width: calc(100% - 32px);
    max-height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
    padding: 0 !important;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: visible;
    display: flex;
    flex-direction: column;
    /* Zorg dat dialog scrollbaar is als content te lang is */
    overflow-y: auto;
    overflow-x: visible;
}

.po-faciliteit-modal-content {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    overflow: visible !important;
    max-width: 100% !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    flex: 1;
    min-height: 0;
    max-height: none !important;
}

.po-faciliteit-modal-title {
    margin: 0 32px 16px 0;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 800;
    color: #0f172a;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
}

.po-faciliteit-modal--open .po-faciliteit-modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.po-faciliteit-modal-body {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #575754 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    hyphens: auto;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: 100% !important;
    /* Zorg dat volledige tekst zichtbaar is */
    display: block !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    text-overflow: unset !important;
}

/* Afbeelding in popup zonder marges rondom */
.po-faciliteit-modal-image {
    display: block;
    width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
}

.po-faciliteit-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #ffffff;
    padding: 4px;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

.po-faciliteit-modal-close:hover {
    color: #ffffff;
}

@media (max-width: 480px) {
    .po-faciliteit-modal-dialog {
        padding: 20px 20px 22px 20px;
    }

    .po-faciliteit-modal-title {
        font-size: 20px;
        margin-right: 28px;
    }

    .po-faciliteit-modal-body {
        font-size: 15px;
    }
}
