/* Main Styles */
:root {
    --cpcm-primary: #0073aa;
    --cpcm-text: #000;
    --cpcm-bg-light: #f9f9f9;
    --cpcm-border: #ddd;
}

.cpcm-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    color: var(--cpcm-text);
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
}

/* Grid System */
.cpcm-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.cpcm-col-left {
    flex: 0 0 300px;
    max-width: 300px;
}

.cpcm-col-right {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .cpcm-row {
        flex-direction: column;
    }

    .cpcm-col-left {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }
}

/* Priest Image */
.cpcm-priest-image {
    margin-bottom: 20px;
    text-align: center;
}

.cpcm-circle-img {
    border-radius: 50%;
    width: 250px;
    height: 250px;
    object-fit: cover;
    background-color: #fff;
    border: 5px solid var(--cpcm-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Dates Box */
.cpcm-dates-box {
    background: var(--cpcm-bg-light);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--cpcm-border);
}

.cpcm-dates-box p {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.cpcm-dates-box strong {
    color: var(--cpcm-primary);
    display: block;
    margin-bottom: 2px;
}

/* Content Sections */
.cpcm-section {
    margin-bottom: 30px;
}

.cpcm-section h3 {
    color: var(--cpcm-primary);
    border-bottom: 2px solid var(--cpcm-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Church Card */
.cpcm-church-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border: 1px solid var(--cpcm-border);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cpcm-church-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.cpcm-church-card a {
    font-weight: bold;
    color: var(--cpcm-primary);
    text-decoration: none;
    font-size: 1.1em;
}

/* Related Priests Grid */
.cpcm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.cpcm-card {
    background: #fff;
    border: 1px solid var(--cpcm-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s;
}

/* Main Styles */
:root {
    --cpcm-primary: #0073aa;
    --cpcm-text: #000;
    --cpcm-bg-light: #f9f9f9;
    --cpcm-border: #ddd;
}

.cpcm-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    color: var(--cpcm-text);
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
}

/* Grid System */
.cpcm-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.cpcm-col-left {
    flex: 0 0 300px;
    max-width: 300px;
}

.cpcm-col-right {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .cpcm-row {
        flex-direction: column;
    }

    .cpcm-col-left {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }
}

/* Priest Image */
.cpcm-priest-image {
    margin-bottom: 20px;
    text-align: center;
}

.cpcm-circle-img {
    border-radius: 50%;
    width: 250px;
    height: 250px;
    object-fit: cover;
    background-color: #fff;
    border: 5px solid var(--cpcm-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Dates Box */
.cpcm-dates-box {
    background: var(--cpcm-bg-light);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--cpcm-border);
}

.cpcm-dates-box p {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.cpcm-dates-box strong {
    color: var(--cpcm-primary);
    display: block;
    margin-bottom: 2px;
}

/* Content Sections */
.cpcm-section {
    margin-bottom: 30px;
}

.cpcm-section h3 {
    color: var(--cpcm-primary);
    border-bottom: 2px solid var(--cpcm-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Church Card */
.cpcm-church-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border: 1px solid var(--cpcm-border);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cpcm-church-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.cpcm-church-card a {
    font-weight: bold;
    color: var(--cpcm-primary);
    text-decoration: none;
    font-size: 1.1em;
}

/* Related Priests Grid */
.cpcm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.cpcm-card {
    background: #fff;
    border: 1px solid var(--cpcm-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s;
}

.cpcm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cpcm-card a,
.cpcm-popup-trigger {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

.cpcm-circle-thumb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid var(--cpcm-primary);
}

.cpcm-card h3 {
    font-size: 1em;
    margin: 10px 0 5px;
}

.cpcm-card span {
    display: block;
    font-weight: bold;
    color: var(--cpcm-primary);
}

/* Tabs */
.cpcm-tabs {
    margin-top: 20px;
}

.cpcm-tab-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    border-bottom: 2px solid var(--cpcm-border);
}

.cpcm-tab-nav li {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

/* Main Styles */
:root {
    --cpcm-primary: #0073aa;
    --cpcm-text: #000;
    --cpcm-bg-light: #f9f9f9;
    --cpcm-border: #ddd;
}

.cpcm-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    color: var(--cpcm-text);
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 15px;
}

/* Grid System */
.cpcm-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.cpcm-col-left {
    flex: 0 0 300px;
    max-width: 300px;
}

.cpcm-col-right {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .cpcm-row {
        flex-direction: column;
    }

    .cpcm-col-left {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }
}

/* Priest Image */
.cpcm-priest-image {
    margin-bottom: 20px;
    text-align: center;
}

.cpcm-circle-img {
    border-radius: 50%;
    width: 250px;
    height: 250px;
    object-fit: cover;
    background-color: #fff;
    border: 5px solid var(--cpcm-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Dates Box */
.cpcm-dates-box {
    background: var(--cpcm-bg-light);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--cpcm-border);
}

.cpcm-dates-box p {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.cpcm-dates-box strong {
    color: var(--cpcm-primary);
    display: block;
    margin-bottom: 2px;
}

/* Content Sections */
.cpcm-section {
    margin-bottom: 30px;
}

.cpcm-section h3 {
    color: var(--cpcm-primary);
    border-bottom: 2px solid var(--cpcm-primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Church Card */
.cpcm-church-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border: 1px solid var(--cpcm-border);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cpcm-church-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.cpcm-church-card a {
    font-weight: bold;
    color: var(--cpcm-primary);
    text-decoration: none;
    font-size: 1.1em;
}

/* Related Priests Grid */
.cpcm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.cpcm-card {
    background: #fff;
    border: 1px solid var(--cpcm-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s;
}

.cpcm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cpcm-card a,
.cpcm-popup-trigger {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

.cpcm-circle-thumb {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid var(--cpcm-primary);
}

.cpcm-card h3 {
    font-size: 1em;
    margin: 10px 0 5px;
}

.cpcm-card span {
    display: block;
    font-weight: bold;
    color: var(--cpcm-primary);
}

/* Tabs */
.cpcm-tabs {
    margin-top: 20px;
}

.cpcm-tab-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    border-bottom: 2px solid var(--cpcm-border);
}

.cpcm-tab-nav li {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.cpcm-tab-nav li.active {
    color: var(--cpcm-primary);
    border-bottom-color: var(--cpcm-primary);
}

.cpcm-tab-content {
    display: none;
}

.cpcm-tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Swiper Fix */
.swiper-container {
    width: 100%;
    height: 300px;
    margin: 20px 0;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Modal Styles */
.cpcm-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.cpcm-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: cpcmFadeIn 0.3s;
}

@keyframes cpcmFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpcm-modal-close {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    z-index: 10;
    background: #d00;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
}

.cpcm-modal-close:hover,
.cpcm-modal-close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    background: #f00;
}

.cpcm-modal-body {
    display: flex;
    flex-direction: row;
    padding: 20px;
    gap: 20px;
}

.cpcm-modal-img-container {
    flex: 0 0 250px;
    text-align: center;
}

.cpcm-modal-img-container img {
    width: 100%;
    max-width: 250px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cpcm-modal-info {
    flex: 1;
    text-align: left;
}

.rtl .cpcm-modal-info {
    text-align: right;
}

.rtl .cpcm-modal-close {
    right: auto;
    left: 15px;
}

.cpcm-modal-info h3 {
    margin-top: 0;
    color: var(--cpcm-primary);
    border-bottom: 2px solid var(--cpcm-secondary);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .cpcm-modal-body {
        flex-direction: column;
    }

    .cpcm-modal-img-container {
        flex: 0 0 auto;
    }

    .cpcm-modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Lightbox Styles */
.cpcm-lightbox {
    background-color: rgba(0, 0, 0, 0.9);
}

.cpcm-lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.cpcm-lightbox .cpcm-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    transition: 0.3s;
    background: #d00;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    opacity: 0.8;
}

.cpcm-lightbox .cpcm-modal-close:hover,
.cpcm-lightbox .cpcm-modal-close:focus {
    color: #fff;
    text-decoration: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Swiper Fix */
.swiper-container {
    width: 100%;
    height: 300px;
    margin: 20px 0;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Modal Styles */
.cpcm-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.cpcm-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: cpcmFadeIn 0.3s;
}

@keyframes cpcmFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cpcm-modal-close {
    color: #fff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    z-index: 10;
    background: #d00;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
}

.cpcm-modal-close:hover,
.cpcm-modal-close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    background: #f00;
}

.cpcm-modal-body {
    display: flex;
    flex-direction: row;
    padding: 20px;
    gap: 20px;
}

.cpcm-modal-img-container {
    flex: 0 0 250px;
    text-align: center;
}

.cpcm-modal-img-container img {
    width: 100%;
    max-width: 250px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cpcm-modal-info {
    flex: 1;
    text-align: left;
}

.rtl .cpcm-modal-info {
    text-align: right;
}

.rtl .cpcm-modal-close {
    right: auto;
    left: 15px;
}

.cpcm-modal-info h3 {
    margin-top: 0;
    color: var(--cpcm-primary);
    border-bottom: 2px solid var(--cpcm-secondary);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .cpcm-modal-body {
        flex-direction: column;
    }

    .cpcm-modal-img-container {
        flex: 0 0 auto;
    }

    .cpcm-modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* Lightbox Styles */
.cpcm-lightbox {
    background-color: rgba(0, 0, 0, 0.9);
}

.cpcm-lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.cpcm-lightbox .cpcm-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    transition: 0.3s;
    background: #d00;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    opacity: 0.8;
}

.cpcm-lightbox .cpcm-modal-close:hover,
.cpcm-lightbox .cpcm-modal-close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
    background: #f00;
}

#cpcm-lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Manager Modal Styles */
.cpcm-manager-modal {
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cpcm-manager-modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.cpcm-manager-modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    z-index: 10001;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cpcm-manager-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.cpcm-manager-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cpcm-manager-tab-nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}

.cpcm-manager-tab-nav li {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.cpcm-manager-tab-nav li.active {
    border-bottom-color: var(--cpcm-primary);
    font-weight: bold;
}

.cpcm-manager-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.cpcm-manager-tab-content.active {
    display: block;
}

.cpcm-pf-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.cpcm-pf-item {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    background: #f9f9f9;
}

.cpcm-pf-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

.cpcm-pf-name {
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.cpcm-pf-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.cpcm-pf-remove {
    background: #d00;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    cursor: pointer;
}

.cpcm-manager-footer {
    margin-top: 20px;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.cpcm-manager-trigger {
    background: var(--cpcm-primary);
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.cpcm-lightbox .cpcm-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    transition: 0.3s;
    background: #d00;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    opacity: 0.8;
}

.cpcm-lightbox .cpcm-modal-close:hover,
.cpcm-lightbox .cpcm-modal-close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
    background: #f00;
}

#cpcm-lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Manager Modal Styles */
.cpcm-manager-modal {
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cpcm-manager-modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.cpcm-manager-modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    z-index: 10001;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cpcm-manager-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.cpcm-manager-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cpcm-manager-tab-nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}

.cpcm-manager-tab-nav li {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.cpcm-manager-tab-nav li.active {
    border-bottom-color: var(--cpcm-primary);
    font-weight: bold;
}

.cpcm-manager-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.cpcm-manager-tab-content.active {
    display: block;
}

.cpcm-pf-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.cpcm-pf-item {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    background: #f9f9f9;
}

.cpcm-pf-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

.cpcm-pf-name {
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.cpcm-pf-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.cpcm-pf-remove {
    background: #d00;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    cursor: pointer;
}

.cpcm-manager-footer {
    margin-top: 20px;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.cpcm-manager-trigger {
    background: var(--cpcm-primary);
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.cpcm-lightbox .cpcm-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    transition: 0.3s;
    background: #d00;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    opacity: 0.8;
}

.cpcm-lightbox .cpcm-modal-close:hover,
.cpcm-lightbox .cpcm-modal-close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    opacity: 1;
    background: #f00;
}

#cpcm-lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Manager Modal Styles */
.cpcm-manager-modal {
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cpcm-manager-modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.cpcm-manager-modal-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    z-index: 10001;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cpcm-manager-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.cpcm-manager-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cpcm-manager-tab-nav {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}

.cpcm-manager-tab-nav li {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.cpcm-manager-tab-nav li.active {
    border-bottom-color: var(--cpcm-primary);
    font-weight: bold;
}

.cpcm-manager-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
}

.cpcm-manager-tab-content.active {
    display: block;
}

.cpcm-pf-gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.cpcm-pf-item {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    background: #f9f9f9;
}

.cpcm-pf-thumb {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

.cpcm-pf-name {
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.cpcm-pf-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.cpcm-pf-remove {
    background: #d00;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    cursor: pointer;
}

.cpcm-manager-footer {
    margin-top: 20px;
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.cpcm-manager-trigger {
    background: var(--cpcm-primary);
    margin: 30px 0;
    padding-bottom: 40px;
    /* Space for pagination */
}
/* Centering Fix */
.cpcm-grid {
    justify-content: center;
}

/* Center Person Grids */
.cpcm-grid {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Google Maps Embed Styling */
.cpcm-map-embed {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--cpcm-border);
}

.cpcm-map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
