/**
 * Sub Series Mobile CSS - Native App Experience
 * Purpose: Complete mobile transformation for sub-series pages
 * Version: 1.0.0
 * Created: 2025-01-15
 */

/* ===================================
   SUB SERIES MOBILE SPECIFIC STYLES
   =================================== */

.sub-series-mobile-container {
    padding: 0;
    padding-bottom: 100px; /* Space for bottom navigation */
    max-width: 100%;
    margin: 0 auto;
}

/* Enhanced mobile header for sub-series */
.sub-series-mobile-header {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.sub-series-mobile-header .breadcrumb-nav {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.sub-series-mobile-header .breadcrumb-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sub-series-mobile-header .breadcrumb-nav a:hover {
    color: white;
}

/* Enhanced stats grid */
.sub-series-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem;
    margin-bottom: 1.5rem;
}

.sub-series-stat-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.sub-series-stat-card:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.sub-series-stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.sub-series-stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced mobile cards */
.sub-series-mobile-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sub-series-mobile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.15);
}

.sub-series-mobile-card .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.sub-series-mobile-card .card-body {
    padding: 1.5rem;
}

.sub-series-mobile-card .card-footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem;
}

/* Enhanced buttons */
.sub-series-mobile-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 1.25rem 2rem;
    color: white;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0.5rem 0;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.sub-series-mobile-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sub-series-mobile-btn:hover::before {
    left: 100%;
}

.sub-series-mobile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.sub-series-mobile-btn-secondary {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sub-series-mobile-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Enhanced test grid */
.sub-series-test-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .sub-series-test-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Enhanced test cards */
.sub-series-test-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.sub-series-test-card:active {
    transform: scale(0.98);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.sub-series-test-card .test-card-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: none;
}

.sub-series-test-card .test-card-body {
    padding: 1rem 1.5rem;
}

.sub-series-test-card .test-card-footer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.sub-series-test-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-series-test-description {
    font-size: 14px;
    color: #64748b;
    margin: 0.5rem 0;
    line-height: 1.4;
}

/* Enhanced badges */
.sub-series-mobile-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    gap: 4px;
}

.sub-series-mobile-badge.complete {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.sub-series-mobile-badge.featured {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Enhanced test stats */
.sub-series-test-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.sub-series-test-stat {
    text-align: center;
    flex: 1;
}

.sub-series-test-stat .stat-number {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #3b82f6;
    line-height: 1;
}

.sub-series-test-stat .stat-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Enhanced empty state */
.sub-series-empty-state {
    padding: 3rem 2rem;
    text-align: center;
}

.sub-series-empty-state .empty-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.sub-series-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
}

.sub-series-empty-description {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Enhanced purchase section */
.sub-series-purchase-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 24px;
    padding: 2rem;
    margin: 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.sub-series-purchase-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.sub-series-purchase-price {
    font-size: 2.5rem;
    font-weight: 900;
    color: #059669;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.sub-series-purchase-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Enhanced animations */
@keyframes sub-series-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-series-fade-in-up {
    animation: sub-series-fadeInUp 0.6s ease-out;
}

.sub-series-fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.sub-series-fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.sub-series-fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.sub-series-fade-in-up:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced loading states */
.sub-series-loading-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: sub-series-skeleton-loading 1.5s infinite;
    border-radius: 12px;
    height: 20px;
    margin-bottom: 1rem;
}

@keyframes sub-series-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 480px) {
    .sub-series-mobile-container {
        padding-bottom: 90px;
    }
    
    .sub-series-stats-grid {
        margin: 0.75rem;
        gap: 0.75rem;
    }
    
    .sub-series-stat-card {
        padding: 1rem 0.75rem;
    }
    
    .sub-series-stat-number {
        font-size: 1.5rem;
    }
    
    .sub-series-mobile-card {
        margin: 0.75rem;
        border-radius: 20px;
    }
    
    .sub-series-mobile-card .card-header,
    .sub-series-mobile-card .card-body,
    .sub-series-mobile-card .card-footer {
        padding: 1.25rem;
    }
    
    .sub-series-mobile-btn {
        padding: 1rem 1.5rem;
        font-size: 15px;
    }
    
    .sub-series-test-grid {
        gap: 1rem;
    }
    
    .sub-series-test-stats {
        gap: 0.75rem;
    }
}

/* ===================================
   DARK MODE SUPPORT
   =================================== */

@media (prefers-color-scheme: dark) {
    .sub-series-mobile-card {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .sub-series-mobile-card .card-header {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-bottom-color: #334155;
    }
    
    .sub-series-mobile-card .card-footer {
        background: #1e293b;
        border-top-color: #334155;
    }
    
    .sub-series-test-title {
        color: #f1f5f9;
    }
    
    .sub-series-test-description {
        color: #94a3b8;
    }
    
    .sub-series-empty-title {
        color: #f1f5f9;
    }
    
    .sub-series-empty-description {
        color: #94a3b8;
    }
    
    .sub-series-test-card {
        background: #1e293b;
        border-color: #334155;
    }
    
    .sub-series-purchase-section {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: #334155;
    }
    
    .sub-series-loading-skeleton {
        background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    }
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .sub-series-mobile-btn,
    .sub-series-mobile-card,
    .sub-series-stat-card,
    .sub-series-test-card {
        transition: none;
        animation: none;
    }
    
    .sub-series-mobile-btn::before {
        display: none;
    }
    
    .sub-series-loading-skeleton {
        animation: none;
        background: #f1f5f9;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .sub-series-mobile-card {
        border-width: 2px;
        border-color: #000;
    }
    
    .sub-series-mobile-btn {
        border: 2px solid #000;
    }
    
    .sub-series-test-card {
        border-width: 2px;
        border-color: #000;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .sub-series-mobile-header,
    .sub-series-mobile-btn,
    .sub-series-mobile-btn-secondary {
        display: none !important;
    }
    
    .sub-series-mobile-card {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .sub-series-test-card {
        box-shadow: none;
        border: 1px solid #000;
        break-inside: avoid;
    }
}
