/*
Theme Name: Máy Xúc Hạ Long
Theme URI: https://mayxuchalong.com
Author: Custom Theme
Description: Theme WordPress cho công ty xây dựng Máy Xúc Hạ Long
Version: 2.0 (Clone Style mayxuchalong.com)
License: GNU General Public License v2 or later
Text Domain: mayxuc-halong
*/

/* =========================================
   1. CẤU HÌNH CƠ BẢN (RESET)
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
a:hover { color: #7ed957; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
ul { list-style: none; padding: 0; margin: 0; }

/* =========================================
   2. HEADER (GIỐNG TRANG MẪU)
   ========================================= */
/* Header nằm đè lên ảnh, nền đen mờ nhẹ */
.site-header {
    background: rgba(0, 0, 0, 0.3) !important; /* Nền đen trong suốt giống mẫu */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

/* Khi cuộn chuột xuống thì header dính lên trên */
.site-header.sticky {
    position: fixed;
    background: #2c4987 !important; /* Màu xanh đậm khi cuộn giống mẫu */
    animation: slideDown 0.3s ease;
    border-bottom: none;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* 1. Tăng khoảng cách giữa các khối trong header */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0; /* Tăng padding trên dưới chút cho thoáng */
    gap: 30px; /* Khoảng cách giữa cụm logo, menu, và social */
}

/* Logo */
.site-logo img {
    max-height: 180px;
    width: auto;
}

/* Menu chính - Chữ trắng, in hoa */
.main-navigation ul {
    display: flex;
    gap: 15px;
}

.main-navigation a {
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    padding: 10px 15px;
}

.main-navigation a:hover {
    color: #7ed957 !important; /* Hover màu xanh lá */
}

/* Các thông tin liên hệ trên Header (nếu có) */
.header-contact, .header-social a { color: #fff !important; }
/* 2. Tách rời Số điện thoại và Email */
.header-contact {
    display: flex;
    flex-direction: row; /* Xếp ngang thay vì dọc */
    align-items: center;
    gap: 25px; /* Khoảng cách giữa SĐT và Email */
}

/* Hoặc nếu cấu trúc HTML của bạn khác, hãy dùng class này cho từng mục con */
.header-info {
    margin-right: 25px; /* Đẩy mục bên phải ra xa */
}
.header-info:last-child {
    margin-right: 0;
}

/* 3. Tách rời các icon Facebook, TikTok, YouTube */
.header-social {
    display: flex;
    gap: 15px; /* Khoảng cách giữa các icon */
    align-items: center;
}
/* =========================================
   HERO SLIDER - FIXED
   ========================================= */
.hero-slider {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    outline: none;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-content {
    text-align: center;
    color: #fff;
    max-width: 900px;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 48px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.hero-content .btn {
    display: inline-block;
    background: #7ed957;
    color: #fff;
    padding: 14px 40px;
    border-radius: 30px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    border: 2px solid #7ed957;
    transition: all 0.3s ease;
}

.hero-content .btn:hover {
    background: transparent;
    color: #7ed957;
}

/* MŨI TÊN */
.slick-prev, .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    color: #fff;
    line-height: 46px;
    text-align: center;
}

.slick-prev { left: 30px; }
.slick-next { right: 30px; }

.slick-prev:hover, .slick-next:hover {
    background: #7ed957;
    border-color: #7ed957;
}

/* DOTS */
.slick-dots {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    z-index: 10;
    list-style: none;
    padding: 0;
    margin: 0;
}

.slick-dots li {
    display: inline-block;
    margin: 0 5px;
}

.slick-dots li button {
    font-size: 0;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.slick-dots li.slick-active button {
    background: #7ed957;
    width: 14px;
    height: 14px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-slides,
    .hero-slide {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-content h2 { font-size: 28px; }
    .hero-content p { font-size: 14px; display: none; }

}
    
    .hero-slider .slick-prev,
    .hero-slider .slick-next {
        display: none !important;
    }
    /* TÙY CHỈNH LẠI MŨI TÊN CHO MOBILE */
    .slick-prev, .slick-next {
        width: 40px;      /* Giảm kích thước chiều rộng */
        height: 40px;     /* Giảm kích thước chiều cao */
        line-height: 36px;  /* Căn lại icon vào giữa */
        font-size: 16px;    /* Giảm kích thước icon */
    }

    .slick-prev { left: 15px; }   /* Đặt lại vị trí gần lề hơn */
    .slick-next { right: 15px; }  /* Đặt lại vị trí gần lề hơn */
}
/* --- HIỂN THỊ MŨI TÊN SLIDE --- */
.hero-slider .slick-prev, 
.hero-slider .slick-next {
    display: flex !important; /* Bắt buộc hiển thị */
    align-items: center;
    justify-content: center;
    z-index: 100; /* Lớp cao nhất để không bị ảnh che */
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.4); /* Nền đen mờ */
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-slider .slick-prev { left: 30px; }
.hero-slider .slick-next { right: 30px; }

/* Tạo hình mũi tên bằng CSS (trường hợp không load được font icon) */
.hero-slider .slick-prev::before {
    content: '❮'; /* Ký tự mũi tên trái */
    color: #fff;
    font-size: 20px;
    font-family: sans-serif;
}
.hero-slider .slick-next::before {
    content: '❯'; /* Ký tự mũi tên phải */
    color: #fff;
    font-size: 20px;
    font-family: sans-serif;
}

.hero-slider .slick-prev:hover, 
.hero-slider .slick-next:hover {
    background: #7ed957; /* Màu xanh khi di chuột vào */
    border-color: #7ed957;
}

/* --- Cấu hình chung Section --- */
.why-choose-us {
    padding: 80px 0;
    background: #fff;
    overflow: hidden; /* Tránh bị tràn lề ngang */
}

/* Tiêu đề section */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 15px;
}

.section-title .title-border {
    display: block;
    width: 60px;
    height: 4px;
    background: #7ed957; /* Màu xanh lá giống mẫu */
    margin: 0 auto;
}

/* --- Layout chính (Khung chứa) --- */
.why-choose-layout {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 600px; /* Chiều cao cố định để căn vị trí absolute */
    margin: 0 auto;
}

/* --- Ảnh trung tâm --- */
.center-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Căn giữa tuyệt đối */
    width: 450px;
    height: 450px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Bo tròn ảnh */
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border: 10px solid #fff; /* Viền trắng bao quanh ảnh */
}

/* --- Các Feature Item (Chung) --- */
.feature-item {
    position: absolute;
    width: 300px;
    z-index: 2;
}

.feature-item h3 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #333;
}

.feature-item p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.feature-icon {
    margin-bottom: 15px;
}

.feature-icon img {
    max-width: 50px; /* Kích thước icon */
    height: auto;
}

/* --- Định vị từng góc --- */

/* 1. Góc Trên Trái (Căn phải) */
.feature-top-left {
    top: 20px;
    left: 0;
    text-align: right;
}
/* Đẩy icon sang phải để thẳng hàng với text */
.feature-top-left .feature-icon {
    display: flex;
    justify-content: flex-end;
}

/* 2. Góc Trên Phải (Căn trái) */
.feature-top-right {
    top: 20px;
    right: 0;
    text-align: left;
}
.feature-top-right .feature-icon {
    display: flex;
    justify-content: flex-start;
}

/* 3. Góc Dưới Trái (Căn phải) */
.feature-bottom-left {
    bottom: 40px;
    left: 0;
    text-align: right;
}
.feature-bottom-left .feature-icon {
    display: flex;
    justify-content: flex-end;
}

/* 4. Góc Dưới Phải (Căn trái) */
.feature-bottom-right {
    bottom: 40px;
    right: 0;
    text-align: left;
}
.feature-bottom-right .feature-icon {
    display: flex;
    justify-content: flex-start;
}

/* --- RESPONSIVE (Cho điện thoại & Tablet) --- */
@media (max-width: 991px) {
    .why-choose-layout {
        height: auto; /* Bỏ chiều cao cố định */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .center-image {
        position: relative; /* Bỏ absolute */
        top: auto; left: auto;
        transform: none;
        width: 300px;
        height: 300px;
        margin: 20px 0;
        order: 1; /* Cho ảnh lên đầu hoặc giữa tùy thích */
    }

    .feature-item {
        position: relative; /* Bỏ absolute */
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100%;
        max-width: 500px;
        text-align: center !important; /* Căn giữa hết trên mobile */
        order: 2;
    }

    .feature-icon {
        justify-content: center !important; /* Căn giữa icon */
    }
}

/* --- BẮT BUỘC: Làm Header trong suốt và đè lên ảnh --- */
.site-header {
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent) !important; /* Hiệu ứng đen mờ dần xuống dưới cho dễ đọc chữ */
    /* Hoặc dùng: background: transparent !important; nếu muốn trong suốt hoàn toàn */
    
    position: absolute !important; /* Quan trọng: Lệnh này giúp header nổi lên trên slide */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999; /* Đảm bảo nó nằm trên cùng, không bị ảnh che */
    border-bottom: 1px solid rgba(255,255,255,0.15); /* Viền mờ cho đẹp */
}

/* Đảm bảo nội dung bên trong không bị lệch */
.header-main {
    background: transparent !important;
    box-shadow: none !important;
}

/* --- XỬ LÝ LỖI SLIDE BỊ ĐẨY XUỐNG (Nếu có) --- */
.hero-slider {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* --- CHỈNH MÀU CHỮ HEADER THÀNH TRẮNG --- */
/* Vì nền đang trong suốt đè lên ảnh tối, chữ phải màu trắng mới đọc được */
.header-contact a, 
.header-contact span,
.header-social a,
.header-info span,
.header-info i {
    color: #ffffff !important;
}

.header-social a:hover,
.header-contact a:hover {
    color: #7ed957 !important; /* Màu xanh khi di chuột vào */
}

/* ====================================================
   FIX LỖI GIAO DIỆN: HEADER TRONG SUỐT & SLIDE TRÀN VIỀN
   ==================================================== */

/* 1. Xử lý Header: Bắt buộc trong suốt và nổi lên trên */
.site-header {
    position: absolute !important; /* Nhấc header lên khỏi dòng chảy văn bản */
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent) !important; /* Màu nền đen mờ */
    z-index: 9999;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 0 !important;
}

/* Đảm bảo chữ trên header màu trắng */
.site-header a, 
.site-header span, 
.site-header i {
    color: #fff !important;
}

/* 2. Xử lý Slide: Bắt buộc chiều cao full màn hình */
.hero-slider,
.hero-slider .slick-list,
.hero-slider .slick-track {
    height: 100vh !important; /* Cao bằng 100% màn hình thiết bị */
    margin-bottom: 0 !important; /* Xóa khoảng trắng bên dưới */
    padding-bottom: 0 !important;
}

/* Xử lý từng tấm ảnh slide */
.hero-slide {
    height: 100vh !important; /* Bắt buộc ảnh cao bằng khung */
    width: 100%;
    background-size: cover !important; /* Ảnh phủ kín không bị méo */
    background-position: center center !important;
    display: flex !important;
    align-items: center; /* Căn giữa nội dung dọc */
    justify-content: center; /* Căn giữa nội dung ngang */
    margin: 0 !important;
}

/* Nếu slide của bạn dùng thẻ <img> thay vì background-image */
.hero-slide img {
    width: 100%;
    height: 100vh !important;
    object-fit: cover;
}

/* 3. Đưa các dấu chấm (dots) lên trên ảnh */
.hero-slider .slick-dots {
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
    z-index: 10;
}

/* 4. Xóa khoảng trắng thừa của phần Main */
.site-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 5. Responsive cho Mobile (Để không bị lỗi trên điện thoại) */
@media (max-width: 768px) {
    .hero-slider, 
    .hero-slide,
    .hero-slide img {
        height: 60vh !important; /* Trên điện thoại chỉ cao 60% màn hình thôi cho đẹp */
        min-height: 400px;
    }
}

/* --- CSS PHẦN GIỚI THIỆU (Giống ảnh 1) --- */
.about-section {
    padding: 80px 0;
    background: #f9f9f9;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Chia đôi màn hình: Ảnh - Chữ */
    gap: 50px;
    align-items: center;
}

.about-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.about-images img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.about-images img:hover {
    transform: translateY(-5px);
}

.about-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.about-text p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.8;
    text-align: justify;
}

