/* LED Media - Home Page Styles */

/* ===== BASE STYLES ===== */
.background-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.background-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* ===== HERO SECTION ===== */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.advanced-video-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ===== BACKGROUND SECTIONS ===== */
.bg2 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    padding: 50px 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.bg2::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.bg3 {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    padding: 50px 0;
    background: linear-gradient(135deg,rgb(255, 255, 255) 0%,hsl(0, 0.00%, 100.00%) 100%);
}

.bg3::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.bg4 {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    padding: 50px 0;
    background-image: url('../../Image/bg1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bg4::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

/* ===== SYSTEM CONTENT ===== */
.system-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* .system-image styles removed as image was removed from layout */

.system-text {
    flex: 1;
    padding: 20px;
    text-align: left;
}

.system-text h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.system-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #f0f0f0;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* ===== TYPOGRAPHY ===== */
.section-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

/* ===== CAROUSEL STYLES ===== */
.carousel-item {
    height: 100%;
}

.carousel-caption {
    position: static;
    text-align: left;
    color: white;
    padding: 20px;
}

.carousel-indicators {
    bottom: 10px;
    z-index: 3;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 5px;
}

.carousel-indicators button.active {
    background-color: #fff;
}

.carousel-control-prev, .carousel-control-next {
    width: 5%;
    z-index: 3;
    opacity: 0.8;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    opacity: 1;
}

/* ===== CAROUSEL FIX FOR FUNCTIONALITY ===== */
#products .carousel {
    position: relative;
    z-index: 1;
    isolation: isolate; /* สร้าง stacking context ใหม่ */
}

#products .carousel-inner {
    position: relative;
    z-index: 2;
}

/* Ensure carousel indicators are clickable */
#products .carousel-indicators button {
    pointer-events: auto !important;
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Override any conflicting styles */
#products * {
    pointer-events: auto;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    #products .carousel-indicators {
        bottom: 10px;
    }
}

@media (max-width: 576px) {
    #products .carousel-indicators {
        bottom: 5px;
    }
    
    #products .carousel-indicators button {
        width: 12px;
        height: 12px;
        margin: 0 3px;
    }
}

/* ===== PRODUCT CONTENT ===== */
.product-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.product-image {
    width: 50%;
    padding: 20px;
}

.product-text {
    width: 50%;
    padding: 20px;
}

.product-content.reverse {
    flex-direction: row-reverse;
}

/* ===== CARD STYLES ===== */
.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.card-body {
    color: white;
}

/* ===== WORKINGS/PORTFOLIO STYLES ===== */
.workings-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.workings-image:hover {
    transform: scale(1.05);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

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

.portfolio-info {
    color: white;
    text-align: left;
}

.portfolio-info h6 {
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: bold;
}

.portfolio-info p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* ===== BADGES ===== */
.job-number-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.view-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    backdrop-filter: blur(5px);
}

/* ===== SPINNER ===== */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ===== ADVANCED PORTFOLIO STYLES ===== */
.portfolio-item.advanced-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.portfolio-item.advanced-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-image-container {
    position: relative;
    overflow: hidden;
}

.portfolio-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-item.advanced-item:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.job-badge, .type-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 20px;
}

.view-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.75rem;
}

.portfolio-content {
    padding: 20px;
}

.portfolio-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}

.portfolio-excerpt {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.4;
}

.portfolio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portfolio-overlay-content {
    text-align: center;
    color: white;
}

.portfolio-overlay-content i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* ===== SEARCH AND FILTER STYLES ===== */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 40px;
}

.search-box::before {
    content: '\f002';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    z-index: 10;
}

.portfolio-filter {
    transition: all 0.3s ease;
}

.portfolio-filter:hover {
    transform: translateY(-2px);
}

/* ===== STATS CARD ===== */
.stats-card {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-card p {
    margin: 0;
    opacity: 0.9;
}

/* ===== PROJECT STATS ===== */
.project-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.stat-item i {
    width: 16px;
    text-align: center;
}

.stat-item span {
    font-weight: 500;
}

/* ===== MODAL STYLES ===== */
.portfolio-detail-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 20px;
}

.portfolio-images .image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.portfolio-images .image-container:hover .image-overlay {
    opacity: 1;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay i {
    color: white;
    font-size: 1.5rem;
}

.description-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    line-height: 1.6;
}

