/* Botón de Favorito */
.nl-fav-button {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    border-radius: 4px;
    background: #fff;
    /* Ensure it stands out over images */
}

.nl-fav-button:hover {
    background-color: #f0f0f0;
}

.nl-fav-button.active {
    background-color: #ffeaea;
    border-color: #ffcccc;
    color: #d63638;
}

.nl-fav-icon {
    font-size: 1.2em;
    line-height: 1;
}

/* Lista de Favoritos (Shortcode fav_list) */
.nl-fav-container {
    max-width: 800px;
    margin: 0 auto;
}

.nl-fav-items {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.nl-fav-item {
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nl-fav-thumb img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.nl-fav-title {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    text-decoration: none;
    color: inherit;
}

.nl-fav-remove {
    background: #fdf2f2;
    border: 1px solid #f8d7da;
    color: #721c24;
    padding: 5px 10px;
    font-size: 0.9em;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
}

.nl-fav-remove:hover {
    background: #f8d7da;
}

/* Formulario */
.nl-fav-form {
    background: #fdfdfd;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.nl-form-group {
    margin-bottom: 15px;
}

.nl-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.nl-form-group input,
.nl-form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.nl-submit-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 4px;
}

.nl-submit-btn:hover {
    background: #005177;
}

.nl-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.nl-fav-empty {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Response message */
.nl-form-response {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.nl-form-response.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.nl-form-response.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* -------------------------------------------------------------------------- */
/* Portfolio GRID Styles (New) */
/* -------------------------------------------------------------------------- */

.nl-portfolio-grid {
    display: grid;
    gap: 30px;
    margin-bottom: 30px;
}

/* Column Utilities */
.nl-portfolio-grid.cols-1 {
    grid-template-columns: 1fr;
}

.nl-portfolio-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.nl-portfolio-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.nl-portfolio-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive Fallback */
@media (max-width: 768px) {

    .nl-portfolio-grid.cols-3,
    .nl-portfolio-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .nl-portfolio-grid.cols-2,
    .nl-portfolio-grid.cols-3,
    .nl-portfolio-grid.cols-4 {
        grid-template-columns: 1fr;
    }
}

.nl-portfolio-item {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nl-portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.nl-portfolio-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.nl-portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nl-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nl-no-image::after {
    content: '...';
    color: #ccc;
    font-size: 2em;
}

/* Overlay fav button */
.nl-portfolio-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.nl-portfolio-info {
    padding: 15px;
}

.nl-portfolio-title {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.nl-portfolio-title a {
    text-decoration: none;
    color: #333;
}

.nl-portfolio-cats {
    font-size: 0.85em;
    color: #777;
}

.nl-portfolio-cats a {
    color: #777;
    margin-right: 5px;
}

/* Pagination */
.nl-pagination {
    text-align: center;
    margin-top: 30px;
}

.nl-load-more-btn {
    background: #333;
    color: #fff;
    padding: 10px 25px;
    border: none;
    cursor: pointer;
    font-size: 1em;
    border-radius: 50px;
}

.nl-load-more-btn:hover {
    background: #555;
}

.nl-infinite-loader {
    font-style: italic;
    color: #999;
    padding: 20px;
}