/* Tags Popular Mobile Fix - 2 Columns & Better Readability */

/* ===== TAGS POPULAR MOBILE LAYOUT ===== */
@media (max-width: 768px) {
    /* 2 columns on mobile */
    .popular-tags-section .row:nth-child(2) > div {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Center the title and description - keep full width */
    .popular-tags-section .row:first-child {
        text-align: center !important;
    }
    
    .popular-tags-section .row:first-child .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 576px) {
    /* 2 columns on small mobile */
    .popular-tags-section .row:nth-child(2) > div {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-left: 6px;
        padding-right: 6px;
    }
    
    /* Center the title and description - keep full width */
    .popular-tags-section .row:first-child {
        text-align: center !important;
    }
    
    .popular-tags-section .row:first-child .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ===== IMPROVED TAG CARD STYLING ===== */
.popular-tag-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    padding: 20px 15px !important;
    text-align: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    height: 100% !important;
    border: 2px solid #e9ecef !important;
    position: relative !important;
    overflow: hidden !important;
    margin-bottom: 15px !important;
}

.popular-tag-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    border-color: #007bff !important;
}

/* ===== IMPROVED TAG CONTENT READABILITY ===== */
.tag-content {
    margin-bottom: 0 !important;
}

.tag-name {
    font-weight: 700 !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    display: block !important;
    padding: 8px 12px !important;
    background: #1e3a8a !important;
    border-radius: 8px !important;
    border: 2px solid #1e3a8a !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.tag-link {
    display: block !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.3s ease !important;
}

.tag-link:hover {
    text-decoration: none !important;
    color: inherit !important;
    transform: none !important;
}

/* ===== MOBILE SPECIFIC IMPROVEMENTS ===== */
@media (max-width: 768px) {
    .popular-tag-card {
        padding: 15px 10px !important;
        margin-bottom: 12px !important;
    }
    
    .tag-name {
        font-size: 0.9rem !important;
        padding: 6px 10px !important;
    }
}

@media (max-width: 576px) {
    .popular-tag-card {
        padding: 12px 8px !important;
        margin-bottom: 10px !important;
    }
    
    .tag-name {
        font-size: 0.85rem !important;
        padding: 5px 8px !important;
    }
}

/* ===== SECTION TITLE CENTERING ===== */
.popular-tags-section .section-title,
.popular-tags-section .section-description {
    text-align: center !important;
}

.popular-tags-section h2 {
    text-align: center !important;
}

/* ===== NAVY BLUE THEME - FINAL DESIGN ===== */
/* Navy blue background with white text for maximum readability */
.popular-tag-card .tag-name {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    color: #ffffff !important;
    border: 2px solid #1e3a8a !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