.portfolio-tags .badge {
    margin-right: 8px;
    margin-bottom: 8px;
}

/* ===== PAGINATION STYLES ===== */
.pagination-lg .page-link {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s ease;
}

.pagination-lg .page-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.pagination-lg .page-item.active .page-link {
    background: white;
    border-color: white;
    color: #667eea;
}

.pagination-lg .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ANIMATIONS ===== */
.fullscreen-overlay {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.portfolio-item.loading {
    animation: pulse 1.5s infinite;
}

.portfolio-item.advanced-item {
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: #007bff #f1f1f1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* ===== PORTFOLIO SECTION LAYOUT - HORIZONTAL SCROLLING ===== */
#workings {
    position: relative;
    min-height: auto;
    padding: 4rem 0;
    overflow: hidden; /* ซ่อน scrollbar */
}

#workings .container {
    position: relative;
    z-index: 2;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

#workings .section-title {
    position: relative;
    z-index: 3;
    margin-bottom: 3rem;
    text-align: center;
}

/* ===== HORIZONTAL SCROLLING PORTFOLIO GRID ===== */
.performances-grid {
    display: flex;
    flex-direction: row;
    gap: 25px;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
    overflow: hidden;
    white-space: nowrap;
    
    /* Container สำหรับ animation */
    width: fit-content;
    animation: scrollLeftContinuous 80s linear infinite; /* ช้าลงเพื่อให้อ่านสบายตา */
    will-change: transform;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-iteration-count: infinite;
}

/* Duplicate portfolio items for seamless loop */
.performances-grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 25px;
}

/* Animation สำหรับการเลื่อนไปทางซ้าย */
@keyframes scrollLeftContinuous {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* เลื่อนซ้าย 50% เพื่อให้วนลูปได้ */
    }
}

/* หยุด animation เมื่อ hover */
.performances-grid:hover {
    animation-play-state: paused;
}

/* Performance card adjustments for horizontal layout */
.performance-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    position: relative;
    
    /* Fixed width for horizontal layout */
    min-width: 300px;
    max-width: 300px;
    flex-shrink: 0;
    white-space: normal;
}

.performance-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    position: relative;
}

.performance-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(102, 126, 234, 0.5);
}

.performance-card:active {
    transform: translateY(-5px) scale(1.01);
    transition: all 0.1s ease;
}

.performance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.performance-card:hover::before {
    opacity: 1;
}

.performance-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.performance-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.performance-image.no-image {
    background: linear-gradient(45deg, #4a5568, #2d3748);
}

.performance-image.no-image i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.5);
}

.performance-image:hover img {
    transform: scale(1.1);
}

.performance-info {
    padding: 20px;
    position: relative;
    z-index: 5;
}

/* ===== PERFORMANCE CARD INDICATORS ===== */
.performance-card::after {
    content: '\f138';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 0.8rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 10;
}

.performance-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

.performance-card:hover .performance-title {
    color: #667eea;
    transition: color 0.3s ease;
}

.performance-card:hover .performance-image img {
    transform: scale(1.05);
}

/* ===== CLICK HINT OVERLAY ===== */
.click-hint-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.performance-card:hover .click-hint-overlay {
    opacity: 1;
}

.click-hint-content {
    text-align: center;
    color: white;
    background: rgba(102, 126, 234, 0.9);
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.click-hint-content i {
    margin-right: 8px;
    font-size: 1rem;
}

/* ===== PERFORMANCE CONTENT ===== */
.performance-job-number {
    color: #667eea;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.performance-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

.performance-detail {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.performance-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
}

.performance-meta div {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.performance-meta i {
    width: 14px;
    margin-right: 5px;
}

.performance-status {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.status-active {
    background: #28a745;
    color: white;
}

.status-inactive {
    background: #dc3545;
    color: white;
}

.performance-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.no-performances {
    grid-column: 1 / -1;
}

/* ===== VIEW ALL SECTION - UPDATED FOR HORIZONTAL LAYOUT ===== */
.view-all-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 40px;
    position: relative;
    z-index: 15; /* Higher than fade gradients */
    clear: both;
    text-align: center;
}

.view-all-section::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 1px;
}

.view-all-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 35px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    z-index: 20;
    cursor: pointer;
}

.view-all-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.view-all-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;
    pointer-events: none;
}

