/**
 * MIRB Grid Frontend Styles
 * 
 * @package MIRB_GRID
 * @since 1.0.0
 */

.mirb-grid-wrapper {
    max-width: 100%;
    margin: 0 auto 40px;
    padding: 0;
}

.mirb-grid-title {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #212121;
}

.mirb-grid-subtitle {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin: 0 0 30px;
}

.mirb-grid-container {
    display: grid;
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Column configurations */
.mirb-grid-cols-1 {
    grid-template-columns: 1fr;
}

.mirb-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mirb-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mirb-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Grid Item */
.mirb-grid-item {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.mirb-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.mirb-grid-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.mirb-grid-item-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

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

.mirb-grid-item:hover .mirb-grid-item-image img {
    transform: scale(1.05);
}

.mirb-grid-item-title {
    padding: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #212121;
    background: #fff;
}

/* Grid Footer - NEW */
.mirb-grid-footer {
    margin-top: 30px;
    padding: 25px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.mirb-grid-footer p {
    margin: 5px 0;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

.mirb-grid-footer p:first-child {
    font-size: 16px;
    color: #333;
}

.mirb-grid-footer p:last-child {
    font-weight: 600;
    color: #2271b1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mirb-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mirb-grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mirb-grid-container {
        gap: 15px;
    }
    
    /* MANTÉM 2 COLUNAS NO MOBILE - NÃO EMPILHA */
    .mirb-grid-cols-2,
    .mirb-grid-cols-3,
    .mirb-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mirb-grid-title {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .mirb-grid-subtitle {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .mirb-grid-item-image {
        height: 180px;
    }
    
    .mirb-grid-item-title {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    /* Footer ajustado para mobile */
    .mirb-grid-footer {
        margin-top: 20px;
        padding: 20px 15px;
    }
    
    .mirb-grid-footer p {
        font-size: 13px;
    }
    
    .mirb-grid-footer p:first-child {
        font-size: 14px;
    }
    
    .mirb-grid-footer p:last-child {
        font-size: 14px;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    /* MANTÉM 2 COLUNAS MESMO EM TELAS PEQUENAS */
    .mirb-grid-cols-1,
    .mirb-grid-cols-2,
    .mirb-grid-cols-3,
    .mirb-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mirb-grid-container {
        gap: 10px;
    }
    
    .mirb-grid-title {
        font-size: 20px;
    }
    
    .mirb-grid-subtitle {
        font-size: 12px;
    }
    
    .mirb-grid-item-image {
        height: 150px;
    }
    
    .mirb-grid-item-title {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .mirb-grid-footer {
        padding: 15px 10px;
    }
    
    .mirb-grid-footer p {
        font-size: 12px;
    }
}

/* Loading state */
.mirb-grid-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* No items state */
.mirb-grid-wrapper.empty {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
}

.mirb-grid-wrapper.empty p {
    color: #666;
    font-size: 16px;
}