:root {
    --primary-color: #0056b3;
    --accent-color: #e63946;
    --text-dark: #333333;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: var(--font-main); 
    color: var(--text-dark); 
    line-height: 1.6; 
    background-color: var(--white); 
    -webkit-text-size-adjust: 100%; /* Tránh tự phóng to chữ trên iOS */
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 16px; 
}

/* Section Title Component */
.section-title { 
    text-align: center; 
    color: var(--accent-color); 
    text-transform: uppercase; 
    margin: 35px 0 20px; 
    font-size: 1.5rem; /* Tối ưu kích thước chữ tiêu đề trên mobile */
    font-weight: 700; 
}

.section-title::after { 
    content: ''; 
    display: block; 
    width: 50px; 
    height: 3px; 
    background: var(--primary-color); 
    margin: 8px auto 0; 
}

/* 1. Component: Navigation (Hỗ trợ Hamburger Menu trên Mobile) */
.main-nav { 
    background-color: #008080; 
    color: var(--white); 
    padding: 12px 0; 
    font-size: 0.95rem; 
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: relative;
}

.logo-text { font-weight: bold; font-size: 1.1rem; }

/* Nút Hamburger ẩn trên PC, hiện trên Mobile */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: 0.3s;
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 20px; 
}
.nav-links a:hover { text-decoration: underline; }
.nav-hotline { font-weight: 600; }

/* 2. Component: Hero Slider Area */
.hero-slider { 
    position: relative; 
    width: 100%; 
    height: 60vh; /* Sử dụng Chiều cao màn hình thiết bị giúp ôm trọn vẹn mọi khung hình mobile */
    min-height: 360px;
    max-height: 550px;
    overflow: hidden; 
    background: #eee; 
}

.slide-item { 
    position: absolute; 
    inset: 0; 
    opacity: 0; 
    transition: opacity 0.8s ease-in-out; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 0 20px;
    background-size: cover; 
    background-position: center; 
}

.slide-item.active { opacity: 1; }

.slide-content { 
    background: rgba(255, 255, 255, 0.92); 
    padding: 24px; 
    border-radius: 12px; 
    max-width: 550px; 
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.slide-content h1 {
    font-size: 1.6rem !important; /* Không bị vỡ chữ trên mobile */
    line-height: 1.3;
}
.slide-content p {
    font-size: 0.95rem !important;
    margin-top: 5px;
}

.btn-cta { 
    display: inline-block; 
    background: linear-gradient(45deg, #ff4e50, #f9d423); 
    color: var(--white); 
    padding: 10px 24px; 
    border-radius: 25px; 
    font-weight: bold; 
    margin-top: 15px; 
    text-transform: uppercase; 
    font-size: 0.9rem;
}

/* 3. Component: Project Grid Responsive (Mobile-First) */
.project-grid { 
    display: grid; 
    grid-template-columns: 1fr; /* Mặc định 1 cột trên Mobile để tối ưu không gian hiển thị ảnh */
    gap: 24px; 
    padding: 15px 0; 
}

.project-card { 
    background: var(--white); 
    border: 1px solid #e5e7eb; 
    border-radius: 12px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.project-img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
}

.project-info { 
    padding: 16px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.project-name { 
    font-size: 1.1rem; 
    color: var(--primary-color); 
    margin-bottom: 8px; 
    font-weight: 600; 
}

.project-details { 
    font-size: 0.9rem; 
    color: #4b5563; 
    margin-bottom: 16px; 
    list-style: none; 
}
.project-details li { margin-bottom: 4px; }

.btn-detail { 
    margin-top: auto; 
    display: block; 
    text-align: center; 
    background: #00aeef; 
    color: var(--white); 
    padding: 12px; /* Tăng diện tích bấm giúp ngón tay trên mobile dễ thao tác */
    border-radius: 6px; 
    font-weight: bold; 
    font-size: 0.9rem;
}

/* 4. Component: News Area */
.news-section { 
    background-color: var(--bg-light); 
    padding: 20px 0 30px 0; 
}

/* 5. Component: Footer Contact Form */
.footer-contact { 
    background: linear-gradient(rgba(0, 30, 60, 0.95), rgba(0, 30, 60, 0.95)), url('https://picsum.photos/1920/600') no-repeat center/cover; 
    color: var(--white); 
    padding: 45px 0; 
}

.contact-grid { 
    display: grid; 
    grid-template-columns: 1fr; /* 1 cột trên mobile */
    gap: 35px; 
}

.contact-info h3 { font-size: 1.3rem; color: #f9d423; }
.contact-info p { margin-top: 10px; font-size: 0.95rem; color: #e5e7eb; }

.contact-form input, .contact-form textarea { 
    width: 100%; 
    padding: 14px; 
    margin-bottom: 12px; 
    border: 1px solid rgba(255,255,255,0.2); 
    background: rgba(255,255,255,0.05);
    color: var(--white);
    border-radius: 6px; 
    font-size: 0.95rem;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #ccc; }
.contact-form input:focus, .contact-form textarea:focus { outline: 1px solid #00aeef; background: rgba(255,255,255,0.1); }

.btn-submit { 
    background: #ff4e50; 
    color: var(--white); 
    padding: 14px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: bold; 
    width: 100%; 
    text-transform: uppercase; 
    font-size: 0.95rem;
}

/* =========================================================================
   MEDIA QUERIES - ĐIỀU CHỈNH GIAO DIỆN MƯỢT MÀ KHI LÊN PHÂN GIẢI LỚN HƠN (TỪ TABLET ĐẾN PC)
   ========================================================================= */

/* Dành cho Màn hình Máy tính bảng trở lên (Width >= 640px) */
@media (min-width: 640px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr); /* Lên 2 cột cho tablet gọn gàng */
    }
}

/* Dành cho Màn hình PC / Laptop trở lên (Width >= 992px) */
@media (min-width: 992px) {
    .section-title { font-size: 1.8rem; margin: 45px 0 25px; }
    .project-grid {
        grid-template-columns: repeat(3, 1fr); /* Lên 3 cột hoàn chỉnh trên PC */
    }
    .contact-grid { 
        grid-template-columns: 1fr 1fr; /* Form Footer thành 2 cột trái phải */
        gap: 50px;
    }
    .slide-content h1 { font-size: 2.5rem !important; }
    .slide-content p { font-size: 1.1rem !important; }
}

/* Ẩn hiện Menu trên Mobile */
@media (max-width: 768px) {
    .menu-toggle { display: flex; } /* Hiện nút ba gạch */
    .nav-hotline { display: none; } /* Ẩn hotline phụ trên thanh nav mobile cho đỡ rối */
    
    .nav-links {
        display: none; /* Ẩn menu mặc định */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: -16px;
        right: -16px;
        background-color: #006666;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    }
    .nav-links.show {
        display: flex; /* Kích hoạt hiển thị khi bấm ba gạch */
    }
}