.about-text .btn {
    background: #7ed957;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    display: inline-block;
    margin-top: 20px;
    text-transform: uppercase;
    font-weight: bold;
}

/* --- CSS CHÂN TRANG - FOOTER (Giống ảnh 2) --- */
.site-footer {
    background: #111; /* Màu nền đen */
    color: #bbb;
    padding: 70px 0 20px;
    font-size: 14px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Chia làm 4 cột đều nhau */
    gap: 30px;
    margin-bottom: 50px;
}

/* Tiêu đề widget */
.footer-widget h3, 
.footer-widget .widget-title {
    color: #7ed957; /* Màu xanh lá */
    font-size: 18px;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Danh sách link trong footer */
.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget ul li {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
}

.footer-widget ul li a {
    color: #bbb;
    transition: 0.3s;
}

.footer-widget ul li a:hover {
    color: #7ed957;
    padding-left: 5px;
}

/* Form tìm kiếm trong footer */
.footer-widget input[type="search"],
.footer-widget input[type="text"] {
    width: 100%;
    padding: 10px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    margin-bottom: 10px;
}

.footer-widget button {
    background: #7ed957;
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}

/* Dòng bản quyền dưới cùng */
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    color: #666;
}

/* Responsive cho Mobile */
@media (max-width: 768px) {
    .about-content,
    .footer-content {
        grid-template-columns: 1fr; /* Về 1 cột trên điện thoại */
    }
    .about-images {
        margin-bottom: 30px;
    }
}

/* FIX LỖI HIỆN DẤU CHẤM TRẮNG CỦA SLIDER */
.slick-dots, 
.slick-dots li {
    list-style: none !important; /* Bắt buộc loại bỏ kiểu danh sách */
    list-style-type: none !important;
}