.view-all-btn:hover::before {
    left: 100%;
}

.view-all-section p.text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 20px;
}

.view-all-section .small {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.9rem;
}

/* ===== TEXT GRADIENT AND ENHANCED TYPOGRAPHY ===== */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.display-4.text-gradient {
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

/* ===== ENHANCED FEATURE LIST ===== */
.feature-list {
    margin-top: 2rem;
}

.feature-item {
    position: relative;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item:hover {
    transform: translateX(10px) scale(1.02);
    border-left-color: #667eea;
    background: rgba(102, 126, 234, 0.1) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.feature-item:hover .text-warning {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.feature-item:hover i {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.feature-item i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* ===== ENHANCED SYSTEM TEXT ===== */
.system-text h1 {
    position: relative;
    z-index: 2;
}

.system-text h1::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -20px;
    right: -20px;
    bottom: -10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.system-text h1:hover::before {
    opacity: 1;
}

.system-text .lead {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
}

.system-text .text-warning {
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

/* ===== ENHANCED BUTTON ===== */
.system-text .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.system-text .btn-primary::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;
}

.system-text .btn-primary:hover::before {
    left: 100%;
}

.system-text .btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* ===== GLOW EFFECTS ===== */
.text-primary {
    filter: drop-shadow(0 0 8px rgba(0, 123, 255, 0.5));
}

.text-success {
    filter: drop-shadow(0 0 8px rgba(40, 167, 69, 0.5));
}

.text-info {
    filter: drop-shadow(0 0 8px rgba(23, 162, 184, 0.5));
}

.text-danger {
    filter: drop-shadow(0 0 8px rgba(220, 53, 69, 0.5));
}

.text-warning {
    filter: drop-shadow(0 0 8px rgba(255, 193, 7, 0.5));
}

/* ===== RESPONSIVE ENHANCEMENTS ===== */
@media (max-width: 768px) {
    .display-4.text-gradient {
        font-size: 2rem;
        letter-spacing: -0.5px;
    }
    
    .feature-item {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .feature-item:hover {
        transform: scale(1.02);
    }
    
    .system-text .lead {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .display-4.text-gradient {
        font-size: 1.5rem;
    }
    
    .feature-item i {
        font-size: 1rem;
    }
    
    .system-text .btn-primary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ===== FORCE FULL VIEWPORT HEIGHT FOR HUIDU SECTION ===== */
#huidu-technology {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure minimum height */
    box-sizing: border-box; /* Include padding in height calculation */
    /* Protection from space background effects */
    z-index: 1000 !important;
    isolation: isolate !important;
    background: inherit !important; /* Ensure original background is preserved */
}

#huidu-technology .bg4 {
    min-height: 100vh;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    text-align: left;
    flex: 1;
    /* Ensure background image is preserved */
    background-image: url('../../Image/bg1.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

#huidu-technology .system-content {
    height: 100%;
    overflow: hidden;
    text-align: left;
    width: 100%;
    max-width: 800px;
    /* Ensure this content is not affected by space background */
    position: relative;
    z-index: 1001;
}

/* ===== OPTIMIZED FEATURE LIST FOR LIMITED HEIGHT ===== */
#huidu-technology .feature-list {
    margin-top: 1rem;
    max-height: 60vh;
    overflow: hidden; /* Hide all scrollbars completely */
    padding-right: 0.5rem;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

/* สร้าง container สำหรับ animation */
#huidu-technology .feature-list .scroll-container {
    animation: autoScrollUp 30s linear infinite !important;
    will-change: transform;
    /* Ensure this animation is protected from interference */
    position: relative;
    z-index: 1002;
}

/* Animation keyframes สำหรับการเลื่อนขึ้น - Protected version */
@keyframes autoScrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%); /* เลื่อนขึ้น 50% เพื่อให้วนลูปได้ */
    }
}

/* หยุด animation เมื่อ hover - Ensure this works */
#huidu-technology .feature-list:hover .scroll-container {
    animation-play-state: paused !important;
}

/* ตัวบ่งชี้เมื่อ hover */
#huidu-technology .feature-list::after {
    content: "⏸️ วางเมาส์เพื่อหยุดชั่วคราว";
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

#huidu-technology .feature-list:hover::after {
    opacity: 1;
}

/* ===== RESPONSIVE ADJUSTMENTS FOR AUTO SCROLL ===== */
@media (max-width: 768px) {
    #huidu-technology .feature-list .scroll-container {
        animation-duration: 35s; /* ช้าลงสำหรับมือถือ */
    }
    
    #huidu-technology .feature-list::after {
        content: "👆 แตะเพื่อหยุดชั่วคราว";
        font-size: 0.7rem;
        top: -25px;
    }
}

