/* STARTS OF MINISTRIES PAGE */
.ministries-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.ministries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.ministry-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    display: flex;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer; /* Add pointer cursor to indicate clickable */
    position: relative; /* For better click handling */
}

.ministry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); /* Enhanced shadow on hover */
}

.ministry-card a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Ensure link covers entire card */
    opacity: 0; /* Make invisible but still clickable */
}

.ministry-icon {
    background: #2c3e50;
    color: white;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative; /* Ensure it stays above the invisible link */
    z-index: 2;
}

.ministry-content {
    padding: 25px;
    flex-grow: 1;
    position: relative; /* Ensure content stays above the invisible link */
    z-index: 2;
}

.ministry-content h2 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.ministry-details {
    margin: 20px 0;
}

.ministry-details p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    color: #555;
}

.ministry-details i {
    margin-right: 10px;
    color: #e74c3c;
    width: 20px;
    text-align: center;
}

.learn-more-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
    position: relative; /* Ensure button stays above the invisible link */
    z-index: 3;
}

.learn-more-btn:hover {
    background: #34495e;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .ministries-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ministry-card {
        flex-direction: column;
    }
    
    .ministry-icon {
        min-width: 100%;
        padding: 15px 0;
    }
    
    .ministry-content {
        padding: 20px;
    }
}

/* Active state for better click feedback */
.ministry-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
/* Font Awesome Icons */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');
/* End of Ministries Page Styles */




/* ===== CATHEDRAL FAMILY CHURCHES SECTION ===== */
.family-churches-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    padding: 60px 30px;
    border-radius: var(--border-radius);
    margin: 50px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.family-churches-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-green), var(--accent-blue));
}

.family-churches-section .section-header {
    margin-bottom: 40px;
}

.family-churches-section .section-header h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-bottom: 15px;
}

.family-churches-section .section-header h2 i {
    color: var(--accent-orange);
    margin-right: 12px;
}

.family-churches-section .subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Churches Grid */
.churches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.church-card {
    background: var(--bg-lighter);
    padding: 35px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--accent-orange);
    position: relative;
    text-align: center;
}

.church-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.church-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-red) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.church-card:hover .church-icon {
    transform: scale(1.1);
}

.church-icon i {
    font-size: 1.8rem;
    color: white;
}

.church-card h3 {
    color: var(--primary-dark);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.church-card p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.church-link {
    display: inline-block;
    background: transparent;
    color: var(--accent-orange);
    padding: 10px 20px;
    border: 2px solid var(--accent-orange);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.church-link:hover {
    background: var(--accent-orange);
    color: white;
    transform: translateY(-2px);
}

/* ===== MINISTRY CARD UPDATES ===== */
.ministry-card .learn-more-btn {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--accent-orange);
    margin-top: 15px;
}

.ministry-card .learn-more-btn:hover {
    background: transparent;
    color: var(--accent-orange);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 768px) {
    .family-churches-section {
        padding: 50px 20px;
        margin: 40px 0;
    }
    
    .family-churches-section .section-header h2 {
        font-size: 1.7rem;
    }
    
    .churches-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }
    
    .church-card {
        padding: 30px 20px;
    }
    
    .church-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .church-icon i {
        font-size: 1.5rem;
    }
    
    .church-card h3 {
        font-size: 1.2rem;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .family-churches-section {
        padding: 40px 15px;
        margin: 30px 0;
    }
    
    .family-churches-section .section-header h2 {
        font-size: 1.5rem;
    }
    
    .family-churches-section .subtitle {
        font-size: 1rem;
    }
    
    .churches-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .church-card {
        padding: 25px 20px;
    }
    
    .church-icon {
        width: 55px;
        height: 55px;
    }
    
    .church-icon i {
        font-size: 1.3rem;
    }
    
    .church-card h3 {
        font-size: 1.1rem;
    }
    
    .church-link {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
}

/* Large Desktops */
@media (min-width: 1200px) {
    .churches-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 35px;
    }
    
    .church-card {
        padding: 40px 30px;
    }
}



/* Church Overlay Styles */
.church-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.overlay-content {
    background: white;
    margin: 50px auto;
    max-width: 900px;
    width: 90%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    position: relative;
    animation: overlayFadeIn 0.3s ease-out;
}

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

.close-overlay {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    z-index: 2001;
    transition: var(--transition);
    color: var(--accent-red);
}

.close-overlay:hover {
    color: var(--accent-red);
    transform: scale(1.5);
}

.church-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 500px;
}

.church-detail-image {
    position: relative;
    background: var(--bg-light);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.church-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.image-placeholder {
    font-size: 4rem;
    color: var(--accent-orange);
    padding: 40px;
}

.church-detail-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.church-detail-info h2 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.church-meta {
    margin-bottom: 25px;
}

.church-meta p {
    color: var(--text-gray);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.church-meta i {
    color: var(--accent-orange);
    margin-right: 10px;
    width: 20px;
}

.church-description {
    margin-bottom: 25px;
    line-height: 1.7;
    color: var(--text-dark);
}

.church-contact h4 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.contact-details p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.contact-details i {
    color: var(--accent-orange);
    margin-right: 10px;
    width: 20px;
}

.contact-details a {
    color: var(--accent-blue);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Church Thumbnail in Cards */
.church-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* No Churches State */
.no-churches {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
}

.no-churches i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--accent-orange);
}

.no-churches h3 {
    margin-bottom: 15px;
    color: var(--primary-dark);
}

/* Responsive Overlay */
@media (max-width: 768px) {
    .church-detail-content {
        grid-template-columns: 1fr;
    }
    
    .church-detail-image {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
        height: 250px;
    }
    
    .church-detail-info {
        padding: 25px;
    }
    
    .overlay-content {
        margin: 20px auto;
        width: 95%;
    }
}

/* Loading State */
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*END OF MINISTRIES*/
