/**
 * CSS EXCLUSIVO PARA CARDS MOBILE - CRIADO DO ZERO
 * Não aproveita nada do CSS atual
 */

/* ========================================
   CONTROLE DE VISIBILIDADE
   ======================================== */

/* Desktop: mostra versão desktop, esconde mobile */
.desktop-modules {
    display: block;
}

.mobile-modules {
    display: none;
}

/* Mobile: esconde versão desktop, mostra mobile */
@media (max-width: 768px) {
    .desktop-modules {
        display: none !important;
    }
    
    .mobile-modules {
        display: block !important;
    }
}

/* ========================================
   BOX MOBILE - ESTRUTURA
   ======================================== */
.mobile-module-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

/* ========================================
   HEADER MOBILE
   ======================================== */
.mobile-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-header-icon {
    font-size: 24px;
    color: #ffffff;
}

.mobile-header-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-header-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ========================================
   BODY MOBILE
   ======================================== */
.mobile-module-body {
    padding: 0;
}

/* ========================================
   CARD ITEM MOBILE
   ======================================== */
.mobile-card-item {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.mobile-card-item:last-child {
    border-bottom: none;
}

.mobile-card-item:active {
    background-color: #f9fafb;
}

.mobile-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 16px;
}

.mobile-card-content {
    display: flex;
    gap: 12px;
}

/* ========================================
   IMAGEM MOBILE
   ======================================== */
.mobile-card-image {
    flex-shrink: 0;
    width: 110px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: stretch;
}

.mobile-card-image img {
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ========================================
   INFO MOBILE
   ======================================== */
.mobile-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mobile-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-card-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.mobile-card-description {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   META MOBILE
   ======================================== */
.mobile-card-meta {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.mobile-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.mobile-meta-item i {
    font-size: 11px;
}

/* ========================================
   BOTÃO VER MAIS MOBILE (Padrão Desktop)
   ======================================== */
.mobile-card-action {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.mobile-btn-ver-mais {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #6c757d;
    border: 2px solid #6c757d;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.mobile-btn-ver-mais i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.mobile-card-link:active .mobile-btn-ver-mais {
    background: #5a6268;
    border-color: #5a6268;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.mobile-card-link:active .mobile-btn-ver-mais i {
    transform: translateX(3px);
}

/* ========================================
   ESTADO VAZIO MOBILE
   ======================================== */
.mobile-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.mobile-empty-icon {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.mobile-empty-text {
    margin: 0;
    font-size: 14px;
    color: #9ca3af;
}

/* ========================================
   CORES POR MÓDULO (Bootstrap Colors)
   ======================================== */
.mobile-header-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.mobile-header-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
}

.mobile-header-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}

.mobile-header-danger {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
}

.mobile-header-warning {
    background: linear-gradient(135deg, #ffc107 0%, #cc9a06 100%);
}

.mobile-header-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #565e64 100%);
}

.mobile-header-dark {
    background: linear-gradient(135deg, #212529 0%, #1a1d20 100%);
}

.mobile-header-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #59359a 100%);
}

/* ========================================
   ANIMAÇÕES MOBILE
   ======================================== */
@keyframes slideInMobile {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-module-box {
    animation: slideInMobile 0.4s ease-out;
}

/* ========================================
   OTIMIZAÇÕES DE PERFORMANCE
   ======================================== */
.mobile-card-image img {
    will-change: transform;
}

.mobile-card-link {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
}