@media (max-width: 576px) {
    #huidu-technology .feature-list .scroll-container {
        animation-duration: 40s; /* ช้าที่สุดสำหรับหน้าจอเล็ก */
    }
    
    #huidu-technology .feature-list {
        max-height: 45vh;
    }
}

/* สำหรับ touch devices */
@media (hover: none) and (pointer: coarse) {
    #huidu-technology .feature-list:active .scroll-container {
        animation-play-state: paused;
    }
    
    #huidu-technology .feature-list::after {
        content: "👆 แตะค้างเพื่อหยุดชั่วคราว";
    }
}

@media (max-width: 768px) {
    #huidu-technology {
        max-height: 100vh;
    }
    
    #huidu-technology .system-content {
        flex-direction: column;
        max-height: 95vh;
        padding: 1rem;
        text-align: left;
    }
    
    #huidu-technology .system-text {
        order: 1;
        max-height: 60vh;
        overflow: hidden;
    }
    
    #huidu-technology .feature-list {
        max-height: 50vh;
    }
}

@media (max-width: 576px) {
    #huidu-technology {
        max-height: 100vh;
    }
    
    #huidu-technology .system-content {
        max-height: 95vh;
        padding: 0.5rem;
        text-align: left;
    }
    
    #huidu-technology .system-text {
        max-height: 70vh;
    }
}

/* ===== LEFT ALIGNMENT FOR HUIDU TECHNOLOGY SECTION ===== */
#huidu-technology .system-text {
    text-align: left;
    width: 100%;
}

#huidu-technology .system-text .mt-4 {
    text-align: left;
    margin-top: 1.5rem !important;
}

#huidu-technology .system-text .btn {
    margin-left: 0;
    margin-right: auto;
    display: inline-block;
}

#huidu-technology .feature-list {
    text-align: left;
}

/* ===== FEATURE ITEMS LEFT ALIGNMENT ===== */
#huidu-technology .feature-item {
    text-align: left;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

#huidu-technology .feature-item i {
    flex-shrink: 0;
    margin-right: 0.75rem;
    margin-top: 0.2rem;
}

#huidu-technology .feature-item .text-content {
    flex: 1;
    text-align: left;
}

/* ===== ANIMATED STARS AND BUILDINGS BACKGROUND ===== */
.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, 
        #0c1445 0%, 
        #1e3c72 30%, 
        #2a5298 60%, 
        #1a1a2e 100%);
}

/* ===== STARS ANIMATION ===== */
.stars-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

.stars-small {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #eee, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 4s linear infinite;
}

.stars-medium {
    background-image: 
        radial-gradient(3px 3px at 30px 20px, rgba(255,255,255,0.9), transparent),
        radial-gradient(2px 2px at 80px 60px, rgba(255,255,255,0.7), transparent),
        radial-gradient(3px 3px at 120px 90px, #fff, transparent),
        radial-gradient(2px 2px at 170px 40px, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 250px 150px;
    animation: sparkle 6s linear infinite reverse;
}

.stars-large {
    background-image: 
        radial-gradient(4px 4px at 50px 50px, #fff, transparent),
        radial-gradient(3px 3px at 100px 20px, rgba(255,255,255,0.9), transparent),
        radial-gradient(4px 4px at 150px 80px, rgba(255,255,255,0.8), transparent);
    background-repeat: repeat;
    background-size: 300px 200px;
    animation: sparkle 8s linear infinite;
}

@keyframes sparkle {
    0% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.3; transform: scale(1); }
}

/* ===== CITY SKYLINE ===== */
.city-skyline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
}

.building {
    background: linear-gradient(to top, #1a1a2e 0%, #16213e 50%, #0f1419 100%);
    position: relative;
    animation: buildingGlow 3s ease-in-out infinite alternate;
    border-radius: 2px 2px 0 0;
    box-shadow: 
        0 0 10px rgba(0, 150, 255, 0.3),
        inset 0 0 20px rgba(0, 100, 200, 0.1);
}

.building::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.02) 20%, 
        transparent 40%, 
        rgba(255, 255, 255, 0.03) 60%, 
        transparent 80%, 
        rgba(255, 255, 255, 0.02) 100%);
    pointer-events: none;
}

