@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    font-family: 'Kanit', sans-serif;
}
    body {
        background-image: url('../images/ovz.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
        min-height: 100vh;

    }
    
@media only screen and (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-repeat: repeat-y;
        background-size: 100% auto;
        background-position: center top;
        position: relative;
    }
    
    /* สร้าง overlay เพื่อเบลอรอยต่อ */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: repeating-linear-gradient(
            to bottom,
            transparent 0vh,
            transparent 85vh,
            rgba(255,255,255,0.4) 90vh,
            rgba(255,255,255,0.6) 95vh,
            rgba(255,255,255,0.4) 100vh,
            transparent 105vh,
            transparent 190vh
        );
        pointer-events: none;
        z-index: -1;
    }
}

/* สำหรับมือถือเล็กมาก */
@media only screen and (max-width: 480px) {
    body {
        background-repeat: repeat-y;
        background-size: 100% auto;
        background-position: center top;
    }
    
    body::before {
        background: repeating-linear-gradient(
            to bottom,
            transparent 0vh,
            transparent 80vh,
            rgba(255,255,255,0.5) 85vh,
            rgba(255,255,255,0.7) 90vh,
            rgba(255,255,255,0.5) 95vh,
            transparent 100vh,
            transparent 180vh
        );
    }
}
        .bg-light1 {
            background-color: #cecece17 !important;
        }
        .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
.navbar-toggler {
    border: none !important;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}
.animated-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #ff9a02, #750704);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback for browsers not supporting background-clip */
}

