/**
 * Downloads Page Styles - Professional Design
 * All4Business Theme - Downloads System
 */

/* Prevent horizontal scroll issues */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== DOWNLOADS HERO SECTION ===== */
.downloads-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ===== FEATURE HIGHLIGHTS ===== */
.downloads-features {
    margin: 2rem 0;
}

.feature-highlight {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-highlight:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.feature-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.feature-highlight:hover .feature-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.feature-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.4;
}

/* Responsive adjustments for features */
@media (max-width: 768px) {
    .feature-highlight {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    
    .feature-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .feature-title {
        font-size: 1.1rem;
    }
}

/* ===== STATISTICS DISPLAY ===== */
.downloads-stats {
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 100%;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Responsive adjustments for stats */
@media (max-width: 768px) {
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-item {
        padding: 1rem 0.5rem;
    }
}

.downloads-bg-animated {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.05) 100%);
    animation: downloadsFloat 20s ease-in-out infinite;
}

.downloads-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px, 200px 200px;
    animation: particleFloat 25s linear infinite;
}

.downloads-hero-content {
    position: relative;
    z-index: 2;
}

.downloads-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.downloads-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.downloads-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.downloads-stats {
    margin-bottom: 2rem;
}

.downloads-stats .stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.downloads-stats .stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.downloads-stats .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.downloads-stats .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes downloadsFloat {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    33% { transform: translateX(30px) translateY(-30px) rotate(120deg); }
    66% { transform: translateX(-20px) translateY(20px) rotate(240deg); }
}

@keyframes particleFloat {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(0) translateX(20px); }
    75% { transform: translateY(20px) translateX(10px); }
    100% { transform: translateY(0) translateX(0); }
}

/* ===== DOWNLOADS CONTROLS ===== */
.downloads-controls {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.search-box .input-group {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-box .input-group-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.25rem;
}

.search-box .form-control {
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    background: #f8f9fa;
}

.search-box .form-control:focus {
    background: white;
    box-shadow: none;
}

.filter-controls .form-select {
    border-radius: 15px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-controls .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102,126,234,0.25);
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.btn-category {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-category:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.3);
}

.btn-category.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

/* Empty category styling */
.btn-category.opacity-50 {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.btn-category.opacity-50:hover {
    opacity: 0.7;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    color: #6c757d;
}

.btn-category.opacity-50::after {
    content: " (empty)";
    font-size: 0.8em;
    color: #6c757d;
    font-weight: 400;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.scroll-indicator-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    backdrop-filter: blur(2px);
}

.scroll-indicator-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-text {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.scroll-main-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.scroll-sub-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    font-weight: 400;
}

.scroll-arrow-container {
    position: relative;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scroll-arrow {
    position: absolute;
    font-size: 1.2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow-2 {
    animation-delay: 0.2s;
    opacity: 0.7;
    transform: translateY(8px);
}

.scroll-arrow-3 {
    animation-delay: 0.4s;
    opacity: 0.4;
    transform: translateY(16px);
}

/* Scroll Animations */
@keyframes scrollPulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-5px);
        opacity: 0.8;
    }
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* Hover Effects */
.scroll-indicator:hover .scroll-indicator-content {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.scroll-indicator:hover .scroll-arrow {
    color: #667eea;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.scroll-indicator:hover .scroll-arrow-2 {
    transform: translateY(8px) scale(1.1);
}

.scroll-indicator:hover .scroll-arrow-3 {
    transform: translateY(16px) scale(1.1);
}

/* Click/Touch Effect */
.scroll-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .scroll-indicator {
        height: 100px;
    }
    
    .scroll-main-text {
        font-size: 1rem;
    }
    
    .scroll-sub-text {
        font-size: 0.8rem;
    }
    
    .scroll-arrow {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .scroll-indicator {
        height: 80px;
    }
    
    .scroll-main-text {
        font-size: 0.9rem;
    }
    
    .scroll-sub-text {
        font-size: 0.75rem;
    }
    
    .scroll-text {
        margin-bottom: 0.75rem;
    }
}

/* ===== DOWNLOADS GRID ===== */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    padding: 0 0 4rem 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.downloads-product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden; /* Back to hidden to prevent scroll issues */
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    border: 1px solid rgba(0,0,0,0.06);
}

.downloads-product-card:nth-child(1) { animation-delay: 0.1s; }
.downloads-product-card:nth-child(2) { animation-delay: 0.2s; }
.downloads-product-card:nth-child(3) { animation-delay: 0.3s; }
.downloads-product-card:nth-child(4) { animation-delay: 0.4s; }
.downloads-product-card:nth-child(5) { animation-delay: 0.5s; }
.downloads-product-card:nth-child(6) { animation-delay: 0.6s; }

.downloads-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: rgba(0,0,0,0.1);
}

.product-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== PRODUCT IMAGE ===== */
.product-image {
    position: relative;
    height: 80px;
    overflow: hidden; /* Keep image overflow hidden */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0; /* Match card border radius */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.downloads-product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.coming-soon-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255,193,7,0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 3;
}


/* ===== PRODUCT CONTENT ===== */
.product-content {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-header {
    margin-bottom: 0.5rem;
}

.product-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin-bottom: 0.4rem;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.4rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-description {
    color: #6c757d;
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: help;
}

/* Custom Bootstrap Tooltip Styling */
.tooltip {
    font-size: 0.8rem;
}

.tooltip-inner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    max-width: 300px !important;
    text-align: left !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #667eea !important;
}

/* Responsive tooltip adjustments */
@media (max-width: 768px) {
    .tooltip-inner {
        max-width: 250px !important;
        font-size: 0.75rem !important;
    }
}