.building::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 20%;
    right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 150, 255, 0.8), transparent);
    animation: antennaBlink 2s ease-in-out infinite;
}

/* Individual Building Styles */
.building-1 {
    width: 80px;
    height: 300px;
    animation-delay: 0s;
}

.building-2 {
    width: 60px;
    height: 400px;
    animation-delay: 0.5s;
}

.building-3 {
    width: 90px;
    height: 250px;
    animation-delay: 1s;
}

.building-4 {
    width: 70px;
    height: 450px;
    animation-delay: 1.5s;
}

.building-5 {
    width: 85px;
    height: 320px;
    animation-delay: 2s;
}

.building-6 {
    width: 65px;
    height: 380px;
    animation-delay: 2.5s;
}

.building-7 {
    width: 95px;
    height: 280px;
    animation-delay: 3s;
}

.building-8 {
    width: 75px;
    height: 350px;
    animation-delay: 3.5s;
}

@keyframes buildingGlow {
    0% {
        box-shadow: 
            0 0 10px rgba(0, 150, 255, 0.2),
            inset 0 0 20px rgba(0, 100, 200, 0.05);
        filter: brightness(0.8);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(0, 150, 255, 0.5),
            inset 0 0 30px rgba(0, 100, 200, 0.2);
        filter: brightness(1.1);
    }
}

@keyframes antennaBlink {
    0%, 80% { opacity: 0.3; }
    90% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* ===== FLOATING ELEMENTS ===== */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-star {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.floating-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 12px;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
}

.floating-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
}

.star-1 {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.star-2 {
    top: 20%;
    right: 20%;
    animation-delay: 1s;
    animation-duration: 8s;
}

.star-3 {
    top: 30%;
    left: 60%;
    animation-delay: 2s;
    animation-duration: 7s;
}

.star-4 {
    top: 15%;
    left: 80%;
    animation-delay: 3s;
    animation-duration: 9s;
}

.star-5 {
    top: 25%;
    left: 40%;
    animation-delay: 4s;
    animation-duration: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.8;
    }
    75% {
        transform: translateY(-30px) rotate(270deg);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .city-skyline {
        height: 50%;
    }
    
    .building {
        width: 40px !important;
        height: 200px !important;
    }
    
    .building-2, .building-4, .building-6 {
        height: 250px !important;
    }
    
    .floating-star {
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 576px) {
    .city-skyline {
        height: 40%;
    }
    
    .building {
        width: 30px !important;
        height: 150px !important;
    }
    
    .building-2, .building-4, .building-6 {
        height: 180px !important;
    }
}

/* ===== PRODUCTS RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .product-content {
        flex-direction: column !important;
        text-align: center;
    }
    
    .product-content.reverse {
        flex-direction: column !important;
    }
    
    .product-image,
    .product-text {
        width: 100%;
        padding: 15px;
    }
    
    .product-text h5 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .product-text p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

@media (max-width: 768px) {
    #products .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .product-image,
    .product-text {
        padding: 10px;
    }
    
    .product-text h5 {
        font-size: 1.3rem;
    }
    
    .product-text p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    #products .section-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .product-image img {
        max-height: 200px;
        object-fit: contain;
    }
    
    .product-text {
        padding: 15px 10px;
    }
    
    .product-text h5 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .product-text p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

/* ===== PRODUCTS SECTION SPECIFIC STYLES ===== */
#products {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

#products .section-title {
    color: white;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Enhance carousel for space theme */
#products .carousel-item {
    transition: transform 0.8s ease-in-out;
}

#products .product-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#products .product-text h5 {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    font-weight: 600;
    margin-bottom: 15px;
}

#products .product-text p {
    color: #f8f9fa;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    line-height: 1.6;
    font-size: 1rem;
}

/* Space-themed indicators */
#products .carousel-indicators button {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    margin: 0 8px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