/* Gradient animation for Font Awesome icons */
.icon-animated-gradient {
    color: #ee7752; /* Fallback color */
    animation: iconColorShift 4s ease infinite;
}
.main-nav {
   background: linear-gradient(180deg, #e11d48 0%, #92030fff 100%) !important;
    /* หรือใช้ gradient แนวนอน */
    /* background: linear-gradient(90deg, #dc2626 0%, #7f1d1d 100%) !important; */
    
    /* หรือใช้ gradient แนวตั้ง */
    /* background: linear-gradient(180deg, #dc2626 0%, #7f1d1d 100%) !important; */
    
    /* เพิ่ม shadow เพื่อความสวยงาม */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-nav {
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* สำหรับ responsive */

        .nav-link {
            transition: all 0.3s ease;
            border-radius: 20px;
            padding: 6px 12px !important;
            margin: 0 2px;
        }
        
        .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.1);
            text-decoration: none !important;
            transform: translateY(-1px);
        }
        
        .navbar-text a {
            transition: all 0.3s ease;
            border-radius: 20px;
            padding: 6px 12px;
            margin: 0 2px;
        }
        
        .navbar-text a:hover {
            background-color: rgba(255, 255, 255, 0.1);
            text-decoration: none !important;
            transform: translateY(-1px);
        }
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes iconColorShift {
    0% {
        color: #ee7752;
    }
    25% {
        color: #e73c7e;
    }
    50% {
        color: #ff9a02;
    }
    75% {
        color: #750704;
    }
    100% {
        color: #ee7752;
    }
}

/* Ensure fa-bounce animation is not overridden */
.fas.fa-bounce {
    animation: fa-bounce 1s infinite !important;
}

.decorative-line {
    width: 100px;
    height: 1px;
    margin: -6px 25px;
}   

.more-button {
    background-color: rgb(207, 8, 8);
    border: none;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
}

.container-description {
    background-color: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(150, 6, 6, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: -8px -12px;
}

.card-tag {
    background-color: rgba(255, 255, 255, 1);
    border: 1px solid rgba(150, 6, 6, 0.2);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    margin: -30px -10px -18px;
    display: inline-block;
    width: fit-content;
}

.card-top {
    position: relative;
    margin: -23px -1px -5px;
}

/* สำหรับจัดเรียง Price และ Status */
.price-status-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.price-section {
    flex: 1;
}

.status-section {
    flex: 1;
    text-align: right;
}

.price-label {
    font-size: 14px;
    color: #4a4a4a;
    margin-top: -0.5rem;
    margin-left: -1px;
    line-height: 1.3;
    margin-bottom: -0.5rem;
    font-weight: 500;
}

/* .price {
    font-size: 16px;
    color: #d40816;
    margin-top: 0.3rem;
    margin-left: -1px;
    line-height: 1.3;
    font-weight: 600;
} */

    .price {
    font-size: 20px;
    color: #d40816;
    margin-top: 0.3rem;
    margin-left: -1px;
    line-height: 1.3;
    font-weight: 600;
}
/* เพิ่ม CSS ที่ขาดหายไป */
.status-label {
    font-size: 14px;
    color: #4a4a4a;
    margin-top: -0.5rem;
    margin-right: -1px;
    line-height: 1.3;
    margin-bottom: -0.5rem;
    font-weight: 500;
}

.status {
    font-size: 16px;
    color: #28a745; /* สีเขียวสำหรับสถานะ */
    margin-top: 0.3rem;
    margin-right: -1px;
    line-height: 1.3;
    font-weight: 500;
}

/* ทางเลือกอื่น - ใช้ inline-flex เพื่อให้แน่ใจว่าอยู่บรรทัดเดียวกัน */
.price-status-inline {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.price-section-inline, .status-section-inline {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.status-section-inline {
    align-items: flex-end;
}

.details {
    background: linear-gradient(90deg, #e11d48 0%, #92030fff 100%) !important;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    margin: 2px auto -18px;
    display: block;
    width: fit-content;
    text-align: center;
    font-weight: 700;
}

.bg-container {
    width: 100%;
    padding: 20px;
    margin: 0 auto;
    border-radius: 50px;
    background-color: #f7f7f7;
    margin-bottom: 20px;
}

.card-img-top {
    border-radius: 10px;
}

/* Media Query สำหรับหน้าจอเล็ก */
@media (max-width: 768px) {
    .price-label {
        font-size: 10px;
    }
    .status-label {
        font-size: 10px;
    }
    .price {
        font-size: 14px;
    }
    .status {
        font-size: 10px;
    }
    .container-description {
        padding: 15px;
        margin: -8px -8px; /* ลด margin ในหน้าจอเล็ก */
    }
    .price-status-container {
        gap: 5px; /* ลดช่องว่างในหน้าจอเล็ก */
    }
        .id-number {
          padding: 3px;
        font-size: 12px;
        line-height: 1.3;
        font-weight: 500;
    }
    .card-tag {
        padding: 3px 6px;
     
        font-size: 12px;
        line-height: 1.3;
        font-weight: 500;
        border: 1px solid rgba(150, 6, 6, 0.2);
        border-radius: 10px;
        background-color: rgba(255, 255, 255, 1);
        margin: 8px -8px 2px;
    }
    .details {
    background: linear-gradient(180deg, #92030fff 0%, #e11d48 100%) !important;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 7px;
    border-radius: 10px;
    font-size: 12px;
    margin: 8px auto -18px;
    display: block;
    width: fit-content;
    text-align: center;
    font-weight: 700;
}
}

/* Media Query สำหรับหน้าจอเล็กมาก */
@media (max-width: 480px) {
    .container-description {
        padding: 10px;
        margin: -8px -6px;
    }
    .price-status-container {
        gap: 3px;
    }
    .price-section,
    .status-section {
        flex: 1;
        min-width: 0;
    }
    .price-label,
    .status-label {
        font-size: 12px;
    }
    .price,
    .status {
        font-size: 13px;
    }
    .id-number {
        padding: 3px;
        font-size: 12px;
        line-height: 1.3;
        font-weight: 500;
    }
    .container-description {
        padding: 10px;
        margin: -8px -6px;
        font-size: 10px;
    }
}

.responsive-text {
    font-size: clamp(12px, 2.5vw, 16px);
    /* เพิ่ม overflow protection */
    overflow: hidden;
    text-overflow: ellipsis;
}

  .item {
            transition: all 0.3s ease;
        }
        
        .item:hover {
            transform: translateY(-5px);
        }
        
        .thumb {
            border-radius: 15px;
             aspect-ratio: 1 / 1;
            overflow: hidden;
            margin-bottom: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }
        
        .thumb:hover {
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        }
        
        .thumb img {
          width: 100%;
            height: 100%;
            object-fit: cover; /* รักษาอัตราส่วนและครอบคลุมพื้นที่ */
            object-position: center; /* จัดกึ่งกลาง */
        }
        
        .thumb:hover img {
            transform: scale(1.05);
        }
        
        .game-link {
            text-decoration: none;
            color: inherit;
            display: block;
        }
        
        .game-link:hover {
            text-decoration: none;
            color: inherit;
        }
        
        .category:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        } /* Article Section Styles */
        .article-card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
            border: none;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
            position: relative;
            overflow: hidden;
            border: 2px solid #f1f5f9;
        }

        .article-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, rgba(225, 29, 72, 0.03) 0%, rgba(146, 3, 15, 0.03) 100%);
            pointer-events: none;
        }

        .article-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
            border-color: #e11d48;
        }

        .article-image-container {
            position: relative;
            overflow: hidden;
        }

        .article-image {
            width: 100%;
            height: 200px;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .article-card:hover .article-image {
            transform: scale(1.05);
        }

        .article-overlay {
            position: absolute;
            top: 15px;
            left: 15px;
            z-index: 2;
        }

        .article-category {
            background: linear-gradient(45deg, #e11d48, #be185d);
            color: #ffffff;
            padding: 8px 16px;
            border-radius: 25px;
            font-size: 0.85rem;
            font-weight: 700;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
            box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.9);
        }

        .article-title {
            color: #1f2937;
            font-weight: 500;
            font-size: 16px;
            margin-bottom: -18px;
            line-height: 1.4;
            min-height: 50px;
            text-shadow: none;
            background: linear-gradient(45deg, #1f2937, #374151);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .article-excerpt {
            color: #4b5563;
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 10px;
            min-height: 60px;
            text-shadow: none;
            background: rgba(248, 250, 252, 0.8);
            padding: 12px;
            border-radius: 10px;
            border-left: 4px solid #e11d48;
            border: 1px solid #e5e7eb;
        }

        .article-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 18px;
            font-size: 0.85rem;
            color: #6b7280;
            background: #f9fafb;
            padding: 10px 15px;
            border-radius: 20px;
            border: 1px solid #e5e7eb;
        }

        .article-date,
        .article-read-time {
            display: flex;
            align-items: center;
            gap: 6px;
            font-weight: 600;
        }

        .article-date i,
        .article-read-time i {
            color: #e11d48;
            font-size: 0.9rem;
        }

        .article-link {
            background: linear-gradient(45deg, #e11d48, #be185d);
            color: #ffffff;
            text-decoration: none;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.3s ease;
            padding: 5px 10px;
            border-radius: 25px;
            box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
            border: 2px solid rgba(255, 255, 255, 0.9);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            position: relative;
            overflow: hidden;
        }

        .article-link::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s ease;
        }

        .article-link:hover::before {
            left: 100%;
        }

        .article-link:hover {
            color: #ffffff;
            text-decoration: none;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(225, 29, 72, 0.4);
            background: linear-gradient(45deg, #be185d, #92030fff);
        }

        .article-link i {
            transition: transform 0.3s ease;
            font-size: 0.9rem;
        }

        .article-link:hover i {
            transform: translateX(5px);
        }

        .card-body {
            position: relative;
            z-index: 2;
            padding: 20px;
        }

        /* Mobile Responsive - Compact Layout */
        @media (max-width: 768px) {
            .article-card {
                transform: none !important;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
            }
            
            .article-card:hover {
                transform: none !important;
                box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12) !important;
            }
            
            .article-image {
                height: 140px;
            }
            
            .article-category {
                font-size: 0.7rem;
                padding: 4px 8px;
            }
            
            .article-title {
                font-size: 0.85rem;
                min-height: auto;
                margin-bottom: 8px;
                line-height: 1.3;
            }
            
            .article-excerpt {
                font-size: 0.75rem;
                min-height: auto;
                padding: 8px;
                margin-bottom: 8px;
                line-height: 1.4;
            }
            
            .article-meta {
                font-size: 0.7rem;
                padding: 6px 10px;
                margin-bottom: 12px;
            }
            
            .article-date i,
            .article-read-time i {
                font-size: 0.7rem;
            }
            
            .article-link {
                font-size: 0.7rem;
                padding: 4px 8px;
                gap: 4px;
            }
            
            .article-link i {
                font-size: 0.7rem;
            }
            
            .card-body {
                padding: 12px;
            }
            
            .article-overlay {
                top: 8px;
                left: 8px;
            }
        }

        /* Extra small screens */
        @media (max-width: 576px) {
            .article-image {
                height: 120px;
            }
            
            .article-title {
                font-size: 0.8rem;
            }
            
            .article-excerpt {
                font-size: 0.7rem;
                padding: 6px;
            }
            
            .article-meta {
                font-size: 0.65rem;
                padding: 4px 8px;
            }
            
            .article-category {
                font-size: 0.65rem;
                padding: 3px 6px;
            }
            
            .article-link {
                font-size: 0.65rem;
                padding: 3px 6px;
            }
            
            .card-body {
                padding: 10px;
            }
        }
        
.service-card,
.benefits-banner {
    font-family: 'Kanit', sans-serif;
}

.animated-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #ff9a02, #750704);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.icon-animated-gradient {
    color: #e11d48;
    animation: iconColorShift 4s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes iconColorShift {
    0% { color: #ee7752; }
    25% { color: #e73c7e; }
    50% { color: #ff9a02; }
    75% { color: #750704; }
    100% { color: #ee7752; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


        .service-card {
            background: var(--pure-white);
            border: 1px solid var(--border-gray);
            border-radius: 20px;
            padding: 2.5rem 2rem;
            text-align: center;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .service-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
            transition: height 0.3s ease;
        }

        .service-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(220, 53, 69, 0.1);
            border-color: var(--light-red);
        }

        .service-card:hover::before {
            height: 8px;
        }

        .service-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, var(--light-red), rgba(220, 53, 69, 0.1));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.5rem;
            transition: all 0.3s ease;
        }

        .service-card:hover .service-icon {
            background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
            transform: scale(1.1);
        }

        .service-icon i {
            font-size: 2rem;
            color: var(--primary-red);
            transition: color 0.3s ease;
        }

        .service-card:hover .service-icon i {
            color: var(--pure-white);
        }

        .service-title {
            color: #2c3e50;
            font-weight: 700;
            margin-bottom: 1rem;
            font-size: 1.25rem;
        }

        .service-description {
            color: var(--medium-gray);
            line-height: 1.6;
            margin-bottom: 1.5rem;
            font-size: 0.95rem;
        }

        .service-highlight {
            background: var(--light-red);
            color: var(--primary-red);
            padding: 0.75rem 1.25rem;
            border-radius: 25px;
            font-weight: 600;
            font-size: 0.9rem;
            border: 1px solid rgba(220, 53, 69, 0.2);
            transition: all 0.3s ease;
        }

        .service-card:hover .service-highlight {
            background: var(--primary-red);
            color: var(--pure-white);
            transform: scale(1.05);
        }

        .service-highlight i {
            margin-right: 0.5rem;
        }

        /* Subtle animations */
        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-5px); }
        }

        .service-card:nth-child(1) .service-icon {
            animation: float 6s ease-in-out infinite;
        }

        .service-card:nth-child(2) .service-icon {
            animation: float 6s ease-in-out infinite 1.5s;
        }

        .service-card:nth-child(3) .service-icon {
            animation: float 6s ease-in-out infinite 3s;
        }

        .service-card:nth-child(4) .service-icon {
            animation: float 6s ease-in-out infinite 4.5s;
        }

        /* Alternative card styles for variety */
        .service-card:nth-child(even) {
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .service-card {
                padding: 2rem 1.5rem;
            }
            
            .service-icon {
                width: 70px;
                height: 70px;
            }
            
            .service-icon i {
                font-size: 1.75rem;
            }
        }

         /* Bottom Navigation Styles */
        .mobile-bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(180deg, #92030fff 0%, #e11d48 100%) !important;
            display: flex;
            justify-content: space-around;
            align-items: center;
            padding: 8px 0 15px 0;
            box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.3);
            z-index: 9999;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            transition: none !important;
            transform: translateY(0) !important;
        }

        /* Hide on desktop */
        @media (min-width: 769px) {
            .mobile-bottom-nav {
                display: none;
            }
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-decoration: none;
            color: rgba(255, 255, 255, 0.7);
            transition: all 0.3s ease;
            position: relative;
            padding: 5px 8px;
            border-radius: 12px;
            min-width: 50px;
        }

        .nav-item:hover, 
        .nav-item:focus {
            text-decoration: none;
            color: #ffffff;
            transform: translateY(-2px);
        }

        .nav-item.active {
            color: #ffffff;
            background: rgba(255, 255, 255, 0.15);
        }

        .nav-item.active::before {
            content: '';
            position: absolute;
            top: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 4px;
            height: 4px;
            background: #ffffff;
            border-radius: 50%;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
        }

        .nav-icon {
            font-size: 20px;
            margin-bottom: 3px;
            transition: all 0.3s ease;
        }

        .nav-item:hover .nav-icon {
            transform: scale(1.1);
        }

        .nav-text {
            font-size: 10px;
            font-weight: 500;
            line-height: 1.2;
            text-align: center;
            white-space: nowrap;
        }

        /* Add bottom padding to body to prevent content overlap */
        @media (max-width: 768px) {
            body {
                padding-bottom: 70px;
            }
        }

        /* Notification badge */
        .nav-item .badge {
            position: absolute;
            top: 0;
            right: 8px;
            background: #ff4757;
            color: white;
            border-radius: 10px;
            padding: 2px 6px;
            font-size: 10px;
            font-weight: bold;
            min-width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        /* Responsive adjustments */
        @media (max-width: 480px) {
            .nav-text {
                font-size: 9px;
            }
            
            .nav-icon {
                font-size: 18px;
            }
            
            .nav-item {
                padding: 4px 6px;
                min-width: 45px;
            }
        }

        /* Animation for active state */
        @keyframes bounce {
            0%, 20%, 60%, 100% {
                transform: translateY(0);
            }
            40% {
                transform: translateY(-3px);
            }
            80% {
                transform: translateY(-1px);
            }
        }

        .nav-item.active .nav-icon {
            animation: bounce 0.6s ease-in-out;
        }

      /* Navigation Bar Styles */
      
        .navbar-brand img {
            transition: transform 0.3s ease;
        }

        .navbar-brand:hover img {
            transform: scale(1.05);
        }

        /* Overlay สำหรับปิดเมนู - ใช้เฉพาะมือถือ */
        .menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            backdrop-filter: blur(3px);
            display: none;
        }

        .menu-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* Sidebar ที่โผล่จากด้านขวา - ใช้เฉพาะมือถือ */
        .side-navbar {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            max-width: 100vw;
            height: 100vh;
            background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
            z-index: 1999;
            transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
            overflow-y: auto;
            display: none;
        }

        .side-navbar.active {
            right: 0;
        }

        /* Header ของ sidebar */
        .side-navbar-header {
            background: linear-gradient(180deg, #e11d48 0%, #92030fff 100%) !important;
            color: white;
            padding: 28px;
            position: relative;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .close-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: rotate(90deg);
        }

        /* เมนูรายการใน sidebar */
        .side-navbar-menu {
            padding: 0;
            margin: 0;
            list-style: none;
        }

        .side-nav-item {
            border-bottom: 1px solid #f0f0f0;
            transition: all 0.3s ease;
        }

        .side-nav-item:hover {
            background: linear-gradient(90deg, rgba(220, 53, 69, 0.05) 0%, transparent 100%);
            border-left: 4px solid #dc3545;
       
        }

        .side-nav-link {
            display: flex;
            align-items: center;
            padding: 20px 25px;
            color: #333;
            text-decoration: none;
            transition: all 0.3s ease;
            gap: 15px;
            font-weight: 500;
        }

        .side-nav-link:hover {
            color: #dc3545;
            padding-left: 35px;
        }

        .side-nav-link svg {
            transition: all 0.3s ease;
        }

        .side-nav-link:hover svg {
            transform: scale(1.2);
        }

        /* ส่วนปุ่มเข้าสู่ระบบ */
        .sidebar-auth-section {
            padding: 25px;
            border-top: 1px solid #e9ecef;
            margin-top: 20px;
        }

        .auth-buttons {
            display: flex;
            flex-direction: row;
            gap: 15px;
            justify-content: center;
            align-items: center;
        }

        .auth-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 12px 20px;
            border-radius: 25px;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            width: fit-content;
            white-space: nowrap;
        }

        .login-btn {
            background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
            color: white;
            border: 2px solid #dc3545;

        }

        .login-btn:hover {
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
        }

        .register-btn {
            background: white;
            color: #dc3545;
            border: 2px solid #dc3545;
        }

        .register-btn:hover {
            background: #dc3545;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
        }

        /* สำหรับหน้าจอขนาดเล็ก */
        @media (max-width: 480px) {
            .auth-buttons {
            flex-direction: row;
            gap: 8px;
            justify-content: center;
            }
            
            .auth-btn {
            padding: 8px 16px;
            font-size: 12px;
            width: auto;
            max-width: 120px;
            white-space: nowrap;
            }
            
            .side-navbar {
            width: 100vw; /* ให้เต็มความกว้างหน้าจอ */
            }
            
     
            
            .close-btn {
            top: 15px;
            right: 15px;
            width: 35px;
            height: 35px;
            }
            
            .side-nav-link {
            padding: 18px 20px; /* ลด padding เล็กน้อย */
            font-size: 14px;
            }
            
            .sidebar-auth-section {
            padding: 20px 15px;
            }
        }

        /* เนื้อหาหลักของหน้า */
        .main-content {
            margin-top: 120px;
            padding: 40px 20px;
        }

        .hero-section {
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            border-radius: 20px;
            padding: 60px 40px;
            text-align: center;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
            margin-bottom: 40px;
        }

        .hero-section h1 {
            color: #dc3545;
            font-weight: bold;
            margin-bottom: 20px;
        }



        /* Responsive - แสดง sidebar เฉพาะในมือถือ */
        @media (max-width: 991px) {
            .menu-overlay,
            .side-navbar {
                display: block !important;
            }
            
            /* ซ่อน Bootstrap collapse ในมือถือ */
            .navbar-collapse {
                display: none !important;
            }
            
            .hero-section {
                padding: 40px 20px;
            }
            
            /* ให้ sidebar เต็มหน้าจอในมือถือ */
            .side-navbar {
                width: 100%;
                max-width: 100vw;
            }
        }

        /* สำหรับหน้าจอขนาดเล็กมาก */
        @media (max-width: 575px) {
            .hero-section {
                padding: 30px 15px;
            }
            
            .main-content {
                margin-top: 100px;
                padding: 20px 10px;
            }
        }

        @media (min-width: 992px) {
            .menu-overlay,
            .side-navbar {
                display: none !important;
            }
            
            /* แสดง Bootstrap collapse ในหน้าจอใหญ่ */
            .navbar-collapse {
                display: flex !important;
            }
        }

        /* Animation เมื่อโหลดหน้า */
        @keyframes slideInFromTop {
            from {
                transform: translateY(-100px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .main-nav {
            animation: slideInFromTop 0.6s ease-out;
        }
        


        /* sweetalert-custom.css - Custom SweetAlert และ Toast Styles */

/* Custom SweetAlert Button Styles */
.swal-button.btn-confirm {
    background: linear-gradient(180deg, #e11d48 0%, #92030fff 100%) !important;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.swal-button.btn-confirm:hover {
    background: linear-gradient(180deg, #92030fff 100%, #e11d48 0%); 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

.swal-button.btn-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.swal-button.btn-cancel:hover {
    background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

/* Custom SweetAlert Modal Styles */
.swal-modal {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: none;
    overflow: hidden;
}

.swal-title {
    color: #1f2937;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.swal-text {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.swal-icon {
    margin-bottom: 20px;
}

.swal-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}
  .swal-text {
        font-size: 20px;
    }
/* Toast Notification Styles */
.custom-toast {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    align-items: center;
    min-width: 300px;
    max-width: 500px;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-content i {
    font-size: 1.2rem;
    opacity: 0.9;
}

.toast-content span {
    font-size: 14px;
    line-height: 1.4;
}

/* Success Toast */
.toast-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-left: 4px solid #1e7e34;
}

/* Error Toast */
.toast-error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    border-left: 4px solid #bd2130;
}

/* Info Toast */
.toast-info {
    background: linear-gradient(135deg, #17a2b8 0%, #3498db 100%);
    border-left: 4px solid #138496;
}

/* Warning Toast */
.toast-warning {
    background: linear-gradient(135deg, #ffc107 0%, #f39c12 100%);
    border-left: 4px solid #d39e00;
    color: #212529;
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .swal-modal {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .swal-title {
        font-size: 1.2rem;
    }
    
    .swal-text {
        font-size: 0.9rem;
    }
    
    .swal-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .custom-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Animation keyframes */
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Custom SweetAlert overlay */
.swal-overlay {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

/* Focus styles for accessibility */
.swal-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .swal-modal {
        border: 2px solid #000;
    }
    
    .custom-toast {
        border: 2px solid #000;
    }
}
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}