/* =========================================================
OBITUARY CARD WRAPPER
========================================================= */

.cad-obituary-item {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* =========================================================
FRAME WRAPPER
========================================================= */

.image-wrapper {
    width: 320px;
    height: 320px;
    margin: 0 auto -55px;
    position: relative;
    z-index: 2;
    /* DYNAMIC FRAME SUPPORT */
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* =========================================================
PROFILE IMAGE INSIDE FRAME
========================================================= */

/* FRAME IMAGE */

.frame-image {

    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    transform: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 1;
}

/* PROFILE IMAGE */
/* =========================================================
PROFILE IMAGE BASE
========================================================= */

.profile-image {

    position: absolute;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* =========================================================
FRAME 1 - RECTANGLE
========================================================= */

.profile-image.frame1 {

    width: 150px !important;
    height: 190px !important;
    border-radius: 8px;
    border: 4px solid #fff;
}

/* =========================================================
FRAME 2 - CIRCLE
========================================================= */

.profile-image.frame2 {

    width: 150px !important;
    height: 195px !important;
    border-radius: 8px;
    border: 4px solid #fff;
     transform: translate(-56%, -48%);
}

/* =========================================================
FRAME 3 - HEXAGON
========================================================= */

.profile-image.frame3 {

    width: 187px !important;
    height: 225px !important;
    position: absolute;
    top: 56%;
    left: 52%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center top;
    clip-path: polygon(
        25% 4%,
        75% 4%,
        100% 50%,
        75% 96%,
        25% 96%,
        0% 50%
    );
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 2;
}
/* ========================================================
FRAME 3 WRAPPER FIX
========================================================= */

.image-wrapper.frame3 {

    width: 320px;
    height: 320px;
    position: relative;
}
/* =========================================================
NO IMAGE PLACEHOLDER
========================================================= */

.no-image-placeholder {

    width: 178px;
    height: 178px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-size: 14px;
    border: 2px dashed #ddd;
}

/* =========================================================
CONTENT CARD
========================================================= */

.cad-content-card {

    background: #ffffff;
    padding: 75px 25px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    z-index: 1;
    position: relative;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    flex-grow: 1;
}
/* HOVER EFFECT */
.cad-obituary-item:hover .cad-content-card {

    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.10);
}

/* =========================================================
TITLE
========================================================= */

.cad-title {

    font-size: 24px !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.cad-title:hover {

    color: #003366 !important;
}

/* =========================================================
YEARS
========================================================= */

.cad-years {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
}

.year-label {
    font-weight: 700;
    color: #d90429;
    font-size: 14px;
    text-transform: uppercase;
}

/* =========================================================
EXCERPT
========================================================= */

.cad-excerpt {

    font-size: 15px;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.5;
}
/* =========================================================
LOCATION
========================================================= */
.location-text {

    font-size: 14px;
    font-weight: 700;
    color: #003366;
    margin-bottom: 4px;
    text-transform: capitalize;
}
/* =========================================================
DATE
========================================================= */

.date-text {
    font-size: 14px;
    color: #d90429;
    font-weight: 600;
}

/* =========================================================
PAGINATION
========================================================= */

.cad-pagination {

    margin-top: 30px;
}

.cad-pagination .page-numbers {

    padding: 10px 20px;
    margin: 0 5px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: #003366;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cad-pagination .page-numbers.current {

    background: #003366;
    color: #fff;
    border-color: #003366;
}

.cad-pagination .page-numbers:hover:not(.current) {

    background: #f8f9fa;
    border-color: #003366;
}

/* =========================================================
ROW FIX
========================================================= */

.row {

    display: flex;
    flex-wrap: wrap;
}

/* =========================================================
FRAME SELECTION UI
========================================================= */

.cad-frame-selection {

    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.cad-frame-option {

    position: relative;
    cursor: pointer;
}

.cad-frame-option input {

    display: none;
}

.cad-frame-option img {

    width: 140px;
    border-radius: 14px;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #fff;
    padding: 5px;
}

.cad-frame-option:hover img {

    transform: scale(1.03);
}

.cad-frame-option input:checked + img {

    border-color: #d90429;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(217,4,41,0.25);
}

/* =========================================
SELECT2 CUSTOM STYLE
========================================= */

.select2-container--default .select2-selection--multiple {

    border: 1px solid #dcdcdc !important;

    border-radius: 10px !important;

    min-height: 48px !important;

    padding: 5px !important;

    background: #fff !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {

    background: #003366 !important;

    border: none !important;

    color: #fff !important;

    padding: 4px 10px !important;

    border-radius: 30px !important;

    font-size: 13px !important;
}

.select2-container--default .select2-results__option--highlighted {

    background: #003366 !important;
}
/* =========================================================
MOBILE RESPONSIVE
========================================================= */

@media (max-width: 768px) {

    /* CARD SPACING */

    .cad-obituary-item {

        margin-bottom: 35px;
    }

    /* FRAME WRAPPER */

    .image-wrapper {

        width: 240px;
        height: 240px;
        margin: 0 auto -45px;
    }

    /* FRAME IMAGE */

    .frame-image {

        width: 100% !important;
        height: 100% !important;

        object-fit: contain;
    }

    /* PROFILE IMAGE */

  /* MOBILE FRAME 1 */

.profile-image.frame1 {

    width: 125px !important;
    height: 155px !important;
}

/* MOBILE FRAME 2 */

.profile-image.frame2 {

    width: 130px !important;
    height: 130px !important;
}

/* MOBILE FRAME 3 */

.profile-image.frame3 {

    width: 125px !important;
    height: 145px !important;
}

    /* CONTENT CARD */

    .cad-content-card {

        padding: 65px 18px 18px;
    }

    /* TITLE */

    .cad-title {

        font-size: 20px !important;
    }

    /* YEARS */

    .cad-years {

        font-size: 14px;
    }

    .year-label {

        font-size: 13px;
    }

    /* EXCERPT */

    .cad-excerpt {

        font-size: 14px;
    }

    /* LOCATION + DATE */

    .location-text,
    .date-text {

        font-size: 13px;
    }

    /* FRAME SELECTION */

    .cad-frame-selection {

        justify-content: center;

        gap: 12px;
    }

    .cad-frame-option img {

        width: 85px;
    }
}