/* ===== PRODUCT META COMPACT ===== */
.product-meta-compact {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.meta-badge.downloads {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    color: #155724;
    border-color: #c3e6cb;
}

.meta-badge.version {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border-color: #90caf9;
}

.meta-badge.date {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border-color: #ffcc02;
}

.meta-badge i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.meta-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== PRODUCT ACTIONS ===== */
.product-actions {
    margin-top: auto;
}

/* PayPal Pricing and Payment Styles */
.paid-product-actions {
    text-align: center;
    padding: 0.5rem 0;
}

.price-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 0.4rem;
}

/* Variants to reuse the same badge UI across modes */
.price-display--paid { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.price-display--free { background: #e9f7ef; color: #1e7e34; border: 1px solid #c3e6cb; }
.price-display--free .text-muted { color: #1e7e34 !important; opacity: 0.8; }
.price-display--soon { background: #f1f3f5; color: #495057; border: 1px solid #dee2e6; }
.price-display--soon .text-muted { color: #495057 !important; opacity: 0.8; }

.price-amount {
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    margin-right: 0.3rem;
}

.price-display small,
.price-display .text-muted {
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 0.65rem;
}

/* Override small text color for variants */
.price-display--free small,
.price-display--free .text-muted {
    color: #1e7e34 !important;
    opacity: 0.85;
}

.price-display--soon small,
.price-display--soon .text-muted {
    color: #495057 !important;
    opacity: 0.85;
}

.btn-paypal {
    background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 112, 186, 0.3);
}

.btn-paypal:hover {
    background: linear-gradient(135deg, #005ea6 0%, #002a6b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 186, 0.4);
    color: white;
}

.btn-paypal:disabled {
    background: #6c757d;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.paid-product-actions small {
    font-size: 11px;
    color: #6c757d;
    margin-top: 8px;
    display: block;
}

/* PayPal Button Container */
#paypal-button-container {
    margin: 15px 0;
}

/* Free vs Paid Product Indicators */
.downloads-product-card[data-product-type="paid"] {
    border: 2px solid #667eea;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

.downloads-product-card[data-product-type="paid"]::before {
    content: "💎 Premium";
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    z-index: 4;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.downloads-product-card[data-product-type="free"] {
    border: 2px solid #28a745;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%);
}

.downloads-product-card[data-product-type="free"]::before {
    content: "🆓 Free";
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    z-index: 4;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.download-input-group {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.download-input-group .form-control {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.download-input-group .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.15rem rgba(102,126,234,0.25);
}

.btn-download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
}

.btn-coming-soon {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
    grid-column: 1 / -1;
}

.empty-icon {
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* ===== ALERT STYLES ===== */
.alert {
    border-radius: 15px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .downloads-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .downloads-hero-title {
        font-size: 2.5rem;
    }
    
    .downloads-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .downloads-hero-section {
        padding: 4rem 0;
        margin-bottom: 3rem;
    }
    
    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .downloads-controls {
        padding: 1.5rem;
    }
    
    .category-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .btn-category {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .product-meta-compact {
        justify-content: center;
        gap: 0.375rem;
    }
    
    .meta-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    .downloads-hero-title {
        font-size: 2rem;
    }
    
    .downloads-hero-section {
        padding: 3rem 0;
        margin-bottom: 2rem;
    }
    
    .downloads-stats .stat-item {
        padding: 0.75rem;
    }
    
    .downloads-stats .stat-value {
        font-size: 1.5rem;
    }
    
    .product-meta-compact {
        justify-content: flex-start;
        gap: 0.25rem;
    }
    
    .meta-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
    
    .product-image {
        height: 100px;
    }
    
    .download-input-group {
        flex-direction: column;
    }
    
    .btn-download {
        width: 100%;
    }
    
    /* Adjust tooltip for mobile */
    .product-description::after {
        max-width: 250px;
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ===== LOADING STATES ===== */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
.btn:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.25);
}

/* ===== PRINT STYLES ===== */
@media print {
    .downloads-hero-section,
    .downloads-controls,
    .product-actions,
    .modal {
        display: none !important;
    }
    
    .downloads-product-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* ===== CUSTOM DEVELOPMENT SIDEBAR ===== */
.custom-dev-sidebar {
    padding: 2rem 0;
}

.custom-dev-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-dev-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.custom-dev-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.custom-dev-icon-small {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.2rem;
}

.custom-dev-title-small {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.custom-dev-subtitle-small {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.custom-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.service-item-small {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.service-item-small:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateX(3px);
}

.service-item-small i {
    font-size: 1rem;
    color: #667eea;
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.service-item-small span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
}

.custom-dev-cta-small {
    margin-bottom: 1.5rem;
}

.btn-custom-dev-small {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-custom-dev-small:hover {
    background: linear-gradient(135deg, #ee5a24 0%, #ff6b6b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    color: white;
    text-decoration: none;
}

.btn-outline-primary-small {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-outline-primary-small:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.custom-dev-badges {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.badge-item {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
}

.badge-item i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

/* Custom Development Sidebar Responsive */
@media (max-width: 992px) {
    .custom-dev-sidebar {
        padding: 1rem 0 0 0;
        margin-top: 2rem;
    }
    
    .custom-dev-card {
        padding: 1.5rem;
    }
    
    .custom-services-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .service-item-small {
        padding: 0.6rem;
    }
}

@media (max-width: 768px) {
    .custom-dev-title-small {
        font-size: 1.2rem;
    }
    
    .custom-dev-card {
        padding: 1.25rem;
    }
    
    .custom-dev-badges {
        flex-direction: column;
        gap: 0.5rem;
    }
}
