/* LAYOUT BÚSQUEDA */
.gd-publico-volver-container {
    max-width: 1300px;
    margin: 20px auto 0;
}

.gd-publico-volver {
    text-decoration: none;
    color: #1f5fae;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.gd-publico-volver:hover {
    color: #154682;
}

.gd-publico-volver .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.gd-busqueda-layout {
    display: flex;
    gap: 40px;
    max-width: 1300px;
    margin: 20px auto 40px;
    align-items: flex-start;
}

/* SIDEBAR */
.gd-busqueda-sidebar {
    flex: 0 0 320px;
    position: sticky;
    top: 20px;
}

.gd-sidebar-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.gd-sidebar-card h3 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.gd-sidebar-divider {
    height: 1px;
    background: #e5e7eb;
    margin-bottom: 20px;
}

.gd-sidebar-hint {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* CAMPOS FILTRO */
.gd-filtro-campo {
    margin-bottom: 20px;
}

.gd-filtro-campo label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.gd-input-icono {
    position: relative;
    display: flex;
    align-items: center;
}

.gd-input-icono .dashicons {
    position: absolute;
    left: 10px;
    color: #999;
}

.gd-busqueda-sidebar .gd-input-icono input[type="text"] {
    width: 100%;
    padding: 10px 10px 10px 45px !important;
    /* 12px vertical, 15px derecha, 45px izquierda para el icono */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.gd-filtro-campo select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

/* ACCIONES FILTRO */
.gd-filtro-acciones {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.gd-filtro-acciones button {
    flex: 1;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.gd-btn-outline {
    background: #fff;
    color: #1f5fae;
    border: 1px solid #1f5fae;
}

.gd-btn-outline:hover {
    background: #f0f7ff;
}

.gd-btn-solid {
    background: #0056b3;
    color: #fff !important;
    border: 1px solid #0056b3;
}

.gd-btn-solid:hover {
    background: #004494;
}

/* MAIN CONTENT */
.gd-busqueda-main {
    flex: 1;
}

/* CATEGORÍAS SUPERIOR */
.gd-filtro-categorias {
    margin-bottom: 30px;
}

.gd-filtro-categorias label {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.gd-cat-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gd-cat-btn {
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid #1f5fae;
    background: #fff;
    color: #1f5fae;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.gd-cat-btn:hover {
    background: #f0f7ff;
}

.gd-cat-btn.active {
    background: #0F69C4;
    color: #fff;
    border-color: #0F69C4;
}

/* HEADER RESULTADOS */
.gd-resultados-header {
    margin-bottom: 25px;
}

.gd-resultados-header h2 {
    font-size: 28px;
    color: #7E8FA0;
    margin: 0 0 5px;
    font-weight: 600;
}

#gd-contador-resultados {
    color: #666;
    font-size: 14px;
}

/* TARJETA DE RESULTADO */
.gd-res-card {
    display: flex;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 24px;
    /* Padding solicitado */
    transition: box-shadow 0.2s;
    align-items: stretch;
    /* Permite que la imagen se estire hasta el fondo */
}

.gd-res-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: #1f5fae;
}

/* ===== VISTA PREVIA DE DOCUMENTO ===== */
.gd-res-preview {
    flex: 0 0 140px;
    height: 180px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #f5f7fa;
    border: 1px solid #e0e4ea;
}

/* PDF: iframe embebido con overlay para bloquear clics */
.gd-preview-pdf {
    background: #fff;
}

.gd-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    pointer-events: none;
    transform-origin: top left;
}

/* Overlay transparente que bloquea cualquier interacción con el iframe */
.gd-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: default;
    background: transparent;
}

/* Word y Genérico: ícono centrado */
.gd-preview-word,
.gd-preview-generico {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gd-preview-icon-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gd-preview-icon {
    width: 56px;
    height: 56px;
}

.gd-preview-tipo {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gd-res-info {
    padding: 0 0 0 20px;
    /* Solo padding izquierdo para separar de la imagen */
    flex: 1;
}

.gd-res-info h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
}


.gd-res-resumen {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gd-res-meta-author {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.gd-res-meta-line {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
}

.gd-res-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 13px;
}

.gd-res-tags {
    color: #999;
}

.gd-res-ver-mas {
    color: #1f5fae;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gd-res-ver-mas span {
    font-size: 18px;
}

/* PAGINACIÓN Y MOSTRAR */
.gd-footer-paginación-extra {
    display: flex;
    justify-content: flex-end;
    /* Agrupado a la derecha */
    align-items: center;
    gap: 30px;
    /* Separación agrupada */
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.gd-mostrar-conteo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.gd-mostrar-conteo select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}

#gd-mostrando-texto {
    font-weight: 600;
    color: #333;
}

.gd-paginacion-wrapper {
    display: flex;
    gap: 5px;
}

/* BOTONES DE PAGINACIÓN */
.gd-page-btn,
.gd-pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 5px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #1f5fae;
}

.gd-page-btn:hover {
    background: #f0f7ff;
    border-color: #1f5fae;
}

.gd-pagination span.current {
    background: #1f5fae;
    color: #fff;
    border-color: #1f5fae;
    cursor: default;
}

.gd-page-btn.gd-arrow {
    background: #f3f4f6;
    color: #9ca3af;
    border: none;
    font-size: 18px;
}

.gd-page-btn.gd-arrow:hover {
    background: #e5e7eb;
    color: #374151;
}

/* CARGANDO OPACIDAD */
.gd-opacidad-media {
    opacity: 0.5;
    pointer-events: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .gd-busqueda-layout {
        flex-direction: column;
    }

    .gd-busqueda-sidebar {
        flex: none;
        width: 100%;
        position: static;
    }
}