#products .carousel-indicators button.active {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

#products .carousel-indicators button:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* ===== SPACE BACKGROUND FOR PRODUCTS SECTION ===== */
.space-background {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 25%, #16213e 50%, #0f0f23 75%, #000 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Space Stars */
.space-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: spaceSparkle 20s linear infinite;
}

@keyframes spaceSparkle {
    from { transform: translateX(0); }
    to { transform: translateX(-200px); }
}

/* Nebula Effect */
.space-nebula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(120, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 0, 150, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(0, 150, 255, 0.1) 0%, transparent 50%);
    animation: nebula-drift 30s ease-in-out infinite;
}

@keyframes nebula-drift {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    25% { transform: translateX(20px) translateY(-10px) scale(1.1); }
    50% { transform: translateX(-10px) translateY(15px) scale(0.95); }
    75% { transform: translateX(15px) translateY(-5px) scale(1.05); }
}

/* Floating Planets */
.floating-planets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.planet {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
    box-shadow: 
        inset -10px -10px 20px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.1);
}

.planet-1 {
    width: 60px;
    height: 60px;
    top: 20%;
    right: 10%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    animation: float-planet-1 25s ease-in-out infinite;
}

.planet-2 {
    width: 40px;
    height: 40px;
    top: 60%;
    left: 5%;
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    animation: float-planet-2 20s ease-in-out infinite;
}

.planet-3 {
    width: 80px;
    height: 80px;
    top: 80%;
    right: 20%;
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    animation: float-planet-3 30s ease-in-out infinite;
}

@keyframes float-planet-1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes float-planet-2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(15px) rotate(-180deg); }
}

@keyframes float-planet-3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(90deg); }
}

/* Space Particles */
.space-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.particle-1 {
    top: 30%;
    left: 20%;
    animation: particle-float-1 15s ease-in-out infinite;
}

.particle-2 {
    top: 70%;
    left: 80%;
    animation: particle-float-2 18s ease-in-out infinite;
}

.particle-3 {
    top: 10%;
    left: 60%;
    animation: particle-float-3 12s ease-in-out infinite;
}

.particle-4 {
    top: 90%;
    left: 30%;
    animation: particle-float-4 20s ease-in-out infinite;
}

.particle-5 {
    top: 50%;
    left: 10%;
    animation: particle-float-5 16s ease-in-out infinite;
}

@keyframes particle-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
    50% { transform: translate(50px, -30px) scale(1.5); opacity: 1; }
}

@keyframes particle-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    50% { transform: translate(-40px, 20px) scale(1.2); opacity: 1; }
}

@keyframes particle-float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    50% { transform: translate(30px, 40px) scale(1.3); opacity: 1; }
}

@keyframes particle-float-4 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
    50% { transform: translate(-20px, -50px) scale(1.4); opacity: 1; }
}

@keyframes particle-float-5 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
    50% { transform: translate(60px, -20px) scale(1.1); opacity: 1; }
}

/* Products Content */
.products-content {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 60px 20px;
}

/* ===== ENHANCED STARDUST BACKGROUND FOR PORTFOLIO SECTION ===== */
.stardust-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Cosmic Dust Layers */
.stardust-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    animation: stardustFloat 60s linear infinite;
}

