/* Estilos para la página de ministerios */

/* Encabezado de la sección */
.ministries-header {
    text-align: center;
    margin-bottom: 3.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.8rem;
    color: #1a5276;
    margin-bottom: 1rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #f39c12;
    border-radius: 2px;
}

.section-description {
    font-size: 1.2rem;
    color: #6c757d;
    line-height: 1.6;
}

/* Grid de ministerios */
.ministries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

/* Tarjeta de ministerio */
.ministry-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

.ministry-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.ministry-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.ministry-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ministry-card:hover .ministry-image img {
    transform: scale(1.05);
}

.ministry-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ministry-content h2 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    color: #1a5276;
    position: relative;
    padding-bottom: 0.8rem;
}

.ministry-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #f39c12;
    border-radius: 2px;
}

.ministry-leader, 
.ministry-time, 
.ministry-age {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.ministry-leader i, 
.ministry-time i, 
.ministry-age i {
    color: #1a5276;
    margin-right: 0.8rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.ministry-description {
    margin: 1.5rem 0;
    color: #212529;
    line-height: 1.6;
    flex-grow: 1;
}

.ministry-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.ministry-actions .btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-outline {
    background-color: transparent;
    color: #1a5276;
    border: 1px solid #1a5276;
}

.btn-outline:hover {
    background-color: #1a5276;
    color: white;
}

.btn-more {
    background-color: #f39c12;
    color: white;
    border: none;
    cursor: pointer;
}

.btn-more:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.2);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 15px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #1a5276;
}

#ministryModalContent {
    margin-top: 1.5rem;
}

/* Media queries */
@media (max-width: 992px) {
    .ministries-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ministries-grid {
        grid-template-columns: 1fr;
    }
    
    .ministries-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .modal-content {
        width: 90%;
        padding: 1.5rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ministry-card {
    animation: fadeIn 0.6s ease forwards;
}

.ministry-card:nth-child(2) {
    animation-delay: 0.1s;
}

.ministry-card:nth-child(3) {
    animation-delay: 0.2s;
}

.ministry-card:nth-child(4) {
    animation-delay: 0.3s;
}

.ministry-card:nth-child(5) {
    animation-delay: 0.4s;
}

.ministry-card:nth-child(6) {
    animation-delay: 0.5s;
}

/* Animaciones para las tarjetas */
.ministry-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.6s ease forwards;
}
