/* 
* Modern Home Page Styles
* Điện Lạnh Anh Trần - Modern Homepage Design
* Author: Claude 3.7 - 2024
*/

/*------------------------------
 * Mobile Animation Optimization - Tối ưu animation cho mobile
 ------------------------------*/
@media (max-width: 767.98px) {
    /* Đảm bảo AOS animations hoạt động mượt mà trên mobile */
    [data-aos] {
        will-change: transform, opacity;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        transform-style: preserve-3d;
        -webkit-transform-style: preserve-3d;
        /* QUAN TRỌNG: Đảm bảo các element hiển thị ngay lập tức trên mobile */
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Tối ưu performance cho mobile */
    .hero-section-modern,
    .stats-section-modern,
    .usp-section-modern,
    .cta-section-modern,
    .booking-section-modern,
    .services-section-modern,
    .posts-section-modern,
    .testimonials-section-modern {
        will-change: auto;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        /* QUAN TRỌNG: Đảm bảo tất cả section hiển thị ngay lập tức */
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }
    
    /* Đảm bảo smooth scrolling không bị gián đoạn */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* QUAN TRỌNG: Đảm bảo tất cả content hiển thị ngay lập tức trên mobile */
    .hero-content,
    .stats-section-modern .container,
    .usp-section-modern .container,
    .cta-section-modern .container,
    .booking-section-modern .container,
    .services-section-modern .container,
    .posts-section-modern .container,
    .testimonials-section-modern .container {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

/*------------------------------
 * Global Smooth Scrolling - Thiết lập cuộn mượt toàn cục
 ------------------------------*/
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Override overscroll-behavior từ style.css để tránh xung đột */
html, body {
    overscroll-behavior: auto !important;
}

/*------------------------------
 * Global Scrollbar Hiding - Ẩn thanh cuộn toàn cục
 ------------------------------*/
/* Ẩn thanh cuộn cho tất cả trình duyệt */
html, body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Ẩn thanh cuộn cho Webkit browsers (Chrome, Safari, Edge) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

/* Ẩn thanh cuộn cho tất cả elements có thể cuộn */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none;
}

/*------------------------------
 * AOS Animation Optimization - Tối ưu hóa AOS
 ------------------------------*/
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 0.8s;
    transition-timing-function: ease-in-out;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Vô hiệu hóa AOS trên mobile để tránh vấn đề hiển thị */
@media (max-width: 767.98px) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    [data-aos].aos-animate {
        opacity: 1 !important;
        transform: none !important;
    }
    
    [data-aos="fade-up"] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    [data-aos="fade-up"].aos-animate {
        transform: none !important;
        opacity: 1 !important;
    }
    
    [data-aos="fade-right"] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    [data-aos="fade-right"].aos-animate {
        transform: none !important;
        opacity: 1 !important;
    }
    
    [data-aos="fade-left"] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    [data-aos="fade-left"].aos-animate {
        transform: none !important;
        opacity: 1 !important;
    }
    
    [data-aos="zoom-in"] {
        transform: none !important;
        opacity: 1 !important;
    }
    
    [data-aos="zoom-in"].aos-animate {
        transform: none !important;
        opacity: 1 !important;
    }
}

/* AOS Animation cho desktop */
@media (min-width: 768px) {
    [data-aos="fade-up"] {
        transform: translateY(50px);
        opacity: 0;
    }
    
    [data-aos="fade-up"].aos-animate {
        transform: translateY(0);
        opacity: 1;
    }
    
    [data-aos="fade-right"] {
        transform: translateX(-50px);
        opacity: 0;
    }
    
    [data-aos="fade-right"].aos-animate {
        transform: translateX(0);
        opacity: 1;
    }
    
    [data-aos="fade-left"] {
        transform: translateX(50px);
        opacity: 0;
    }
    
    [data-aos="fade-left"].aos-animate {
        transform: translateX(0);
        opacity: 1;
    }
    
    [data-aos="zoom-in"] {
        transform: scale(0.9);
        opacity: 0;
    }
    
    [data-aos="zoom-in"].aos-animate {
        transform: scale(1);
        opacity: 1;
    }
}

/*------------------------------
 * Modern Hero Section
 ------------------------------*/
.hero-section-modern {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}

.hero-modern-bg {
    position: relative;
    min-height: 60vh; /* Giảm từ 70vh xuống 60vh */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

/* Ensure hero content is properly centered */
.hero-modern-bg .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hero-product-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-service-bg {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.text-gradient {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.hero-btn {
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modern-indicators {
    bottom: 30px;
}

.modern-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

.modern-indicators button.active {
    background-color: white;
    transform: scale(1.2);
}

.modern-control {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin: 0 20px;
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev.modern-control {
    left: 20px;
    opacity: 1 !important;
    visibility: visible !important;
}

.carousel-control-next.modern-control {
    right: 20px;
    opacity: 1 !important;
    visibility: visible !important;
}

.modern-control:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.modern-control:active {
    transform: translateY(-50%) scale(0.95);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/*------------------------------
 * Stats Section
 ------------------------------*/
.stats-section-modern {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

.stats-section-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
    margin: 0;
}

/*------------------------------
 * USP Section
 ------------------------------*/
.usp-section-modern {
    background: white;
    position: relative;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.usp-card-modern {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.usp-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.usp-card-modern:hover::before {
    transform: scaleX(1);
}

.usp-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.usp-icon-modern {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.usp-card-modern:hover .usp-icon-modern {
    transform: scale(1.1) rotate(5deg);
}

.usp-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.usp-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/*------------------------------
 * CTA Section
 ------------------------------*/
.cta-section-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-bg-modern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.cta-content-modern {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cta-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
    margin: 0;
}

.cta-buttons-modern {
    position: relative;
    z-index: 2;
}

.cta-phone-modern {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: none;
    color: #333;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-phone-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: #333;
}

.cta-booking-modern {
    background: white;
    color: #667eea;
    border: 2px solid white;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-booking-modern:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/*------------------------------
 * Booking Section
 ------------------------------*/
.booking-section-modern {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.booking-content {
    color: #333;
}

.features-list {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.feature-content p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.booking-form-modern {
    position: relative;
}

.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.form-card:hover {
    /* Removed hover effect to prevent form from jumping up */
    /* transform: translateY(-5px); */
    /* box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15); */
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.form-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.form-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-control, .form-select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Floating Label Styles */
.floating-label-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-input {
    width: 100%;
    padding: 1rem 1rem 0.5rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    height: 3.5rem;
}

.floating-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.floating-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1rem;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 0.25rem;
    margin: 0;
}

.floating-input:focus + .floating-label,
.floating-input:not(:placeholder-shown) + .floating-label {
    top: 0.25rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 600;
    background: white;
    padding: 0 0.5rem;
}

.floating-input:focus + .floating-label {
    color: #667eea;
}

.floating-input:not(:placeholder-shown):not(:focus) + .floating-label {
    color: #333;
}

/* JavaScript enhanced floating label states */
.floating-input.has-value + .floating-label {
    top: 0.25rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: #333;
    font-weight: 600;
    background: white;
    padding: 0 0.5rem;
}

.floating-label-group.focused .floating-label {
    color: #667eea;
}

.floating-label-group.touched .floating-input {
    border-color: #667eea;
}

/* Error states for floating labels */
.floating-label-group .floating-input.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.floating-label-group .floating-input.is-invalid + .floating-label {
    color: #dc3545;
}

.floating-label-group .floating-input.is-valid {
    border-color: #28a745;
    background: #f8fff9;
}

.floating-label-group .floating-input.is-valid + .floating-label {
    color: #28a745;
}

/* Ensure proper z-index for floating labels */
.floating-label {
    z-index: 1;
}

.floating-input {
    z-index: 2;
}

/* Floating Textarea Styles */
.floating-textarea {
    width: 100%;
    padding: 1rem 1rem 0.5rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 3.5rem;
    resize: vertical;
}

.floating-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.floating-textarea:focus + .floating-label,
.floating-textarea:not(:placeholder-shown) + .floating-label {
    top: 0.25rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 600;
    background: white;
    padding: 0 0.5rem;
}

.floating-textarea:focus + .floating-label {
    color: #667eea;
}

.floating-textarea:not(:placeholder-shown):not(:focus) + .floating-label {
    color: #333;
}

/* JavaScript enhanced floating textarea states */
.floating-textarea.has-value + .floating-label {
    top: 0.25rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: #333;
    font-weight: 600;
    background: white;
    padding: 0 0.5rem;
}

/* Error states for floating textarea */
.floating-label-group .floating-textarea.is-invalid {
    border-color: #dc3545;
    background: #fff5f5;
}

.floating-label-group .floating-textarea.is-invalid + .floating-label {
    color: #dc3545;
}

.floating-label-group .floating-textarea.is-valid {
    border-color: #28a745;
    background: #f8fff9;
}

.floating-label-group .floating-textarea.is-valid + .floating-label {
    color: #28a745;
}

/* Mobile optimization for floating textarea */
@media (max-width: 767.98px) {
    .floating-textarea {
        min-height: 3.25rem;
        padding: 0.875rem 0.875rem 0.375rem 0.875rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .floating-textarea:focus + .floating-label,
    .floating-textarea:not(:placeholder-shown) + .floating-label {
        top: 0.125rem;
        left: 0.625rem;
        font-size: 0.7rem;
    }
}

/* Touch device optimization for textarea */
@media (hover: none) and (pointer: coarse) {
    .floating-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .floating-textarea:focus + .floating-label,
    .floating-textarea:not(:placeholder-shown) + .floating-label {
        font-size: 0.65rem;
    }
}

/* Textarea resize handle styling */
.floating-textarea::-webkit-resizer {
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background: #f8f9fa;
}

.floating-textarea:focus::-webkit-resizer {
    border-color: #667eea;
    background: white;
}

/* Ensure textarea doesn't break layout when resized */
.floating-label-group {
    overflow: visible;
}

/* Custom Success/Error Icons for SweetAlert2 */
.custom-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.custom-success-icon i {
    font-size: 2.5rem;
    color: white;
}

.custom-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.custom-error-icon i {
    font-size: 2.5rem;
    color: white;
}

.popup-message {
    text-align: center;
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    margin-top: 0.5rem;
}

/* Modal specific floating label styles */
.modal .floating-label-group {
    margin-bottom: 1.5rem;
}

.modal .floating-input,
.modal .floating-textarea {
    background: white;
}

.modal .floating-input:focus,
.modal .floating-textarea:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal .floating-label {
    background: white;
    z-index: 3;
}

.modal .floating-input:focus + .floating-label,
.modal .floating-input:not(:placeholder-shown) + .floating-label,
.modal .floating-textarea:focus + .floating-label,
.modal .floating-textarea:not(:placeholder-shown) + .floating-label {
    background: white;
    z-index: 4;
}

/* Ensure modal content has proper z-index */
.modal-content {
    z-index: 1055;
}

.modal-body {
    position: relative;
    z-index: 1;
}

/* Modal booking specific styles */
#bookingModal .modal-dialog {
    max-width: 600px;
}

#bookingModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

#bookingModal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

#bookingModal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#bookingModal .btn-close:hover {
    opacity: 1;
}

#bookingModal .modal-body {
    padding: 2rem;
    background: #f8f9fa;
}

#bookingModal .form-card {
    box-shadow: none;
    background: transparent;
}

#bookingModal .form-header {
    display: none; /* Hide duplicate header in modal */
}

#bookingModal .form-body {
    padding: 0;
}

/* Mobile optimization for modal */
@media (max-width: 767.98px) {
    #bookingModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #bookingModal .modal-body {
        padding: 1.5rem;
    }
    
    #bookingModal .floating-input,
    #bookingModal .floating-textarea {
        font-size: 16px;
    }
}

/* Mobile optimization for floating labels */
@media (max-width: 767.98px) {
    .floating-input {
        height: 3.25rem;
        padding: 0.875rem 0.875rem 0.375rem 0.875rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .floating-label {
        top: 0.875rem;
        left: 0.875rem;
        font-size: 0.95rem;
    }
    
    .floating-input:focus + .floating-label,
    .floating-input:not(:placeholder-shown) + .floating-label {
        top: 0.125rem;
        left: 0.625rem;
        font-size: 0.7rem;
    }
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .floating-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .floating-label {
        font-size: 0.9rem;
    }
    
    .floating-input:focus + .floating-label,
    .floating-input:not(:placeholder-shown) + .floating-label {
        font-size: 0.65rem;
    }
}

/* Fallback for older browsers */
@supports not (selector(:has(*))) {
    .floating-input:not(:placeholder-shown) + .floating-label {
        top: 0.25rem;
        left: 0.75rem;
        font-size: 0.75rem;
        color: #333;
        font-weight: 600;
        background: white;
        padding: 0 0.5rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .floating-label {
        color: #000;
        font-weight: 700;
    }
    
    .floating-input:focus + .floating-label,
    .floating-input:not(:placeholder-shown) + .floating-label {
        color: #000;
        background: white;
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-label,
    .floating-input {
        transition: none;
    }
}

.booking-submit-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-submit-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/*------------------------------
 * Services Section
 ------------------------------*/
.services-section-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

.services-section-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

.service-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.service-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.service-card-modern:hover .service-image img {
    transform: scale(1.1);
}

.service-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.service-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: all 0.3s ease;
}

.service-card-modern:hover .service-overlay {
    opacity: 1;
}

.service-link {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.service-link:hover {
    transform: scale(1.1);
    color: #764ba2;
}

.service-content {
    padding: 2rem;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-icon {
    position: absolute;
    top: -30px;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.service-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    margin-top: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em; /* 2 lines * 1.4rem font-size */
}

.service-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.8em; /* 3 lines * 1.6 line-height */
}

.service-features {
    margin-bottom: 1.5rem;
}

.service-features .feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.service-features .feature-item i {
    color: #28a745;
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

.service-price {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.price-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.price-amount {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.service-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.service-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/*------------------------------
 * Posts Section
 ------------------------------*/
.posts-section-modern {
    background: white;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

.post-card-modern {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.post-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.post-card-modern:hover .post-image img {
    transform: scale(1.1);
}

.post-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: all 0.3s ease;
}

.post-card-modern:hover .post-overlay {
    opacity: 1;
}

.read-more-btn {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    transform: scale(1.1);
    color: #764ba2;
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.post-date, .post-author {
    display: flex;
    align-items: center;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.post-link {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-link:hover {
    color: #764ba2;
    text-decoration: none;
}

/*------------------------------
 * Testimonials Section
 ------------------------------*/
.testimonials-section-modern {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

.testimonial-card-modern {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.testimonial-card-modern::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 2rem;
    font-size: 4rem;
    color: #667eea;
    opacity: 0.1;
    font-family: serif;
}

.testimonial-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.testimonial-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 4px solid #667eea;
    transition: all 0.3s ease;
}

.testimonial-card-modern:hover .testimonial-avatar {
    transform: scale(1.1);
    border-color: #764ba2;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-content {
    position: relative;
    z-index: 2;
}

.testimonial-rating {
    margin-bottom: 1rem;
    color: #ffd700;
    font-size: 1.2rem;
}

.testimonial-text {
    font-style: italic;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.testimonial-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.testimonial-location {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
}

/*------------------------------
 * Mobile Unified Layout - Tối ưu cuộn thống nhất
 ------------------------------*/
/* Tạo layout thống nhất cho mobile - loại bỏ cuộn dính */
@media (max-width: 767.98px) {
    /* Thiết lập cuộn thống nhất cho toàn trang */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
        scroll-behavior: smooth;
        /* Chỉ sử dụng một loại overflow scrolling để tránh xung đột */
        -webkit-overflow-scrolling: touch;
        /* Loại bỏ transform có thể gây vấn đề */
        transform: none !important;
        /* Ẩn thanh cuộn từ đầu */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* Ẩn thanh cuộn cho Webkit browsers (Chrome, Safari, Edge) */
    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        display: none;
    }
    
    /* Tạo container chính thống nhất */
    body {
        position: relative;
        background: linear-gradient(180deg, 
            rgba(102, 126, 234, 0.05) 0%,
            rgba(255, 255, 255, 0.8) 20%,
            rgba(255, 255, 255, 1) 40%,
            rgba(255, 255, 255, 1) 60%,
            rgba(248, 249, 250, 0.8) 80%,
            rgba(102, 126, 234, 0.05) 100%);
    }
    
    /* Loại bỏ tất cả margin và padding giữa các section */
    .hero-section-modern,
    .stats-section-modern,
    .usp-section-modern,
    .cta-section-modern,
    .booking-section-modern,
    .services-section-modern,
    .posts-section-modern,
    .testimonials-section-modern {
        margin: 0 !important;
        padding: 1rem 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        position: relative;
        /* Loại bỏ background riêng lẻ */
        background: transparent !important;
        /* Đảm bảo không có overflow riêng */
        overflow: visible !important;
    }
    
    /* Loại bỏ tất cả pseudo-elements tạo background */
    .stats-section-modern::before,
    .services-section-modern::before,
    .posts-section-modern::before,
    .testimonials-section-modern::before,
    .cta-section-modern::before,
    .booking-section-modern::before {
        display: none !important;
    }
    
    /* Đảm bảo container không tạo overflow */
    .container, .container-fluid {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        overflow: visible !important;
    }
    
    /* Loại bỏ khoảng cách giữa các section */
    .hero-section-modern + .stats-section-modern,
    .stats-section-modern + .usp-section-modern,
    .usp-section-modern + .cta-section-modern,
    .cta-section-modern + .booking-section-modern,
    .booking-section-modern + .services-section-modern,
    .services-section-modern + .posts-section-modern,
    .posts-section-modern + .testimonials-section-modern {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Đảm bảo tất cả section elements không có margin */
    section {
        margin: 0 !important;
        border: none !important;
        padding: 0 !important;
    }
    
    /* Tối ưu hero section */
    .hero-modern-bg {
        min-height: 60vh; /* Giảm từ 70vh xuống 60vh */
        position: relative;
        overflow: visible !important;
        /* Đảm bảo không có transform gây vấn đề */
        transform: none !important;
        /* Đảm bảo không có z-index gây vấn đề */
        z-index: auto;
    }
    
    /* Loại bỏ fixed heights có thể gây vấn đề cuộn */
    .hero-section-modern,
    .stats-section-modern,
    .usp-section-modern,
    .cta-section-modern,
    .booking-section-modern,
    .services-section-modern,
    .posts-section-modern,
    .testimonials-section-modern {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
}

/*------------------------------
 * Mobile Horizontal Scroll Prevention - Tối ưu cuộn
 ------------------------------*/
@media (max-width: 767.98px) {
    /* Ngăn chặn horizontal scroll và tối ưu cuộn dọc */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
            /* Loại bỏ momentum scrolling gây dính */
    -webkit-overflow-scrolling: auto;
        /* Ẩn thanh cuộn từ đầu */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* Ẩn thanh cuộn cho Webkit browsers */
    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        display: none;
    }
    
    /* Đảm bảo tất cả containers không overflow */
    .container, .container-fluid {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        overflow: visible !important;
    }
    
    /* Fix cho category navigation */
    .category-nav .nav {
        max-width: calc(100% - 30px);
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Đảm bảo carousel không overflow */
    .carousel {
        max-width: 100%;
        overflow: visible !important;
    }
    
    .carousel-inner {
        max-width: 100%;
        overflow: visible !important;
    }
    
    /* Fix cho hero buttons */
    .hero-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .hero-btn {
        width: auto;
        min-width: 140px;
    }
    
    /* Tối ưu cards để giảm khoảng cách */
    .stat-card,
    .usp-card-modern,
    .service-card-modern,
    .post-card-modern,
    .testimonial-card-modern {
        margin-bottom: 0.75rem;
        border-radius: 15px;
        /* Đảm bảo không có overflow riêng */
        overflow: visible !important;
    }
    
    /* Giảm padding trong cards */
    .stat-card {
        padding: 1.25rem;
    }
    
    .usp-card-modern {
        padding: 1.25rem;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .testimonial-card-modern {
        padding: 1.25rem;
    }
    
    /* Loại bỏ tất cả fixed heights có thể gây vấn đề cuộn */
    .hero-modern-bg {
        min-height: 60vh;
        max-height: none;
        height: auto;
    }
    
    /* Đảm bảo tất cả elements không có height cố định */
    .hero-section-modern,
    .stats-section-modern,
    .usp-section-modern,
    .cta-section-modern,
    .booking-section-modern,
    .services-section-modern,
    .posts-section-modern,
    .testimonials-section-modern {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    /* Tối ưu form elements */
    .form-card {
        overflow: visible !important;
    }
    
    .form-body {
        overflow: visible !important;
    }
    
    /* Tối ưu service cards */
    .service-image {
        overflow: visible !important;
    }
    
    .service-overlay {
        overflow: visible !important;
    }
    
    /* Tối ưu post cards */
    .post-image {
        overflow: visible !important;
    }
    
    .post-overlay {
        overflow: visible !important;
    }
}

/*------------------------------
 * Responsive Design
 ------------------------------*/
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-buttons-modern {
        text-align: center;
    }
    
    .cta-phone-modern,
    .cta-booking-modern {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .usp-card-modern,
    .testimonial-card-modern {
        padding: 1.25rem;
    }
    
    .form-body {
        padding: 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        margin: 0 auto 1rem;
    }
    
    .service-card-modern {
        margin-bottom: 0.75rem;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .service-actions {
        flex-direction: column;
    }
    
    .service-btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Tối ưu thêm cho mobile */
    .section-header {
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .stat-card,
    .usp-card-modern,
    .testimonial-card-modern {
        padding: 1rem;
    }
    
    .modern-control {
        width: 50px;
        height: 50px;
        margin: 0 10px;
    }
    
    .carousel-control-prev.modern-control {
        left: 10px;
    }
    
    .carousel-control-next.modern-control {
        right: 10px;
    }
    
    .modern-control:active {
        transform: translateY(-50%) scale(0.95);
    }
    
    /* Extra small mobile - tối ưu cuộn thống nhất */
    .hero-section-modern,
    .stats-section-modern,
    .usp-section-modern,
    .cta-section-modern,
    .booking-section-modern,
    .services-section-modern,
    .posts-section-modern,
    .testimonials-section-modern {
        padding: 0.5rem 0 !important;
        margin: 0 !important;
    }
    
    .hero-modern-bg {
        min-height: 60vh;
        max-height: none;
        height: auto;
    }
    
    /* Giảm margin cards tối đa */
    .stat-card,
    .usp-card-modern,
    .service-card-modern,
    .post-card-modern,
    .testimonial-card-modern {
        margin-bottom: 0.5rem !important;
    }
    
    /* Compact card padding tối đa */
    .stat-card,
    .usp-card-modern,
    .service-content,
    .post-content,
    .testimonial-card-modern {
        padding: 0.75rem !important;
    }
    
    /* Đảm bảo không có khoảng cách giữa sections */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Giảm section header */
    .section-header {
        margin-bottom: 1rem !important;
    }
    
    /* Tối ưu form */
    .form-body {
        padding: 0.75rem !important;
    }
    
    .form-header {
        padding: 1rem !important;
    }
    
    /* Tối ưu feature items */
    .feature-item {
        padding: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Đảm bảo tất cả elements không có height cố định */
    .hero-section-modern,
    .stats-section-modern,
    .usp-section-modern,
    .cta-section-modern,
    .booking-section-modern,
    .services-section-modern,
    .posts-section-modern,
    .testimonials-section-modern {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
}

/*------------------------------
 * Animation Classes
 ------------------------------*/
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Tối ưu cuộn mượt mà trên mobile - Khắc phục vấn đề đứng cuộn */
@media (max-width: 767.98px) {
    /* Thiết lập cuộn thống nhất cho toàn trang */
    html {
        /* Đảm bảo không có xung đột */
        overflow-x: hidden;
        /* Ẩn thanh cuộn từ đầu */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* Ẩn thanh cuộn cho Webkit browsers */
    html::-webkit-scrollbar {
        display: none;
    }
    
    body {
        /* Đảm bảo cuộn thống nhất */
        overflow-x: hidden;
        overflow-y: auto;
        /* Đảm bảo không có position fixed gây vấn đề */
        position: relative;
        /* Ẩn thanh cuộn từ đầu */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* Ẩn thanh cuộn cho Webkit browsers */
    body::-webkit-scrollbar {
        display: none;
    }
    
    /* Tối ưu cho tất cả scrollable elements */
    * {
        /* Đảm bảo không có position absolute gây vấn đề */
        position: static;
    }
    
    /* Đảm bảo không có scroll riêng lẻ */
    .hero-section-modern,
    .stats-section-modern,
    .usp-section-modern,
    .cta-section-modern,
    .booking-section-modern,
    .services-section-modern,
    .posts-section-modern,
    .testimonials-section-modern {
        overflow: visible !important;
        /* Đảm bảo position relative không gây vấn đề */
        position: relative;
        /* Loại bỏ z-index có thể gây vấn đề */
        z-index: auto;
    }
    
    /* Tối ưu AOS animations cho mobile - Giảm intensity nhưng vẫn có animation */
    [data-aos] {
        /* Giảm transform distance cho mobile */
        transition: opacity 0.6s ease, transform 0.6s ease !important;
    }
    
    /* Giảm khoảng cách transform cho mobile */
    [data-aos="fade-up"] {
        transform: translateY(30px) !important;
    }
    
    [data-aos="fade-right"] {
        transform: translateX(-30px) !important;
    }
    
    [data-aos="fade-left"] {
        transform: translateX(30px) !important;
    }
    
    [data-aos="zoom-in"] {
        transform: scale(0.95) !important;
    }
    
    /* Tối ưu carousel để không gây vấn đề cuộn */
    .carousel,
    .carousel-inner,
    .carousel-item {
        overflow: visible !important;
    }
    
    /* Tối ưu floating elements */
    .floating-action-buttons,
    .fab-container {
        position: fixed !important;
        z-index: 1000;
        /* Đảm bảo không gây vấn đề cuộn */
        pointer-events: auto;
    }
}

@media (max-width: 767.98px) {
  .hero-section-modern {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .hero-modern-bg {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  .hero-overlay {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

[data-aos="fade-up"] {
    transform: translateY(50px);
    opacity: 0;
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translateX(-50px);
    opacity: 0;
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translateX(50px);
    opacity: 0;
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
    opacity: 1;
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
    opacity: 0;
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

/*------------------------------
 * Loading Animation for Stats
 ------------------------------*/
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.animated {
    animation: countUp 1s ease-out;
} 

.service-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -38px;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}

.service-title-icon-block {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(102,126,234,0.18);
  margin-bottom: 10px;
  font-size: 1.6rem;
  color: #fff;
  transition: box-shadow 0.25s, transform 0.2s;
}

.service-title-link-block {
  text-decoration: none;
  display: block;
  text-align: center;
  transition: color 0.2s;
}

.service-title-text-block {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, #667eea 0%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.service-title-block:hover .service-title-icon-block {
  box-shadow: 0 12px 32px rgba(102,126,234,0.28);
  transform: translateY(-3px) scale(1.08);
}

.service-title-link-block:hover .service-title-text-block {
  filter: brightness(1.15);
} 

.service-title-simple {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 4px 24px rgba(102,126,234,0.10);
  padding: 10px 28px;
  margin: 0 auto 18px auto;
  min-width: 180px;
  max-width: 90%;
  position: relative;
  z-index: 2;
  gap: 10px;
}

.service-title-icon-simple {
  font-size: 1.3em;
  background: linear-gradient(135deg, #667eea 0%, #4fd1c5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  display: flex;
  align-items: center;
}

.service-title-link-simple {
  font-size: 1.18rem;
  font-weight: 700;
  color: #222;
  text-decoration: none;
  transition: color 0.2s;
  display: inline-block;
}

.service-title-link-simple:hover {
  color: #667eea;
} 

@media (max-width: 767.98px) {
  .booking-row-responsive {
    display: flex;
    flex-direction: column;
  }
  .booking-form-col {
    order: -1;
  }
  .booking-usp-col {
    order: 2;
  }
} 

@media (min-width: 1200px) {
  .hero-section-modern .container {
    max-width: 100vw !important;
    width: 100vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .hero-content {
    max-width: 100vw !important;
    width: 100vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .hero-title {
    font-size: 2.8rem;
    white-space: normal;
    width: 100vw;
    text-align: center;
    margin-left: 0;
    margin-right: 0;
    display: block;
  }
  .hero-subtitle {
    text-align: center;
    width: 100vw;
    margin-left: 0;
    margin-right: 0;
  }
} 

@media (min-width: 1200px) {
  .hero-content-full {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .hero-title, .hero-subtitle {
    text-align: center;
  }
} 

@media (min-width: 1200px) {
  .hero-content-full {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .hero-title, .hero-subtitle {
    text-align: center;
  }
} 

/* Mobile optimization for custom icons */
@media (max-width: 767.98px) {
    .custom-success-icon,
    .custom-error-icon {
        width: 70px !important;
        height: 70px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .custom-success-icon i,
    .custom-error-icon i {
        font-size: 2rem !important;
    }
    
    .popup-message {
        font-size: 0.95rem !important;
        margin-top: 0.25rem !important;
    }
}

/* Touch device optimization for custom icons */
@media (hover: none) and (pointer: coarse) {
    .custom-success-icon,
    .custom-error-icon {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .custom-success-icon:active,
    .custom-error-icon:active {
        transform: scale(0.98);
    }
}

/* High contrast mode support for custom icons */
@media (prefers-contrast: high) {
    .custom-success-icon {
        background: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .custom-error-icon {
        background: #000 !important;
        border: 2px solid #000 !important;
    }
    
    .custom-success-icon i,
    .custom-error-icon i {
        color: #fff !important;
    }
}

/* Reduced motion support for custom icons */
@media (prefers-reduced-motion: reduce) {
    .custom-success-icon,
    .custom-error-icon {
        transition: none !important;
    }
    
    .custom-success-icon:active,
    .custom-error-icon:active {
        transform: none !important;
    }
} 

/* Modal booking form specific styles */
.modal-booking-form {
    margin: 0;
    padding: 0;
}

.modal-booking-form .form-card {
    box-shadow: none;
    border: none;
    background: transparent;
}

.modal-booking-form .form-header {
    display: none; /* Hide header since modal already has one */
}

.modal-booking-form .form-body {
    padding: 0;
}

.modal-booking-form .floating-label-group {
    position: relative;
    z-index: 1;
}

.modal-booking-form .floating-input,
.modal-booking-form .floating-textarea {
    position: relative;
    z-index: 2;
    background: white;
}

.modal-booking-form .floating-label {
    position: absolute;
    z-index: 3;
    background: white;
}

.modal-booking-form .floating-input:focus + .floating-label,
.modal-booking-form .floating-input:not(:placeholder-shown) + .floating-label,
.modal-booking-form .floating-textarea:focus + .floating-label,
.modal-booking-form .floating-textarea:not(:placeholder-shown) + .floating-label {
    z-index: 4;
    background: white;
} 

/*------------------------------
 * Mobile Scroll Behavior Fix - Sửa lỗi cuộn trên mobile
 ------------------------------*/
@media (max-width: 767.98px) {
    /* Đảm bảo scroll behavior hoạt động tốt */
    html {
        scroll-behavior: auto; /* Tắt smooth scroll trên mobile để tránh vấn đề */
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        /* Đảm bảo không có momentum scrolling gây dính */
        -webkit-overflow-scrolling: auto;
    }
    
    /* Đảm bảo tất cả section có thể cuộn bình thường */
    .hero-section-modern,
    .stats-section-modern,
    .usp-section-modern,
    .cta-section-modern,
    .booking-section-modern,
    .services-section-modern,
    .posts-section-modern,
    .testimonials-section-modern {
        position: relative;
        overflow: visible;
        /* Đảm bảo không có transform gây vấn đề cuộn */
        transform: none !important;
        /* Đảm bảo không có z-index gây vấn đề */
        z-index: auto;
    }
    
    /* Đảm bảo container không gây vấn đề cuộn */
    .container,
    .container-fluid {
        overflow: visible;
        position: relative;
    }
    
    /* Đảm bảo carousel hoạt động bình thường */
    .carousel,
    .carousel-inner,
    .carousel-item {
        overflow: visible;
        position: relative;
    }
    
    /* Booking form responsive improvements */
    .booking-form-modern .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .booking-form-modern .col-6 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .booking-form-modern .form-group {
        margin-bottom: 1rem;
    }
    
    .booking-form-modern .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .booking-form-modern .form-select {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

/*------------------------------
Featured Products Section - Copy y nguyên từ trang sản phẩm
------------------------------*/

.products-section {
    background: #f8f9fa;
}

.products-section .section-title {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.products-section .section-subtitle {
    color: #6c757d;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Copy y nguyên CSS từ trang sản phẩm */
.products-section .row-cols-2 {
    --bs-rows-cols: 2;
}

.products-section .row-cols-md-4 {
    --bs-rows-cols: 4;
}

.products-section .col {
    flex: 1 0 0%;
    width: 100%;
    padding: 0; /* Đảm bảo không có padding */
}

.products-section .row-cols-2 > * {
    flex: 0 0 auto;
    width: calc(100% / 2);
}

@media (min-width: 768px) {
    .products-section .row-cols-md-4 > * {
        flex: 0 0 auto;
        width: calc(100% / 4);
    }
}

/* Tối ưu cho 12 sản phẩm (3 hàng x 4 cột) */
.products-section .row {
    margin: 0; /* Đảm bảo không có margin */
}

.products-section .col {
    margin: 0; /* Đảm bảo không có margin */
}

.products-section .card {
    border: none;
    border-radius: 0;
    transition: all 0.3s ease;
    height: 100%;
    margin: 0; /* Đảm bảo không có margin */
}

.products-section .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.products-section .card .position-relative {
    position: relative;
}

/* Image Container - Copy y nguyên từ style.css */
.products-section .image-container {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f8f8f8;
}

.products-section .image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Badge - Copy y nguyên từ trang sản phẩm */
.products-section .badge {
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.products-section .badge.bg-success {
    background-color: #198754 !important;
}

.products-section .badge.border-primary {
    border-color: #0d6efd !important;
    color: #0d6efd !important;
    background-color: white !important;
}

/* Thêm badge cho sản phẩm hết hàng */
.products-section .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.products-section .badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Card Body - Copy y nguyên từ trang sản phẩm */
.products-section .card-body {
    padding: 1rem;
}

.products-section .list-unstyled {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.products-section .list-unstyled li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.products-section .list-unstyled li:last-child {
    margin-bottom: 0;
}

.products-section .list-unstyled li strong {
    font-weight: 600;
    color: #333;
}

.products-section .list-unstyled li.text-danger {
    color: #dc3545 !important;
    font-weight: 700;
    font-size: 1rem;
}

/* Link styles - Copy y nguyên từ trang sản phẩm */
.products-section .text-decoration-none {
    text-decoration: none !important;
}

.products-section .text-dark {
    color: #212529 !important;
}

.products-section .d-block {
    display: block !important;
}

.products-section .h-100 {
    height: 100% !important;
}

/* Shadow - Copy y nguyên từ trang sản phẩm */
.products-section .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .products-section .row-cols-2 > * {
        width: calc(100% / 2);
    }
    
    .products-section .image-container {
        height: 150px;
    }
    
    .products-section .card-body {
        padding: 0.75rem;
    }
    
    .products-section .list-unstyled li {
        font-size: 0.8rem;
    }
}