/* Mobile Responsiveness Improvements - SoftiCation Homepage */

/* ========================================
   HERO SECTION - STATS OPTIMIZATION
   ======================================== */

@media (max-width: 768px) {
    /* Hide desktop stats on mobile */
    .desktop-stats {
        display: none !important;
    }
    
    /* Show mobile-optimized stats */
    .mobile-only-stats {
        display: flex !important;
        justify-content: center !important;
        gap: 20px !important;
        margin-top: 20px !important;
        flex-wrap: wrap !important;
    }
    
    .mobile-only-stats .stat-item {
        text-align: center !important;
        min-width: 120px !important;
        background: rgba(57, 50, 133, 0.05) !important;
        padding: 15px !important;
        border-radius: 12px !important;
        border: 1px solid rgba(57, 50, 133, 0.1) !important;
    }
    
    .mobile-only-stats .stat-number {
        font-size: 2rem !important;
        font-weight: 800 !important;
        color: #393285 !important;
        line-height: 1 !important;
        display: block !important;
    }
    
    .mobile-only-stats .stat-label {
        font-size: 0.8rem !important;
        color: #666 !important;
        margin-top: 8px !important;
        display: block !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        font-weight: 600 !important;
    }
}

/* ========================================
   TECHNOLOGY STACK SECTION - MOBILE
   ======================================== */

@media (max-width: 768px) {
    .apt-tech-stack-section {
        padding: 60px 0 !important;
    }
    
    .apt-tech-container {
        padding: 0 15px !important;
    }
    
    /* Header Optimization */
    .apt-tech-header {
        margin-bottom: 40px !important;
    }
    
    .apt-sub-title {
        font-size: 11px !important;
        padding: 8px 16px !important;
        margin-bottom: 15px !important;
    }
    
    .apt-main-title {
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
        line-height: 1.3 !important;
    }
    
    .apt-description {
        font-size: 0.95rem !important;
        max-width: 100% !important;
        margin-bottom: 30px !important;
    }
    
    /* Stats Container - Mobile */
    .apt-tech-stats {
        gap: 20px !important;
        padding: 25px 15px !important;
        margin-top: 30px !important;
    }
    
    .apt-stat-item {
        min-width: 120px !important;
    }
    
    .apt-stat-number {
        font-size: 2rem !important;
    }
    
    .apt-stat-label {
        font-size: 0.85rem !important;
    }
    
    /* Tab Navigation - Scrollable */
    .apt-tech-tabs-container {
        padding: 25px 15px !important;
    }
    
    .apt-tech-tabs {
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding-bottom: 15px !important;
        gap: 10px !important;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    /* Hide scrollbar but keep functionality */
    .apt-tech-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .apt-tech-tabs {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    
    .apt-tab-btn {
        font-size: 13px !important;
        padding: 10px 16px !important;
        flex-shrink: 0 !important; /* Prevent button shrinking */
    }
    
    /* Tech Grid - Single Column */
    .apt-tech-grid-enhanced,
    #database .apt-tech-grid-enhanced,
    #cms .apt-tech-grid-enhanced,
    #ai-ml .apt-tech-grid-enhanced,
    #devops-cloud .apt-tech-grid-enhanced,
    #ui-ux .apt-tech-grid-enhanced,
    #mobile-dev .apt-tech-grid-enhanced,
    .apt-tech-row {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Tech Cards - Mobile */
    .apt-tech-card {
        padding: 20px 15px !important;
    }
    
    .apt-tech-icon {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 15px !important;
    }
    
    .apt-tech-icon img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .apt-tech-card h4 {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }
    
    .apt-tech-card p {
        font-size: 0.9rem !important;
        margin-bottom: 12px !important;
    }
    
    .apt-tag {
        font-size: 10px !important;
        padding: 4px 10px !important;
    }
    
    /* Category Headers */
    .apt-tech-category-header i {
        font-size: 2.5rem !important;
        margin-bottom: 12px !important;
    }
    
    .apt-tech-category-header h3 {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }
    
    .apt-tech-category-header p {
        font-size: 0.95rem !important;
    }
    
    /* Subcategory Headers */
    .apt-tech-subcategory h4 {
        font-size: 1.3rem !important;
        margin-bottom: 20px !important;
    }
}

/* ========================================
   TABLET VIEW (769px - 992px)
   ======================================== */

@media (min-width: 769px) and (max-width: 992px) {
    .apt-tech-stack-section {
        padding: 80px 0 !important;
    }
    
    .apt-main-title {
        font-size: 2.2rem !important;
    }
    
    .apt-description {
        font-size: 1rem !important;
    }
    
    .apt-tech-stats {
        gap: 30px !important;
        padding: 30px !important;
    }
    
    .apt-stat-number {
        font-size: 2.5rem !important;
    }
    
    .apt-tab-btn {
        font-size: 13px !important;
        padding: 10px 18px !important;
    }
    
    .apt-tech-grid-enhanced,
    .apt-tech-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px !important;
    }
}

/* ========================================
   SMALL MOBILE (Below 480px)
   ======================================== */

@media (max-width: 480px) {
    .apt-main-title {
        font-size: 1.5rem !important;
    }
    
    .apt-sub-title {
        font-size: 10px !important;
        padding: 6px 12px !important;
    }
    
    .apt-tech-stats {
        padding: 20px 10px !important;
        gap: 15px !important;
    }
    
    .apt-stat-item {
        min-width: 100px !important;
    }
    
    .apt-stat-number {
        font-size: 1.8rem !important;
    }
    
    .apt-stat-label {
        font-size: 0.75rem !important;
    }
    
    .apt-tech-card {
        padding: 15px 12px !important;
    }
    
    .apt-tech-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .apt-tech-icon img {
        width: 35px !important;
        height: 35px !important;
    }
}

/* ========================================
   TOUCH-FRIENDLY IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    /* Increase tap targets for better accessibility */
    .apt-tab-btn {
        min-height: 44px !important; /* Apple HIG recommendation */
        min-width: 44px !important;
    }
    
    .theme-btn, .btn {
        min-height: 44px !important;
        padding: 12px 20px !important;
    }
    
    /* Remove hover effects on mobile (no hover on touch screens) */
    .apt-tech-card:hover {
        transform: none !important;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08) !important;
    }
    
    /* Ensure clickable areas are large enough */
    a, button, input, select, textarea {
        min-height: 44px !important;
        min-width: 44px !important;
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* Disable parallax and heavy effects */
    .parallax-container, .parallax {
        transform: none !important;
        background-attachment: scroll !important;
    }
}
