/* ================================
   ESTILO MODERNO PSW – BUSCADOR
================================ */

/* Contenedor general del módulo */
.psw-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 24px;
    box-sizing: border-box;
}

/* Título */
.psw-h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 20px 0 10px;
    color: #0a571d;
}

/* ================================
   STICKY WRAPPER (solo PC)
================================ */
.psw-filtros-sticky {
    margin: 18px 0 12px;
}

@media (min-width: 901px) {
    .psw-filtros-sticky {
        position: sticky;
        top: 70px;            /* Ajusta si el header cambia */
        z-index: 20;
        background: #ffffff;
        padding: 12px 16px;
        border-radius: 12px;
        border: 1px solid #e0e0e0;
        box-shadow: 0 2px 6px rgba(0,0,0,.08);
        box-sizing: border-box;
    }
}

/* En móvil NO sticky */
@media (max-width: 900px) {
    .psw-filtros-sticky {
        position: static;
        background: transparent;
        padding: 0;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
}

/* ================================
   FILTROS (contenido interno)
================================ */
.psw-filtros {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;

    padding: 4px;
    box-sizing: border-box;
}

.psw-filtros .full {
    grid-column: 1 / -1;
}

.psw-filtros select,
.psw-filtros input[type="search"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 15px;
    background: #fafafa;
    transition: border-color .2s;
    box-sizing: border-box;
}

.psw-filtros select:focus,
.psw-filtros input[type="search"]:focus {
    border-color: #0a7a26;
    outline: none;
}

/* Botón aplicar */
.psw-btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    background: #0a7a26;
    color: #ffffff !important;
    text-decoration: none;
    display: inline-block;
}

/* Botón limpiar */
.psw-btn-clear {
    background: #e4e4e4 !important;
    color: #333333 !important;
}

/* Evitar apariencia "disabled" */
.psw-btn[disabled],
.psw-btn-clear[disabled] {
    opacity: 0.7;
}

/* ================================
   CHIPS ACTIVOS
================================ */
.psw-chips {
    margin: 15px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.psw-chip {
    background: #e5f5e9;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: #0a7a26;
    border: 1px solid #cde9d4;
}

.psw-chip a {
    margin-left: 6px;
    color: #0a7a26;
    text-decoration: none;
    font-weight: bold;
}

/* ================================
   TEXTO META
================================ */
.psw-meta {
    margin: 10px 0 15px;
    color: #555;
    font-size: 15px;
}

/* ================================
   CARDS
================================ */
.psw-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.psw-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}

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

/* Imagen consistente */
.psw-card-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    background: #eee;
}

/* Contenido Card */
.psw-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.psw-card-title {
    font-size: 17px;
    margin: 0;
    line-height: 1.25;
}

.psw-card-title a {
    text-decoration: none;
    color: #0a6c21;
    font-weight: 700;
}

.psw-card-title a:hover {
    color: #085d1c;
}

.psw-card-meta {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 4px;
}

.psw-card-desc {
    font-size: 14px;
    color: #3a3a3a;
    line-height: 1.45;
    margin-top: 4px;
}

/* ================================
   PAGINACIÓN
================================ */
.psw-pag {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.psw-pag a,
.psw-pag span {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

.psw-pag a:hover {
    background: #f0f0f0;
}

.psw-pag .act {
    background: #0a7a26;
    color: #fff;
    border-color: #0a7a26;
}

/* ================================
   RESPONSIVE AJUSTE EXTRA
================================ */
@media (max-width: 900px) {
    .psw-filtros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .psw-filtros {
        grid-template-columns: 1fr;
        padding: 12px;
    }
}
/* ============================================
   1) MODO COMPACTO EN MÓVIL
============================================ */
@media (max-width: 600px) {
    .psw-filtros {
        gap: 8px;
        padding: 10px;
    }

    .psw-filtros select,
    .psw-filtros input[type="search"] {
        padding: 8px 10px;
        font-size: 14px;
    }

    .psw-btn,
    .psw-btn-clear {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 6px;
    }
}
