/* assets/css/frontend.css */

/* Grid Layout */
.vpg-wrapper {
    width: 100%;
}

.vpg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Filter Tabs */
.vpg-filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.vpg-filter-tab {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background: #f0f0f0;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.vpg-filter-tab:hover {
    background: #e0e0e0;
}

.vpg-filter-tab.active {
    background: #0073aa;
    color: white;
}

/* Card Styles */
.vpg-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

/* Hover Effects - Conectado con el control del widget */
.vpg-wrapper[data-hover="none"] .vpg-card:hover {
    /* Sin efectos */
}

.vpg-wrapper[data-hover="lift"] .vpg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.vpg-wrapper[data-hover="scale"] .vpg-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.vpg-wrapper[data-hover="glow"] .vpg-card:hover {
    box-shadow: 0 0 20px rgba(0,115,170,0.3);
}

/* Card Image */
.vpg-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.vpg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Efecto imagen solo si no es "none" */
.vpg-wrapper:not([data-hover="none"]) .vpg-card:hover .vpg-card-image img {
    transform: scale(1.05);
}

/* Overlay */
.vpg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vpg-card:hover .vpg-overlay {
    opacity: 1;
}

/* Card Content */
.vpg-card-content {
    padding: 20px;
}

.vpg-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.3;
}

.vpg-category {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 15px;
}

/* Buttons */
.vpg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    background: #0073aa;
    color: white;
}

.vpg-btn:hover {
    background: #005a87;
    transform: scale(1.05);
}

.vpg-btn-view {
    background: rgba(255,255,255,0.9);
    color: #333;
}

.vpg-btn-view:hover {
    background: white;
}

.vpg-actions {
    margin-top: 15px;
}

/* Modal */
.vpg-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

.vpg-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vpg-modal-content {
    background: white;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    animation: slideIn 0.3s ease;
}

.vpg-modal-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.vpg-modal-close:hover {
    color: #e74c3c;
}

.vpg-modal-title {
    padding: 20px;
    margin: 0;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
    font-size: 20px;
}

.vpg-modal-body {
    height: calc(100% - 70px);
    padding: 0;
}

.vpg-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Filtrado - Ocultar cards */
.vpg-card.vpg-hidden {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .vpg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .vpg-modal-content {
        width: 95%;
        height: 95%;
    }
    
    .vpg-title {
        font-size: 16px;
    }
    
    .vpg-filter-tabs {
        gap: 5px;
    }
    
    .vpg-filter-tab {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .vpg-grid {
        grid-template-columns: 1fr;
    }
    
    .vpg-card-content {
        padding: 15px;
    }
}