/**
 * Estilos para Iglesias
 * US Food Banks Directory
 */

/* ===========================
   BUSCADOR INSTANTÁNEO
=========================== */
.iglesias-buscador-container {
    margin: 30px 0;
    max-width: 100%;
}

.buscador-iglesias {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.iglesia-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 1.1em;
    border: 2px solid #ff8c8c;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
}

.iglesia-search-input:focus {
    border-color: #e77a7a;
    box-shadow: 0 0 10px rgba(255, 140, 140, 0.3);
}

.btn-limpiar {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: #ff8c8c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    transition: all 0.3s ease;
}

.btn-limpiar:hover {
    background: #e77a7a;
    transform: translateY(-50%) scale(1.1);
}

.resultados-info {
    text-align: center;
    margin-top: 15px;
    font-size: 1em;
}

.no-results {
    color: #e74c3c;
    font-weight: 500;
}

.all-results {
    color: #27ae60;
    font-weight: 500;
}

.filtered-results {
    color: #3498db;
    font-weight: 500;
}

/* ===========================
   TABS LISTA/MAPA
=========================== */
.iglesias-tabs-vista {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.tab-vista {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: #f8f8f8;
    border: 2px solid #ddd;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-vista:hover {
    background: #ff8c8c;
    border-color: #ff8c8c;
    color: white;
}

.tab-vista.active {
    background: #ff8c8c;
    border-color: #ff8c8c;
    color: white;
}

.tab-icon {
    font-size: 1.3em;
}

.vista-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vista-content.active {
    opacity: 1;
}

.vista-placeholder {
    background: #fff3cd;
    border: 2px dashed #ffc107;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.instruccion-placeholder {
    font-size: 1.1em;
    color: #856404;
}

.instruccion-placeholder code {
    background: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-family: monospace;
}

/* ===========================
   LISTADO MEJORADO
=========================== */
.iglesias-listado-mejorado {
    margin: 20px 0;
}

.estado-toggle-mejorado {
    width: 100%;
    background: linear-gradient(135deg, #ff8c8c 0%, #ff6b6b 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2em;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.estado-toggle-mejorado:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 140, 0.3);
}

.toggle-count {
    font-size: 0.9em;
    opacity: 0.9;
    font-weight: 400;
    margin-left: 10px;
}

.toggle-icon {
    font-size: 1.5em;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

/* Grid de iglesias */
.iglesias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* Cards de iglesias */
.iglesia-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.iglesia-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

/* Badges */
.iglesia-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge-iglesia {
    background: #f0e6ff;
    color: #4b0082;
    border: 1px solid #9370db;
}

.badge-horario {
    background: #e6f0ff;
    color: #1e3a8a;
    border: 1px solid #4169e1;
}

/* Nombre */
.iglesia-nombre {
    font-size: 1.2em;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.iglesia-nombre a {
    color: #2c5d3f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.iglesia-nombre a:hover {
    color: #ff8c8c;
}

/* Descripción */
.iglesia-descripcion-corta {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Info rápida */
.iglesia-info-rapida {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    flex-grow: 1;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9em;
    color: #555;
}

.info-item .dashicons {
    color: #ff8c8c;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Acciones */
.iglesia-acciones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.iglesia-acciones .btn {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-llamar {
    background: #27ae60;
    color: white;
}

.btn-llamar:hover {
    background: #229954;
}

.btn-direccion {
    background: #3498db;
    color: white;
}

.btn-direccion:hover {
    background: #2980b9;
}

.btn-detalles {
    background: #ff8c8c;
    color: white;
}

.btn-detalles:hover {
    background: #e77a7a;
}

.iglesia-acciones .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ===========================
   FAQ
=========================== */
.iglesias-faq {
    margin: 40px 0;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 8px;
}

.iglesias-faq h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c5d3f;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: white;
    border: none;
    padding: 15px 20px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05em;
    font-weight: 600;
    color: #2c5d3f;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f8f8;
}

.faq-icon {
    font-size: 1.5em;
    color: #ff8c8c;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.faq-answer {
    padding: 0 20px 15px 20px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* ===========================
   MAPA DE IGLESIAS
=========================== */
.iglesias-mapa-wrapper {
    margin: 20px 0;
}

.mapa-intro {
    background: #e6f0ff;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.mapa-intro p {
    margin: 0;
    font-size: 1.05em;
    color: #1e3a8a;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 992px) {
    .iglesia-search-input {
        font-size: 1em;
        padding: 12px 45px 12px 15px;
    }

    .tab-vista {
        flex: 1 1 100%;
        justify-content: center;
    }

    .iglesias-grid {
        grid-template-columns: 1fr;
    }

    .iglesia-acciones {
        flex-direction: column;
    }

    .iglesia-acciones .btn {
        width: 100%;
    }

    .estado-toggle-mejorado {
        font-size: 1em;
        padding: 12px 15px;
    }

    .toggle-count {
        font-size: 0.85em;
    }
}

/* ===========================
   COMPATIBILIDAD CON SHORTCODE ANTIGUO
=========================== */
/* Mejorar acordeones del shortcode antiguo */
.iglesias-listado .estado-toggle {
    padding: 15px 20px;
}

.iglesias-listado .toggle-count {
    margin-left: 10px;
    opacity: 0.8;
    font-size: 0.9em;
}

/* Mejorar items del shortcode antiguo */
.iglesias-listado .iglesia-item {
    transition: all 0.3s ease;
}

.iglesias-listado .iglesia-item:hover {
    transform: translateX(5px);
}
