/* ============================================
   INDUSTRY DATABASE SOLUTIONS SECTION FIXES
   Mobile and Desktop Adjustments
   ============================================ */

/* Desktop mode - Increase category button size slightly and align left */
@media (min-width: 992px) {
    .idb-solutions-nav-container {
        justify-content: flex-start !important; /* Align categories to the left */
    }
    
    .idb-nav-item {
        padding: 1.2rem 1.5rem !important; /* Slightly increased from default */
        min-height: 90px !important; /* Increased height */
    }
    
    .idb-nav-icon {
        font-size: 2rem !important; /* Slightly larger icon */
        margin-bottom: 0.6rem !important;
    }
    
    .idb-nav-text {
        font-size: 0.95rem !important; /* Slightly larger text */
    }
}

/* Mobile mode - Reduce height and center Learn More button */
@media (max-width: 991.98px) {
    /* Fix container to prevent categories from being cut off */
    .idb-solutions-section {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow: visible !important;
    }
    
    .idb-solutions-section .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }
    
    .idb-solutions-showcase {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow: visible !important;
    }
    
    /* Add proper padding to navigation container */
    .idb-solutions-nav {
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        width: calc(100% + 30px) !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .idb-solutions-nav-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        display: flex !important;
        gap: 0.75rem !important;
        width: max-content !important;
    }
    
    /* Ensure all items are fully visible with proper spacing */
    .idb-nav-item {
        flex-shrink: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .idb-nav-item:first-child {
        margin-left: 0 !important;
    }
    
    .idb-nav-item:last-child {
        margin-right: 0 !important;
    }
    
    /* Reduce height of category navigation items for better mobile appearance */
    .idb-nav-item {
        padding: 0.8rem 0.6rem !important; /* Reduced padding */
        min-height: 70px !important; /* Reduced minimum height */
        min-width: 110px !important; /* Increased width for better appearance */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .idb-nav-icon {
        font-size: 1.8rem !important; /* Smaller icon for mobile */
        margin-bottom: 0.4rem !important;
    }
    
    .idb-nav-text {
        font-size: 0.75rem !important; /* Smaller text */
        text-align: center !important;
        line-height: 1.2 !important;
    }
    
    /* Center the Learn More button */
    .idb-solution-action {
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
        margin-top: 2rem !important;
    }
    
    .idb-solution-action .btn-premium {
        margin: 0 auto !important;
    }
    
    /* Alternative selector if the structure is different */
    .idb-solution-content .btn-premium {
        display: inline-flex !important;
        margin: 0 auto !important;
    }
    
    /* Center button container */
    .idb-solution-panel .row .col-lg-6:first-child {
        text-align: center !important;
    }
    
    /* Add spacing between benefit cards (Enterprise Security, Real-time Analytics, etc.) */
    .idb-benefit-card {
        margin-bottom: 1.5rem !important; /* Increase vertical spacing between cards */
    }
    
    /* Override the mb-2 class and add more spacing to columns */
    .row > .col-6.mb-2 {
        margin-bottom: 1.5rem !important; /* Increase gap between rows */
    }
    
    /* Add horizontal gap between columns */
    .row > .col-6 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Add spacing to the row containing benefit cards */
    .row {
        row-gap: 1rem !important; /* Add gap between rows */
    }
    
    /* FIX: Reduce testimonial section height to eliminate excessive white space */
    .tm-testimonials .row {
        height: auto !important; /* Remove fixed height */
        min-height: 280px !important; /* Set minimum height instead */
    }
    
    .tm-testimonial-card {
        margin-bottom: 0 !important; /* Remove bottom margin in mobile */
    }
    
    /* Reduce spacing in testimonial section */
    .tm-section {
        padding-bottom: 5px !important; /* Minimal bottom padding */
    }
    
    /* Reduce gap between testimonials and CTA section */
    .tm-testimonials {
        margin-bottom: 0 !important; /* Remove bottom margin */
    }
    
    /* Pull CTA section closer to testimonials */
    .services-intro-cta {
        margin-top: -60px !important; /* Negative margin to reduce gap */
        padding-top: 0 !important;
    }
    
    .services-intro-cta .cta-gradient-bg {
        margin-top: 10px !important;
    }
}

/* Extra small mobile devices - even tighter spacing */
@media (max-width: 575.98px) {
    .tm-section {
        padding-bottom: 0 !important;
    }
    
    .services-intro-cta {
        margin-top: -70px !important;
    }
}
