/* Custom Styles */
body {
    box-sizing: border-box;
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Gradient text with hardware acceleration */
.gradient-text {
    background: linear-gradient(135deg, #fde047, #b28215);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transform: translateZ(0);
}

/* Enhanced hover effects with GPU acceleration */
.hover-gold {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.hover-gold:hover {
    background-color: #b28215; /* This could be bg-accent */
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 15px 35px rgba(178, 130, 21, 0.4);
}

/* Service cards with staggered animations */
/* Đây là class chung cho cả Thẻ dịch vụ và Form liên hệ */
.service-card {
    background: rgba(178, 130, 21, 0.05); /* bg-accent-faint */
    border: 1px solid rgba(178, 130, 21, 0.2); /* border-accent-border */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.service-card.animate-in {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* Hiệu ứng hover CHUNG (làm nền trong suốt) - Cái này gây ra lỗi ở Form */
.service-card:hover {
    background: rgba(178, 130, 21, 0.1); /* bg-accent-hover */
    border-color: rgba(178, 130, 21, 0.4); /* border-accent-border-hover */
    transform: translateY(-8px) translateZ(0);
    box-shadow: 0 20px 40px rgba(178, 130, 21, 0.2);
}

/* --- FIX RIÊNG CHO CONTACT FORM (GHI ĐÈ CLASS CHUNG) --- */
/* 1. Trạng thái bình thường: Nền đen đặc */
#contact-modal .service-card {
    background-color: #140e02 !important;
    transform: none !important; /* Không cho di chuyển */
    opacity: 1 !important; /* Luôn hiển thị rõ 100% */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* 2. Trạng thái RÊ CHUỘT (HOVER): Vẫn giữ nền đen đặc, KHÔNG đổi thành trong suốt */
#contact-modal .service-card:hover {
    background-color: #140e02 !important; /* QUAN TRỌNG: Giữ nguyên màu đen */
    border-color: rgba(178, 130, 21, 0.2) !important; /* Không đổi màu viền */
    transform: none !important; /* Không bay lên */
    opacity: 1 !important; /* Không bị mờ đi */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

/* Hero slider with enhanced animations */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    opacity: 0;
    transform: translateX(100%) translateZ(0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0) translateZ(0);
    position: relative;
    z-index: 2;
}

.hero-slide.prev {
    opacity: 0;
    transform: translateX(-100%) translateZ(0);
    z-index: 1;
}

/* Enhanced dot animations */
.hero-dot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.hero-dot.active {
    transform: scale(1.3) translateZ(0);
}

/* Fade-in animations for sections */
.fade-in {
    opacity: 0;
    transform: translateY(40px) translateZ(0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.animate-in {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* Staggered animations for grid items */
.stagger-item {
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-item.animate-in {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* Icon animations */
.icon-bounce {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-bounce:hover {
    transform: scale(1.1) translateZ(0);
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1.1) translateZ(0); }
    40% { transform: translateY(-10px) scale(1.1) translateZ(0); }
    60% { transform: translateY(-5px) scale(1.1) translateZ(0); }
}

/* Form animations */
.form-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 8px 25px rgba(178, 130, 21, 0.2);
}

/* --- FIX LỖI MÀU NỀN DROPDOWN PROJECT TYPE --- */
/* Ép buộc các lựa chọn trong dropdown có nền đen và chữ sáng màu */
select.form-input option {
    background-color: #140e02; /* Màu nền tối */
    color: #e5e7eb; /* Màu chữ sáng */
    padding: 10px;
}

/* Loading animations */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Lazy loading placeholder */
.lazy-placeholder {
    background: linear-gradient(90deg, rgba(178, 130, 21, 0.1) 25%, rgba(178, 130, 21, 0.2) 50%, rgba(178, 130, 21, 0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Navigation animations */
.nav-link {
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #b28215; /* bg-accent */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animations */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    max-height: 300px; /* Adjust as needed for your content */
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}