/* Estilos para os containers de módulos */
.modules-grid {
    margin-bottom: 2rem;
}

.module-container {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.module-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.module-container .card-header {
    border-bottom: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.module-container .card-header h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.module-item {
    transition: background-color 0.2s ease;
    position: relative;
    border-bottom: 1px solid #f1f3f4;
}

.module-item:hover {
    background-color: #f8f9fa;
}

.module-item:last-child {
    border-bottom: none;
}

.module-item img {
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.module-item:hover img {
    transform: scale(1.05);
}

.module-item h6 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.module-item h6 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.module-item h6 a:hover {
    color: #3498db;
}

.module-item p {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.module-item small {
    font-size: 0.75rem;
}

.module-item .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

/* Cores específicas para cada módulo */
.card-header.bg-info {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #28a745, #1e7e34) !important;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.card-header.bg-purple {
    background: linear-gradient(135deg, #6f42c1, #5a2d91) !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107, #d39e00) !important;
    color: #212529 !important;
}

.card-header.bg-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62) !important;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #dc3545, #bd2130) !important;
}

/* Botões de ação */
.btn-outline-light {
    border-color: rgba(255,255,255,0.5);
    color: rgba(255,255,255,0.9);
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    background-color: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.8);
    color: white;
}

/* Rodapé dos cards */
.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 0.75rem 1.25rem;
}

.card-footer .btn {
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease;
}

/* Estado vazio */
.module-container .text-center {
    padding: 2rem 1rem;
}

.module-container .text-center i {
    opacity: 0.6;
    margin-bottom: 1rem;
}

/* Layout horizontal para desktop e tablet (um por linha) */
@media (min-width: 769px) {
    .module-container {
        margin-bottom: 1.5rem;
    }
    
    .module-container .card {
        min-height: 180px;
    }
    
    .module-container .card-body {
        display: flex;
        flex-direction: row;
        padding: 0;
        gap: 0;
    }
    
    /* Exceção para o módulo Radio - usar layout normal */
    .module-container.radio-module .card-body {
        display: block !important;
        padding: 0 !important;
    }
    
    .module-container.radio-module .card {
        min-height: auto !important;
    }
    
    .module-container.radio-module {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .module-item {
        flex: 1;
        border-right: 1px solid #e9ecef;
        border-bottom: none !important;
        padding: 1rem !important;
        margin: 0;
    }
    
    .module-item:last-child {
        border-right: none;
    }
    
    .module-item .col-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .module-item .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .module-item .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .module-item img {
        height: 60px !important;
        width: 100%;
        object-fit: cover;
    }
    
    .module-item h6 {
        font-size: 0.85rem;
        line-height: 1.2;
        margin-bottom: 0.25rem;
    }
    
    .module-item p {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .module-item small {
        font-size: 0.7rem;
    }
    
    /* Estado vazio e rádio - layout horizontal */
    .module-container .text-center {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 140px;
    }
    
    .module-container .text-center i {
        font-size: 2rem !important;
        margin-bottom: 0.5rem;
    }
    
    .module-container .text-center h5 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
}

/* Responsividade para tablet */
@media (min-width: 577px) and (max-width: 768px) {
    .module-container .card-header {
        padding: 0.75rem 1rem;
    }
    
    .module-container .card-header h5 {
        font-size: 0.85rem;
    }
    
    .module-item {
        padding: 0.6rem !important;
    }
    
    .module-item img {
        height: 65px !important;
    }
    
    .module-item h6 {
        font-size: 0.8rem;
    }
    
    .module-item p {
        font-size: 0.75rem;
    }
    
    .module-item small {
        font-size: 0.7rem;
    }
}

/* Mobile - mantém como estava (1 coluna) */
@media (max-width: 576px) {
    .module-container .card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .module-item {
        padding: 0.5rem !important;
    }
    
    .module-item img {
        height: 50px !important;
    }
    
    .module-item h6 {
        font-size: 0.8rem;
        line-height: 1.2;
    }
    
    .module-item p {
        font-size: 0.7rem;
    }
    
    .card-footer {
        padding: 0.5rem 0.75rem;
    }
    
    .card-footer .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-container {
    animation: fadeInUp 0.6s ease-out;
}

.module-container:nth-child(1) { animation-delay: 0.1s; }
.module-container:nth-child(2) { animation-delay: 0.2s; }
.module-container:nth-child(3) { animation-delay: 0.3s; }
.module-container:nth-child(4) { animation-delay: 0.4s; }
.module-container:nth-child(5) { animation-delay: 0.5s; }
.module-container:nth-child(6) { animation-delay: 0.6s; }

/* Estatísticas */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.stats-section .col-md-3 {
    padding: 1rem;
}

.stats-section i {
    margin-bottom: 0.5rem;
}

.stats-section h4 {
    font-weight: 700;
    color: #2c3e50;
}

.stats-section small {
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}