/* Premium Dashboard Styles - Nepal Municipal Training Portal */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --info-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --dark-gradient: linear-gradient(135deg, #434343 0%, #000000 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Glassmorphism Effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-glass);
}

/* Premium Gradient Cards */
.premium-card {
    background: var(--primary-gradient);
    border-radius: 20px;
    padding: 25px;
    color: white;
    box-shadow: var(--shadow-premium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translate(-30%, -30%) rotate(0deg); }
    100% { transform: translate(30%, 30%) rotate(360deg); }
}

.premium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.premium-card.success {
    background: var(--success-gradient);
}

.premium-card.warning {
    background: var(--warning-gradient);
}

.premium-card.info {
    background: var(--info-gradient);
}

.premium-card.dark {
    background: var(--dark-gradient);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 80vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Animated Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    box-shadow: var(--shadow-premium);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.stats-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stats-card .counter {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.stats-card .icon {
    font-size: 3rem;
    opacity: 0.8;
}

/* Training Cards */
.training-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: all 0.3s ease;
    border: none;
}

.training-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.training-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.training-card:hover .card-img-top {
    transform: scale(1.1);
}

.training-card .card-body {
    padding: 25px;
}

.training-card .badge {
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: 600;
}

/* Countdown Timer */
.countdown-timer {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    display: inline-block;
    font-weight: 700;
}

.countdown-timer .time-unit {
    display: inline-block;
    margin: 0 10px;
    text-align: center;
}

.countdown-timer .time-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.countdown-timer .time-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Progress Bar */
.progress-custom {
    height: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.progress-custom .progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Search Box */
.search-box {
    background: white;
    border-radius: 50px;
    padding: 15px 30px;
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1.1rem;
}

.search-box button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-box button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-pill {
    padding: 10px 25px;
    border-radius: 50px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

.timeline-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow-premium);
    width: 45%;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

/* Floating Widgets */
.floating-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-widget .widget-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.floating-widget .widget-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 9999;
}

.toast-custom {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-premium);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Accessibility Controls */
.accessibility-controls {
    position: fixed;
    top: 100px;
    left: 30px;
    z-index: 1000;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-premium);
}

.accessibility-controls .control-btn {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.accessibility-controls .control-btn:hover {
    background: var(--primary-gradient);
    color: white;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1a2e;
    color: #eee;
}

body.dark-mode .premium-card {
    background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
}

body.dark-mode .training-card {
    background: #2d2d44;
    color: #eee;
}

body.dark-mode .search-box {
    background: #2d2d44;
    color: #eee;
}

/* High Contrast */
body.high-contrast {
    filter: contrast(1.5);
}

/* Responsive */
@media (max-width: 768px) {
    .stats-card {
        padding: 20px;
    }
    
    .stats-card .counter {
        font-size: 2rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item::before {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 50px);
        margin-left: 50px !important;
    }
    
    .floating-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .accessibility-controls {
        top: 80px;
        left: 20px;
    }
}

/* Loading Animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notice Cards */
.notice-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow-premium);
    border-left: 5px solid #667eea;
    transition: all 0.3s ease;
}

.notice-card:hover {
    transform: translateX(10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.notice-card.urgent {
    border-left-color: #f5576c;
}

.notice-card.important {
    border-left-color: #fee140;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* Testimonial Card */
.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-premium);
    text-align: center;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 5rem;
    color: rgba(102, 126, 234, 0.1);
    font-family: Georgia, serif;
}

.testimonial-card .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid var(--primary-gradient);
}

/* Calendar */
.calendar-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-premium);
}

.calendar-card .calendar-day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-card .calendar-day:hover {
    background: var(--primary-gradient);
    color: white;
}

.calendar-card .calendar-day.active {
    background: var(--primary-gradient);
    color: white;
}

.calendar-card .calendar-day.has-event {
    position: relative;
}

.calendar-card .calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #f5576c;
    border-radius: 50%;
}

/* Download Card */
.download-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.download-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* PWA Install Button */
.pwa-install-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pwa-install-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Announcement Ticker */
.announcement-ticker {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 0;
    overflow: hidden;
}

.announcement-ticker .ticker-content {
    display: flex;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Success Story Card */
.success-story-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    transition: all 0.3s ease;
}

.success-story-card:hover {
    transform: translateY(-10px);
}

.success-story-card .before-after {
    display: flex;
    gap: 10px;
}

.success-story-card .before-after img {
    width: 50%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

/* Certificate Verification */
.verification-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
    max-width: 500px;
    margin: 0 auto;
}

.verification-card .verified {
    border: 3px solid #4facfe;
}

.verification-card .invalid {
    border: 3px solid #f5576c;
}

/* QR Scanner */
.qr-scanner {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-premium);
    max-width: 400px;
    margin: 0 auto;
}

.qr-scanner #reader {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
}
