/**
 * Ngay Vang Uu Dai - Frontend Styles
 */

/* Banner Styles */
.nvud-banner {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ffd700 100%);
    border-radius: 16px;
    padding: 25px 30px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
}

.nvud-banner::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: nvud-shine 3s infinite;
}

@keyframes nvud-shine {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(25%, 25%); }
}

.nvud-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.nvud-banner-icon {
    font-size: 48px;
    animation: nvud-bounce 1s infinite;
}

@keyframes nvud-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.nvud-banner-content {
    flex: 1;
    min-width: 250px;
}

.nvud-banner-title {
    color: white;
    font-size: 20px;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nvud-banner-title strong {
    color: #fff9e6;
    font-size: 24px;
}

.nvud-banner-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 15px;
    margin-bottom: 15px;
}

.nvud-banner-badge {
    background: white;
    color: #ff6b35;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: nvud-pulse 2s infinite;
}

@keyframes nvud-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.nvud-badge-text {
    display: block;
    font-size: 16px;
}

.nvud-badge-icon {
    font-size: 20px;
}

/* Countdown Styles */
.nvud-countdown-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nvud-countdown-label {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.nvud-countdown {
    display: flex;
    gap: 5px;
    background: rgba(0,0,0,0.2);
    padding: 10px 15px;
    border-radius: 10px;
}

.nvud-countdown-item {
    text-align: center;
    min-width: 50px;
}

.nvud-countdown-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.nvud-countdown-unit {
    font-size: 11px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
}

.nvud-countdown-separator {
    font-size: 28px;
    color: white;
    font-weight: bold;
    line-height: 1;
}

/* Standalone Countdown */
.nvud-countdown-standalone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.nvud-countdown-timer span {
    font-weight: bold;
}

/* Courses Slider */
.nvud-courses-slider-container {
    position: relative;
    padding: 20px 0;
    margin: 20px 0;
}

.nvud-courses-slider {
    overflow: hidden;
    margin: 0 50px;
}

.nvud-slider-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 20px;
}

.nvud-course-card {
    flex: 0 0 280px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.nvud-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.nvud-course-image {
    position: relative;
    height: 160px;
    background: #f5f5f5;
    overflow: hidden;
}

.nvud-course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nvud-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 48px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.nvud-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(231,76,60,0.4);
}

.nvud-course-info {
    padding: 15px;
}

.nvud-course-title {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.4;
    height: 42px;
    overflow: hidden;
}

.nvud-course-title a {
    color: #333;
    text-decoration: none;
}

.nvud-course-title a:hover {
    color: #ff6b35;
}

.nvud-course-pricing {
    margin-bottom: 8px;
}

.nvud-original-price {
    color: #999;
    font-size: 13px;
}

.nvud-original-price del {
    text-decoration: line-through;
}

.nvud-sale-price {
    display: block;
    color: #e74c3c;
    font-size: 20px;
    font-weight: bold;
}

.nvud-course-savings {
    color: #27ae60;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.nvud-course-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #ff6b35, #f39c12);
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.3s;
}

.nvud-course-btn:hover {
    opacity: 0.9;
    color: white;
}

/* Slider Navigation */
.nvud-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    z-index: 10;
}

.nvud-slider-nav:hover {
    background: #ff6b35;
    color: white;
}

.nvud-prev {
    left: 0;
}

.nvud-next {
    right: 0;
}

.nvud-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.nvud-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s;
}

.nvud-slider-dot.active {
    background: #ff6b35;
    width: 30px;
    border-radius: 5px;
}

/* Homepage Popup */
.nvud-homepage-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    z-index: 9999;
    animation: nvud-slideIn 0.5s ease;
}

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

.nvud-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    z-index: 10;
}

/* Upcoming Banner */
.nvud-upcoming-banner {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
}

.nvud-upcoming-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.nvud-upcoming-icon {
    font-size: 24px;
}

.nvud-upcoming-text {
    font-size: 14px;
}

/* Product Page Discount Display */
.nvud-savings-badge {
    display: block;
    margin-top: 8px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .nvud-banner {
        padding: 20px;
    }

    .nvud-banner-inner {
        flex-direction: column;
        text-align: center;
    }

    .nvud-banner-icon {
        font-size: 36px;
    }

    .nvud-banner-title {
        font-size: 16px;
    }

    .nvud-banner-title strong {
        font-size: 20px;
    }

    .nvud-countdown-wrapper {
        justify-content: center;
    }

    .nvud-countdown-value {
        font-size: 22px;
    }

    .nvud-countdown-item {
        min-width: 40px;
    }

    .nvud-courses-slider {
        margin: 0 30px;
    }

    .nvud-course-card {
        flex: 0 0 240px;
    }

    .nvud-homepage-popup {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .nvud-countdown-separator {
        font-size: 20px;
    }

    .nvud-countdown-value {
        font-size: 18px;
    }

    .nvud-course-card {
        flex: 0 0 200px;
    }
}