.stardust-layer-1 {
    background-image: 
        /* Bright white stars */
        radial-gradient(1px 1px at 8% 15%, rgba(255, 255, 255, 1), transparent),
        radial-gradient(2px 2px at 25% 35%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 42% 60%, rgba(255, 255, 255, 0.95), transparent),
        radial-gradient(1px 1px at 68% 25%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 85% 75%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(1px 1px at 95% 10%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 12% 85%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 55% 5%, rgba(255, 255, 255, 0.8), transparent),
        /* Twinkling effect */
        radial-gradient(3px 3px at 30% 80%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(4px 4px at 78% 45%, rgba(255, 255, 255, 0.5), transparent);
    background-size: 
        200px 150px, 250px 180px, 180px 120px, 220px 160px, 190px 140px,
        170px 130px, 210px 150px, 160px 110px, 300px 200px, 280px 190px;
    animation-duration: 100s;
    opacity: 0.8;
    animation-timing-function: ease-in-out;
}

.stardust-layer-2 {
    background-image: 
        /* Colored cosmic dust */
        radial-gradient(2px 2px at 18% 40%, rgba(138, 43, 226, 0.8), transparent),
        radial-gradient(1px 1px at 35% 20%, rgba(30, 144, 255, 0.7), transparent),
        radial-gradient(3px 3px at 62% 70%, rgba(255, 20, 147, 0.6), transparent),
        radial-gradient(2px 2px at 80% 50%, rgba(255, 215, 0, 0.7), transparent),
        radial-gradient(1px 1px at 15% 85%, rgba(0, 255, 127, 0.6), transparent),
        radial-gradient(2px 2px at 45% 15%, rgba(255, 69, 0, 0.5), transparent),
        radial-gradient(1px 1px at 75% 90%, rgba(148, 0, 211, 0.6), transparent),
        radial-gradient(3px 3px at 90% 30%, rgba(0, 206, 209, 0.7), transparent),
        /* Nebula particles */
        radial-gradient(4px 4px at 25% 60%, rgba(255, 105, 180, 0.4), transparent),
        radial-gradient(5px 5px at 60% 5%, rgba(135, 206, 250, 0.5), transparent);
    background-size: 
        280px 200px, 320px 220px, 240px 170px, 200px 140px, 260px 180px,
        300px 210px, 180px 130px, 350px 230px, 400px 250px, 380px 240px;
    animation-duration: 150s;
    animation-direction: reverse;
    opacity: 0.6;
    animation-timing-function: linear;
}

.stardust-layer-3 {
    background-image: 
        /* Deep space elements */
        radial-gradient(6px 6px at 20% 60%, rgba(72, 61, 139, 0.5), transparent),
        radial-gradient(4px 4px at 65% 20%, rgba(123, 104, 238, 0.4), transparent),
        radial-gradient(5px 5px at 40% 80%, rgba(186, 85, 211, 0.6), transparent),
        radial-gradient(3px 3px at 85% 40%, rgba(255, 182, 193, 0.5), transparent),
        radial-gradient(7px 7px at 10% 25%, rgba(100, 149, 237, 0.3), transparent),
        radial-gradient(4px 4px at 75% 75%, rgba(221, 160, 221, 0.4), transparent),
        /* Distant galaxies */
        radial-gradient(8px 8px at 50% 30%, rgba(47, 79, 79, 0.3), transparent),
        radial-gradient(6px 6px at 30% 90%, rgba(95, 158, 160, 0.4), transparent);
    background-size: 
        450px 300px, 400px 280px, 380px 260px, 420px 290px,
        500px 320px, 360px 250px, 600px 400px, 550px 350px;
    animation-duration: 200s;
    opacity: 0.4;
    animation-timing-function: ease-in-out;
}

@keyframes stardustFloat {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateX(-30px) translateY(-15px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translateX(20px) translateY(-40px) rotate(180deg) scale(0.9);
    }
    75% {
        transform: translateX(-15px) translateY(-25px) rotate(270deg) scale(1.05);
    }
    100% {
        transform: translateX(0) translateY(0) rotate(360deg) scale(1);
    }
}

/* Enhanced Shooting Stars */
.shooting-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 30%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 15px rgba(255, 255, 255, 0.4);
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.8) 20%, 
        rgba(135, 206, 250, 0.6) 50%, 
        rgba(255, 20, 147, 0.4) 80%, 
        transparent 100%);
    transform: translate(-50%, -50%) rotate(-45deg);
    transform-origin: left center;
    border-radius: 1px;
    filter: blur(0.5px);
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.3) 30%, 
        transparent 100%);
    transform: translate(-50%, -50%) rotate(-45deg);
    transform-origin: left center;
    filter: blur(1px);
}

.shooting-star-1 {
    top: 15%;
    left: -80px;
    animation: shootingStar1 20s ease-out infinite;
    animation-delay: 0s;
}

.shooting-star-2 {
    top: 45%;
    left: -80px;
    animation: shootingStar2 25s ease-out infinite;
    animation-delay: 8s;
}

.shooting-star-3 {
    top: 75%;
    left: -80px;
    animation: shootingStar3 22s ease-out infinite;
    animation-delay: 15s;
}

.shooting-star-4 {
    top: 30%;
    left: -80px;
    animation: shootingStar4 18s ease-out infinite;
    animation-delay: 3s;
}

