/* Priest Directory Specific Styles */

.search-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: #8B0000;
}

.filter-select {
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background: white;
    cursor: pointer;
}

.priests-grid,
#priestsGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 30px;
    padding: 0 10px;
}

.priest-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.priest-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.priest-image {
    width: 100%;
    height: 350px;
    min-height: 350px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
    position: relative;
}

.priest-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    max-width: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.priest-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.priest-name {
    font-size: 16px;
    font-weight: 600;
    color: #8B0000;
    margin-bottom: 5px;
    line-height: 1.3;
    text-align: center;
}

.priest-house {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.3;
}

.priest-designation {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
}

.priest-diocese {
    font-size: 13px;
    color: #444;
    margin-bottom: 5px;
}

.priest-contact {
    font-size: 12px;
    color: #555;
    margin: 3px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.priest-contact span {
    flex-shrink: 0;
}

.priest-age {
    font-size: 12px;
    color: #888;
}

.results-info {
    padding: 15px 0;
    font-size: 16px;
    color: #666;
    text-align: center;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #666;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 15px;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #8B0000 0%, #a00000 100%);
    color: white;
    padding: 25px;
    border-radius: 15px 15px 0 0;
}

.modal-close {
    color: white;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 30px;
}

.modal-priest-image {
    text-align: center;
    margin-bottom: 25px;
}

.modal-priest-image img {
    max-width: 250px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.detail-section h4 {
    color: #8B0000;
    font-size: 16px;
    margin-bottom: 10px;
    border-bottom: 2px solid #8B0000;
    padding-bottom: 5px;
}

.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-label {
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.detail-value {
    color: #666;
}

.priest-card.deceased .priest-image img {
    filter: grayscale(100%);
}

.priest-card.deceased .priest-info {
    background-color: #f9f9f9;
}

@media (max-width: 1400px) {

    .priests-grid,
    #priestsGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 1000px) {

    .priests-grid,
    #priestsGrid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .priest-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    header {
        position: relative !important;
    }

    .search-box {
        flex-direction: column;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 600px) {

    .priests-grid,
    #priestsGrid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .priest-image {
        height: 400px;
        min-height: 400px;
    }

    .priest-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
        display: block;
        max-width: 100%;
    }
}