.prompts-grid {
    display: grid;
    gap: 2rem;
    padding: 2rem;
    /* Modificamos el grid para que use un ancho mínimo más pequeño */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.prompt-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.prompt-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.copy-button {
    white-space: nowrap;
    display: inline-flex;
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.copy-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.copy-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.prompt-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
}

/* Filtros */
.prompt-filters {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.filters-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Estad�sticas y valoraciones */
.prompt-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.stars {
    color: #ffd700;
    cursor: pointer;
}

.star {
    transition: color 0.2s;
}

.star:hover,
.star.active {
    color: #ffc107;
}

/* Paginaci�n */
.prompt-pagination {
    margin-top: 2rem;
    text-align: center;
}

.prompt-pagination .page-numbers {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
}

.prompt-pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Lightbox */
.prompt-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.gallery-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 14px;
}

.lightbox {
    cursor: zoom-out;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
}

/* Mejoras de animación */
.lightbox img {
    transition: opacity 0.3s ease;
}

.lightbox.changing img {
    opacity: 0.5;
}



.tool-logos {
    position: absolute;
    top: 0.5rem; /* Alineado en la parte superior */
    right: 0.5rem; /* Alineado a la derecha */
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}


.tool-logo img {
    width: 25px; /* Reducir tamaño a la mitad */
    height: 25px;
    object-fit: contain;
}

.tool-logo img {
    margin-right: 5px; /* Reducir tamaño a la mitad */
}

.prompt-card {
    position: relative;
    padding-top: 2rem;
}

.prompt-card h3 {
    font-size: 1.2rem; /* Tamaño un poco más pequeño */
    font-weight: bold; /* Poner en negrita */
    margin-top: 0.5rem;
}


.prompt-content {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.prompt-card .prompt-content {
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Mostrar 4 líneas en lugar de 3 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
    font-size: 0.85rem; /* Reducir tamaño de fuente */
    line-height: 1.4; /* Ajustar el interlineado para mostrar más contenido */
}


.show-more {
    display: inline-block;
    margin-top: 0.5rem;
    background: none;
    border: none;
    color: #007bff;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}

.show-more:hover {
    text-decoration: underline;
}

/* Estilos del Modal */
/* Estilos del Modal */
.prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.prompt-modal.active {
    opacity: 1;
    visibility: visible;
}

.prompt-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 90%;
    width: 600px;
    max-height: 90vh;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.prompt-modal.active .prompt-modal-content {
    transform: translateY(0);
}

.prompt-modal-header {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.prompt-modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.prompt-modal-body {
    max-height: calc(90vh - 180px);
    overflow-y: auto;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.prompt-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.prompt-modal-close:hover {
    opacity: 1;
}

.prompt-modal-close::before,
.prompt-modal-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #333;
    transform-origin: center;
}

.prompt-modal-close::before {
    transform: rotate(45deg);
}

.prompt-modal-close::after {
    transform: rotate(-45deg);
}

.prompt-modal-footer {
    text-align: right;
}

.prompt-modal .copy-button {
    margin: 0;
}

/* Estilos para el contenido de taxonomía */
.taxonomy-pre-content,
.taxonomy-post-content {
    margin: 2rem 0;
    padding: 0 2rem;
}

.taxonomy-pre-content {
    margin-bottom: 3rem;
}

.taxonomy-post-content {
    margin-top: 3rem;
}

.taxonomy-pre-content h1,
.taxonomy-pre-content h2,
.taxonomy-post-content h2 {
    margin-bottom: 1rem;
    color: #333;
}

.taxonomy-pre-content p,
.taxonomy-post-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Asegurar que los estilos de prompt-library se mantienen en las páginas de taxonomía */
/* Estilos específicos para páginas de taxonomía */
.tax-tipo_ia .prompts-grid,
.tax-caso_uso .prompts-grid,
.tax-perfil .prompts-grid {
    /* Forzamos específicamente 3 columnas en páginas de taxonomía */
    grid-template-columns: repeat(3, 1fr);
    max-width: 1600px; /* Ajusta este valor según tu diseño */
    margin: 0 auto;
}

/* Responsive para tablets */
@media (max-width: 1024px) {
    .tax-tipo_ia .prompts-grid,
    .tax-caso_uso .prompts-grid,
    .tax-perfil .prompts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .tax-tipo_ia .prompts-grid,
    .tax-caso_uso .prompts-grid,
    .tax-perfil .prompts-grid {
        grid-template-columns: 1fr;
    }
    
    .prompts-grid {
        padding: 1rem;
        gap: 1rem;
    }
}

/* Estilos para la página completa y el título */
.content-area.full-width {
    width: 100%;
    max-width: none;
    padding: 0;
}

.taxonomy-title {
    font-size: 2.5rem;
    margin: 2rem;
    color: #333;
    text-align: center;
}

/* Navegación de taxonomías */
.taxonomy-navigation {
    margin: 2rem 0;
    padding: 0 2rem;
}

.taxonomy-nav-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.taxonomy-terms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.taxonomy-term-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.taxonomy-term-link:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.taxonomy-term-link.current-term {
    background: #007bff;
    color: white;
}

.taxonomy-term-link.current-term:hover {
    background: #0056b3;
}

@media (max-width: 768px) {
    .taxonomy-terms-grid {
        gap: 0.5rem;
    }
    
    .taxonomy-term-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}


/* Overlay del loader */
.prompts-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.prompts-grid {
    position: relative;
    min-height: 200px; /* Altura mínima para asegurar que el loader sea visible */
}

.prompts-grid.loading .prompts-loading-overlay {
    opacity: 1;
    visibility: visible;
}

/* Loader moderno */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #007bff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Fade para los prompts durante la carga */
.prompts-grid {
    transition: opacity 0.3s ease;
}

.prompts-grid.loading > *:not(.prompts-loading-overlay) {
    opacity: 0.5;
    pointer-events: none;
}

/* Mejora visual para el estado de carga de los filtros */
.filter-group select:disabled {
    opacity: 0.7;
    cursor: wait;
}