/* Estilos específicos para la página de apostolados */

/* Estilos para el contenedor principal de apostolados */
.apostolados-contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Estilos para la sección de introducción */
.apostolados-intro {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    text-align: center;
}

/* Estilos para el encabezado de sección */
.section-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(243, 56, 56, 0.1);
}

.section-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.section-title i {
    font-size: 24px;
    color: #f1a83a;
    margin-right: 10px;
}

.section-title h2 {
    margin: 0;
    color: #ffffff;
    font-size: 28px;
}

.section-subtitle {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* Estilos para categorías de apostolados */
.apostolados-categoria {
    margin-bottom: 40px;
}

.categoria-titulo {
    font-size: 24px;
    color: #2c3e50;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1a83a;
    position: relative;
}

.categoria-titulo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: #3498db;
}

/* Estilos para el grid de apostolados */
.apostolados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Estilos para cada tarjeta de apostolado - ACTUALIZADO con Flexbox para alineación consistente */
.apostolado-tarjeta {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.apostolado-tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.apostolado-imagen {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Contenedor de información con flexbox para distribución vertical óptima */
.apostolado-info {
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.apostolado-nombre {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
}

/* Descripción con altura controlada y truncamiento elegante */
.apostolado-descripcion {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.2em;  /* ~3 líneas de texto */
    line-height: 1.4;
}

/* Contenedor para el botón que asegura posicionamiento consistente */
.apostolado-btn-container {
    margin-top: auto;
    padding-top: 10px;
}

/* Estilo del botón mantenido consistente */
.apostolado-btn {
    display: inline-block;
    background-color: #f1a83a;
    color: #fff;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    width: auto;
    min-width: 120px;
}

.apostolado-btn:hover {
    background-color: #e09728;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .apostolados-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .apostolados-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 22px;
    }
    
    .categoria-titulo {
        font-size: 20px;
    }
}

/* Mobile optimization for apostolados intro section */
@media (max-width: 576px) {
    /* Existing mobile styles */
    .apostolados-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 22px;
    }
    
    .categoria-titulo {
        font-size: 20px;
    }

    /* New optimization for intro section */
    .apostolados-intro {
        padding: 0 15px; /* Add some side padding */
        margin-bottom: 20px;
    }

    .section-header {
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 20px;
    }

    .section-header-content {
        align-items: center;
        text-align: center;
    }

    .section-title {
        flex-direction: column;
        align-items: center;
        margin-bottom: 10px;
    }

    .section-title i {
        font-size: 30px;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .section-title h2 {
        font-size: 20px;
        text-align: center;
        margin-bottom: 5px;
    }

    .section-subtitle {
        font-size: 14px;
        text-align: center;
        max-width: 100%;
        line-height: 1.4;
    }
}

/* Reglas específicas para el footer principal */
#main-footer {
    width: 100%;            /* Usar 100% en lugar de 100vw */
    background-color: var(--primary);
    box-sizing: border-box;
    padding: 20px 0;
    margin: 0;              /* Eliminar margen que causa desplazamiento */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;     /* Mantener posicionamiento relativo */
    left: auto;             /* Eliminar posicionamiento horizontal */
    right: auto;
    transform: none;        /* Eliminar transformación que causa el desbordamiento */
    overflow: hidden;       /* Contener cualquier contenido desbordado */
}

/* Container reset para asegurar alineación correcta de elementos hijos */
#main-footer > * {
    max-width: 80%;
    box-sizing: border-box;
}

/* Estilos adicionales que mantienen la apariencia existente */
#main-footer .footer-logo {
    height: 40px;
    margin-bottom: 10px;
}

#main-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 80%;
    margin: 10px auto;
}

#main-footer .footer-link {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s;
}

#main-footer .footer-link:hover {
    color: var(--accent);
}

#main-footer .footer-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    line-height: 1.4;
    width: 80%;
    margin: 5px auto;
}