/* Our Vision Popup */
.modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 48, 43, 0.55);
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
}

/* Popup window */
.modal-content {
    position: relative;
    background: #F5EBDD;
    width: 100%;
    max-width: 850px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 45px 50px;
    box-sizing: border-box;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

/* Close button */
.modal-content .close {
    position: absolute;
    top: 15px;
    right: 22px;
    font-size: 30px;
    line-height: 30px;
    font-weight: 300;
    color: #063B35;
    cursor: pointer;
    z-index: 10;
}

.modal-content .close:hover {
    color: #B77A2E;
}

/* Vision content */
.modal-content .target {
    width: 100%;
}

/* Mobile */
@media (max-width: 767px) {

    .modal {
        padding: 15px;
    }

    .modal-content {
        max-height: 90vh;
        padding: 35px 25px;
    }

    .modal-content .close {
        top: 10px;
        right: 15px;
        font-size: 26px;
    }
}
/* ===== OUR VISION POPUP REFINEMENT ===== */

.modal-content {
    width: 90% !important;
    max-width: 900px !important;
    max-height: 82vh !important;
    padding: 35px 45px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Clean up the transferred section */
.modal-content .target {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background-image: none !important;
    box-sizing: border-box !important;
}

/* Prevent horizontal overflow */
.modal-content .target,
.modal-content .target > div,
.modal-content .target .zpcontainer,
.modal-content .target .zprow {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Vision headings */
.modal-content .target h1,
.modal-content .target h2,
.modal-content .target h3 {
    font-size: 30px !important;
    line-height: 1.25 !important;
    margin-top: 15px !important;
    margin-bottom: 12px !important;
}

/* Vision paragraphs */
.modal-content .target p {
    font-size: 15px !important;
    line-height: 1.7 !important;
}

/* Close button */
.modal-content .close {
    top: 12px !important;
    right: 18px !important;
    font-size: 28px !important;
    color: #063B35 !important;
    cursor: pointer !important;
}

/* Mobile */
@media (max-width: 767px) {

    .modal {
        padding: 10px !important;
    }

    .modal-content {
        width: 96% !important;
        max-height: 90vh !important;
        padding: 30px 22px !important;
    }

    .modal-content .target h1,
    .modal-content .target h2,
    .modal-content .target h3 {
        font-size: 24px !important;
    }

    .modal-content .target p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}
/* ===== FINAL OUR VISION POPUP LAYOUT ===== */

.modal-content {
    width: 92% !important;
    max-width: 1000px !important;
    max-height: 82vh !important;
    padding: 35px 55px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Make the transferred vision row use the full popup width */
.modal-content .target {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Remove unnecessary spacing inherited from the original page */
.modal-content .target .zprow {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* Vision headings */
.modal-content .target h1,
.modal-content .target h2,
.modal-content .target h3 {
    font-size: 28px !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
}

/* Vision body text */
.modal-content .target p {
    font-size: 15px !important;
    line-height: 1.7 !important;
}

/* Keep the italic subtitle compact */
.modal-content .target p em,
.modal-content .target em {
    font-size: 15px !important;
}

/* Close button */
.modal-content .close {
    top: 12px !important;
    right: 18px !important;
    font-size: 27px !important;
}

/* Mobile */
@media (max-width: 767px) {

    .modal {
        padding: 10px !important;
    }

    .modal-content {
        width: 96% !important;
        max-height: 90vh !important;
        padding: 30px 22px !important;
    }

    .modal-content .target h1,
    .modal-content .target h2,
    .modal-content .target h3 {
        font-size: 23px !important;
    }

    .modal-content .target p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}
/* ===== OUR VISION - COMPACT READING PANEL ===== */

.modal-content .target h1,
.modal-content .target h2,
.modal-content .target h3 {
    font-size: 25px !important;
    line-height: 1.25 !important;
    margin-top: 10px !important;
    margin-bottom: 8px !important;
}

/* Reduce the large gaps between vision sections */
.modal-content .target p {
    font-size: 14px !important;
    line-height: 1.65 !important;
    margin-top: 5px !important;
    margin-bottom: 18px !important;
}

/* Reduce spacing created by the original page layout */
.modal-content .target .zprow {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Make the popup content use more horizontal space */
.modal-content {
    padding-left: 45px !important;
    padding-right: 45px !important;
}

/* Mobile */
@media (max-width: 767px) {

    .modal-content {
        padding-left: 25px !important;
        padding-right: 25px !important;
    }

    .modal-content .target h1,
    .modal-content .target h2,
    .modal-content .target h3 {
        font-size: 22px !important;
    }

    .modal-content .target p {
        font-size: 14px !important;
    }
}


/* =========================================
   LIVING ABROAD EXPANDABLE CONTENT
   ========================================= */

/* Keep images responsive */
.living-abroad-popup img {
    max-width: 100%;
    height: auto;
}

/* Mobile spacing only */
@media (max-width: 767px) {

    .living-abroad-popup {
        width: 94% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

}

.journal-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.journal-popup.active {
    display: block;
}

.journal-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.journal-popup-box {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    overflow-y: auto;
    margin: 7vh auto;
    padding: 40px;
    background: #f5f1e8;
    box-sizing: border-box;
}

.journal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    border: none;
    background: none;
    font-size: 35px;
    cursor: pointer;
}

.journal-popup-header {
    text-align: center;
    margin-bottom: 35px;
}

.journal-popup-header h2 {
    font-size: 32px;
}

.journal-cards {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.journal-card {
    flex: 1;
    background: white;
    min-width: 0;
}

.journal-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.journal-card-content {
    padding: 20px;
}

.journal-card h3 {
    font-size: 22px;
}

.journal-card button,
.journal-back {
    padding: 12px 20px;
    border: none;
    background: #173f3a;
    color: white;
    cursor: pointer;
}

@media (max-width: 768px) {

    .journal-popup-box {
        width: 95%;
        padding: 25px;
        margin: 5vh auto;
    }

    .journal-cards {
        flex-direction: column;
    }

}