.shooting-star-5 {
    top: 65%;
    left: -80px;
    animation: shootingStar5 28s ease-out infinite;
    animation-delay: 12s;
}

@keyframes shootingStar1 {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateX(50px) translateY(-20px) scale(1);
    }
    90% {
        opacity: 0.7;
        transform: translateX(calc(100vw + 100px)) translateY(-200px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translateX(calc(100vw + 150px)) translateY(-250px) scale(0);
    }
}

@keyframes shootingStar2 {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) scale(0);
    }
    15% {
        opacity: 1;
        transform: translateX(80px) translateY(-30px) scale(1);
    }
    85% {
        opacity: 0.8;
        transform: translateX(calc(100vw + 120px)) translateY(-300px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(calc(100vw + 200px)) translateY(-350px) scale(0);
    }
}

@keyframes shootingStar3 {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) scale(0);
    }
    12% {
        opacity: 1;
        transform: translateX(60px) translateY(-25px) scale(1);
    }
    88% {
        opacity: 0.6;
        transform: translateX(calc(100vw + 80px)) translateY(-180px) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translateX(calc(100vw + 120px)) translateY(-220px) scale(0);
    }
}

@keyframes shootingStar4 {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) scale(0);
    }
    8% {
        opacity: 1;
        transform: translateX(40px) translateY(-15px) scale(1);
    }
    92% {
        opacity: 0.9;
        transform: translateX(calc(100vw + 90px)) translateY(-160px) scale(1.4);
    }
    100% {
        opacity: 0;
        transform: translateX(calc(100vw + 140px)) translateY(-200px) scale(0);
    }
}

@keyframes shootingStar5 {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) scale(0);
    }
    5% {
        opacity: 1;
        transform: translateX(70px) translateY(-35px) scale(1);
    }
    95% {
        opacity: 0.5;
        transform: translateX(calc(100vw + 150px)) translateY(-400px) scale(1.6);
    }
    100% {
        opacity: 0;
        transform: translateX(calc(100vw + 200px)) translateY(-450px) scale(0);
    }
}

/* Enhanced Portfolio Section Styling */
#workings {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        #0a0a1a 0%, 
        #1a1a2e 25%, 
        #2a1810 50%, 
        #1e1e3f 75%, 
        #0f0f1f 100%);
    min-height: 100vh;
}

#workings::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 10%, rgba(255, 215, 0, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at 10% 80%, rgba(255, 20, 147, 0.12) 0%, transparent 45%);
    z-index: 2;
    animation: nebulaShift 30s ease-in-out infinite alternate;
}

@keyframes nebulaShift {
    0% {
        opacity: 0.8;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 0.9;
        transform: scale(1.05) rotate(-1deg);
    }
}

#workings .container {
    position: relative;
    z-index: 10;
}

#workings .section-title {
    position: relative;
    z-index: 11;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Performance Cards with Cosmic Stardust Effect */
.performance-card {
    position: relative;
    z-index: 12;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(138, 43, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.performance-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(138, 43, 226, 0.3) 0%, 
        rgba(30, 144, 255, 0.2) 25%, 
        rgba(255, 20, 147, 0.3) 50%, 
        rgba(255, 215, 0, 0.2) 75%, 
        rgba(138, 43, 226, 0.3) 100%);
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(8px);
}

.performance-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 50%);
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.performance-card:hover::before {
    opacity: 1;
}

.performance-card:hover::after {
    opacity: 1;
}

.performance-card:hover {
    transform: translateY(-15px) scale(1.03) rotateX(5deg);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(138, 43, 226, 0.4),
        0 0 60px rgba(30, 144, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.performance-card:hover .performance-image img {
    transform: scale(1.1);
    filter: brightness(1.1) saturate(1.2);
}

.performance-card .performance-image {
    overflow: hidden;
    border-radius: 12px;
}

.performance-card .performance-image img {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* View All Section Enhancement */
.view-all-section {
    position: relative;
    z-index: 15;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.view-all-btn {
    position: relative;
    z-index: 16;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        0 0 20px rgba(255, 255, 255, 0.1);
}

.view-all-btn:hover {
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.5),
        0 0 30px rgba(255, 255, 255, 0.2);
}