/*
Theme Name: Xenhanh Theme (Green)
Theme URI: https://xeghepcaobang.vn
Author: LC Media
Description: Giao diện Xe Ghép Cao Bằng – tông xanh lá, gallery động.
Version: 1.0
*/

/* ===== PALETTE ===== */
:root{
  --green-700:#145c2b;
  --green-600:#1b7b3a;   /* chủ đạo */
  --green-500:#2f9e44;
  --green-100:#eaf7ef;
  --blue-900:#0d3b66;
  --text:#333;
  --muted:#667085;
  --border:#e7eef5;
  --white:#fff;
}

/* ===== RESET ===== */
*{margin:0;padding:0;box-sizing:border-box}
html,body{scroll-behavior:smooth}
body{font-family:"Inter","Segoe UI",Arial,sans-serif;color:var(--text);background:#f7faf9;line-height:1.6}
img{max-width:100%;height:auto;display:block}
a{text-decoration:none;color:inherit;transition:.25s}
a:hover{opacity:.85}

/* ===== LAYOUT ===== */
.container{width:92%;max-width:1200px;margin:auto}
.section{padding:64px 0}
h1,h2,h3,h4{color:var(--blue-900)}
h2{font-size:2rem;text-align:center;margin-bottom:28px}
.sub{color:var(--muted);font-size:.95rem}

/* ===== BUTTONS ===== */
.btn,.btn-primary{
  background:var(--green-600);
  color:#fff;border:none;border-radius:10px;
  padding:12px 28px;font-weight:700;cursor:pointer;display:inline-block
}
.btn:hover,.btn-primary:hover{background:var(--green-700)}
.btn--outline{background:transparent;border:2px solid var(--green-600);color:var(--green-600)}
.btn-call{background:#e03131;color:#fff}
.btn-call:hover{background:#c92a2a}

/* ===== HEADER ===== */
.main-header{
  position:fixed;top:0;left:0;width:100%;
  background:#eaf7ef; /* nền sáng để logo xanh nổi bật */
  border-bottom:1px solid var(--border);
  box-shadow:0 6px 20px rgba(0,0,0,.04);z-index:999
}
.header-space{height:86px}
.header-inner{height:86px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.logo img{height:56px;width:auto;object-fit:contain}
.nav-menu{display:flex;align-items:center;gap:24px}
.nav-menu a{color:var(--blue-900);font-weight:600}
.nav-menu a:hover{color:var(--green-600)}
.btn-hotline{
  background:var(--green-600)!important;color:#fff!important;
  padding:10px 16px;border-radius:10px;font-weight:800
}
.menu-toggle{display:none;background:none;border:none;font-size:28px;color:var(--blue-900);cursor:pointer}

/* ===== HERO ===== */
.hero{background:linear-gradient(180deg,#ffffff 0%,#f4faf7 100%);padding:56px 0 32px}
.hero-container{display:flex;align-items:flex-start;justify-content:space-between;gap:48px}
.hero-form{
  flex:0 0 42%;background:#fff;border-radius:16px;border:1px solid var(--border);
  box-shadow:0 10px 30px rgba(0,0,0,.06);padding:24px
}
.hero-form h3{margin-bottom:12px;color:var(--blue-900)}
.hero-form input,.hero-form select,.hero-form textarea{
  width:100%;margin-bottom:12px;padding:10px 12px;border-radius:10px;border:1px solid #d6dee6;font-size:14px
}
.hero-form button{width:100%}
.hero-info{flex:1}
.hero-logo{width:240px;height:auto;display:block;margin-bottom:15px;object-fit:contain}
.hero-info h1{font-size:2.4rem;margin-bottom:12px}
.hero-info p{margin-bottom:16px;color:var(--muted)}
.hero-buttons{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.btn-primary{box-shadow:0 3px 10px rgba(27,123,58,.2)}
.btn-primary:hover{box-shadow:0 4px 15px rgba(27,123,58,.3);transform:translateY(-2px)}
.btn-hotline{border:2px solid var(--green-600);color:#fff;background:var(--green-600)}
.btn-hotline:hover{background:var(--green-700)}

/* ===== GRID & CARD ===== */
.grid{display:grid;gap:20px}
.grid-3{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}
.grid-4{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.card{background:#fff;border-radius:14px;padding:22px;border:1px solid var(--border)}
.shadow{box-shadow:0 8px 24px rgba(0,0,0,.06)}

/* ===== WHY (PILLS) ===== */
.pill{display:flex;align-items:center;gap:12px;background:#f3fbf6;border-radius:12px;padding:16px;border:1px solid #dff1e6}
.pill b{color:var(--green-600)}
.pill .sub{display:block;font-size:13px}

/* ===== SERVICES ===== */
#services{background:#fff}
#services .card{display:flex;flex-direction:column;justify-content:space-between;min-height:220px}
#services .card h3{color:var(--blue-900);margin-bottom:8px}
#services .card p{flex-grow:1;color:var(--muted);margin-bottom:14px}
#services .card .btn{align-self:flex-start}

/* ===== PRICING ===== */
.price-table{width:100%;border-collapse:collapse;margin-top:20px;background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 4px 20px rgba(0,0,0,.05)}
.price-table th,.price-table td{padding:14px 20px;text-align:left;border-bottom:1px solid #e5e5e5}
.price-table th{background:var(--green-600);color:#fff;font-weight:600;font-size:1.1rem}
.price-table td{font-size:1rem;color:#333}
.price-table tr:hover td{background:#f5fbf7}
.sub-note{text-align:center;margin-top:10px;color:#555}

/* ===== GALLERY ===== */
#gallery .gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;margin-top:30px}
.gallery-item{text-align:center}
.gallery-thumb img{width:100%;height:220px;object-fit:cover;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,.08);transition:transform .3s ease, box-shadow .3s ease}
.gallery-thumb img:hover{transform:scale(1.03);box-shadow:0 6px 18px rgba(0,0,0,.15)}
.gallery-title{margin-top:8px;color:var(--green-600);font-weight:600;font-size:.95rem}

/* ===== TESTIMONIALS ===== */
#testimonials{background:#f8fbff}
.slider{display:flex;flex-wrap:wrap;gap:22px;justify-content:center}
.testimonial{
  width:320px;background:#fff;border:1px solid var(--border);
  border-radius:14px;padding:22px;text-align:center;box-shadow:0 8px 24px rgba(0,0,0,.05)
}
#testimonials .avatar,#testimonials img,#testimonials .testimonial img{
  width:100px !important;height:100px !important;border-radius:50% !important;
  object-fit:cover !important;margin:0 auto 12px !important;box-shadow:0 3px 8px rgba(0,0,0,.18) !important;display:block
}
.testimonial h4{color:var(--blue-900);font-size:1rem;margin-bottom:6px}
.testimonial p{color:var(--muted)}
.testimonial .stars{display:flex;justify-content:center;gap:4px;margin:8px 0}
.testimonial .stars i{color:#f1c40f;font-size:1rem;text-shadow:0 1px 3px rgba(0,0,0,.1)}

/* ===== FAQ ===== */
details{background:#fff;border:1px solid var(--border);border-radius:12px;margin-bottom:10px;padding:14px 18px}
details summary{cursor:pointer;font-weight:700;color:var(--blue-900)}

/* ===== CONTACT (form chung) ===== */
.form input,.form select,.form textarea{width:100%;margin-bottom:10px;border:1px solid #d6dee6;border-radius:10px;padding:10px}
.form button{width:100%;background:var(--green-600);color:#fff;border:none;border-radius:10px;padding:12px;font-weight:700}
.form button:hover{background:var(--green-700)}

/* ===== FOOTER ===== */
.site-footer{background:var(--green-100);color:#1b1b1b;padding:48px 0 18px;margin-top:24px;border-top:1px solid var(--border)}
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:28px;margin-bottom:20px}
.footer-logo{width:160px;margin-bottom:10px}
.footer-about p{color:#2b3d31}
.footer-contact h4,.footer-social h4{color:#0d3b66;margin-bottom:10px}
.footer-contact a{color:#0d3b66}
.footer-contact a:hover{color:#1b7b3a}
.social-links a{display:inline-block;background:var(--green-500);color:#fff;padding:8px 10px;border-radius:8px;margin-right:8px}
.social-links a:hover{background:var(--green-600)}
.footer-bottom{border-top:1px solid var(--border);text-align:center;padding-top:12px;color:#2b3d31;font-size:.9rem}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px){
  .menu-toggle{display:block}
  .nav-menu{
    display:none;position:absolute;top:86px;left:0;width:100%;
    background:#fff;flex-direction:column;align-items:center;padding:14px 0;
    border-bottom:1px solid var(--border);box-shadow:0 10px 24px rgba(0,0,0,.08)
  }
  .nav-menu.active{display:flex;animation:fadeIn .25s ease}
  .nav-menu a{width:100%;text-align:center;padding:12px 0;border-bottom:1px solid var(--border)}
  .btn-hotline{margin-top:8px}
  .hero-container{flex-direction:column-reverse}
  .hero-form,.hero-info{flex:1;width:100%}
  .hero-info{text-align:center}
  .hero-logo{margin:0 auto 12px}
}
@keyframes fadeIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}
/* ==== TẠI SAO CHỌN CHÚNG TÔI (CẬP NHẬT ĐẸP HƠN) ==== */
#why {
  background: #fff;
}

#why .grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  justify-content: center;
  align-items: stretch;
}

#why .pill {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--green-100);
  border: 1px solid #dcefe1;
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 4px 14px rgba(27, 123, 58, 0.08);
  transition: all 0.25s ease;
}

#why .pill:hover {
  transform: translateY(-5px);
  background: #f1faf4;
  box-shadow: 0 6px 18px rgba(27, 123, 58, 0.12);
}

#why .pill b {
  color: var(--green-600);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: block;
}

#why .pill .sub {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

#why .pill {
  font-size: 2rem; /* kích thước icon */
  color: var(--green-600);
}

#why .pill div {
  flex: 1;
  text-align: left;
}

/* Responsive mobile */
@media (max-width: 600px) {
  #why .pill {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 20px 16px;
  }
  #why .pill div {
    text-align: center;
  }
}
/* ==== TIÊU ĐỀ SECTION (GẠCH 2 BÊN – TỐI ƯU TOÀN MÀN HÌNH) ==== */
.section h2 {
  position: relative;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 50px;
  line-height: 1.3;
  display: inline-block;
}

/* Container căn giữa tiêu đề trong section */
.section h2::before,
.section h2::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 3px;
  background: var(--green-600);
  border-radius: 3px;
  opacity: 0.9;
  transition: all 0.3s ease;
}

/* Gạch trái */
.section h2::before {
  right: 100%;
  margin-right: 16px;
}

/* Gạch phải */
.section h2::after {
  left: 100%;
  margin-left: 16px;
}

/* Hiệu ứng nhẹ khi hover */
.section h2:hover::before,
.section h2:hover::after {
  width: 70px;
  opacity: 1;
}

/* Căn giữa trong khối section */
.section {
  text-align: center;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .section h2 {
    font-size: 1.7rem;
    margin-bottom: 40px;
  }
  .section h2::before,
  .section h2::after {
    width: 40px;
    height: 2.5px;
    margin: 0 10px;
  }
}

@media (max-width: 480px) {
  .section h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
  .section h2::before,
  .section h2::after {
    width: 28px;
    height: 2px;
    margin: 0 8px;
  }
}
/* ==== TIÊU ĐỀ SECTION (GẠCH 2 BÊN – MÀU VÀNG LOGO, RESPONSIVE) ==== */
.section {
  text-align: center;
}

.section h2 {
  position: relative;
  display: inline-block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 50px;
  line-height: 1.3;
}

/* Hai gạch hai bên */
.section h2::before,
.section h2::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 3px;
  background: #ffc107; /* 🎨 vàng logo */
  border-radius: 3px;
  opacity: 0.95;
  transition: all 0.3s ease;
}

/* Gạch trái */
.section h2::before {
  right: 100%;
  margin-right: 16px;
}

/* Gạch phải */
.section h2::after {
  left: 100%;
  margin-left: 16px;
}

/* Hiệu ứng hover nhẹ */
.section h2:hover::before,
.section h2:hover::after {
  width: 72px;
  background: #ffb703; /* vàng đậm hơn khi hover */
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .section h2 {
    font-size: 1.7rem;
    margin-bottom: 40px;
  }
  .section h2::before,
  .section h2::after {
    width: 40px;
    height: 2.5px;
    margin: 0 10px;
  }
}

@media (max-width: 480px) {
  .section h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
  .section h2::before,
  .section h2::after {
    width: 28px;
    height: 2px;
    margin: 0 8px;
  }
}
/* ==== CÂN CHỈNH 2 NÚT TRONG HERO ==== */
.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 160px; /* Độ rộng tối thiểu đồng đều */
  height: 48px;     /* Cố định chiều cao */
  font-weight: 700;
  border-radius: 10px;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Nút Đặt xe ngay */
.hero-buttons .btn-primary {
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 3px 10px rgba(27, 123, 58, 0.2);
}
.hero-buttons .btn-primary:hover {
  background: var(--green-700);
  transform: translateY(-2px);
}

/* Nút Gọi hotline */
.hero-buttons .btn-hotline {
  background: #fff;
  color: var(--green-700);
  border: 2px solid var(--green-600);
  font-weight: 800;
}
.hero-buttons .btn-hotline:hover {
  background: var(--green-100);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .hero-buttons a {
    width: 100%;
    max-width: 320px;
    height: 50px;
  }
}
/* ==== FLOATING CONTACT BUTTONS ==== */
.floating-contact {
  position: fixed;
  right: 20px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  z-index: 9999;
}

/* Nút Zalo */
.floating-contact .btn-zalo {
  width: 52px;
  height: 52px;
  background: #0084ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  animation: floatPulse 2s infinite;
  transition: transform .25s ease;
}
.floating-contact .btn-zalo img {
  width: 28px;
  height: 28px;
}
.floating-contact .btn-zalo:hover {
  transform: scale(1.08);
  background: #0073e6;
}

/* Nút gọi điện */
.floating-contact .btn-call {
  width: 52px;
  height: 52px;
  background: #28a745;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  transition: all .25s ease;
  animation: ringPhone 1.8s infinite;
}
.floating-contact .btn-call:hover {
  background: #1b7b3a;
  transform: scale(1.1);
}

/* Hiệu ứng rung điện thoại */
@keyframes ringPhone {
  0% { transform: rotate(0deg); }
  2% { transform: rotate(15deg); }
  4% { transform: rotate(-10deg); }
  6% { transform: rotate(15deg); }
  8% { transform: rotate(-10deg); }
  10% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* Hiệu ứng nổi nhẹ */
@keyframes floatPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Responsive - thu nhỏ khi màn hình nhỏ */
@media (max-width: 600px) {
  .floating-contact {
    right: 12px;
    bottom: 80px;
    gap: 10px;
  }
  .floating-contact .btn-zalo,
  .floating-contact .btn-call {
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
  }
  .floating-contact .btn-zalo img {
    width: 24px;
    height: 24px;
  }
}
/* ==== ZALO CHAT POPUP VỊ TRÍ ==== */
.zalo-chat-widget {
  position: fixed !important;
  bottom: 90px !important;
  right: 20px !important;
  z-index: 99999 !important;
}

/* Nếu có nút call hoặc zalo tròn ở trên thì chỉnh lại khoảng cách */
@media (max-width: 600px) {
  .zalo-chat-widget {
    bottom: 70px !important;
    right: 12px !important;
    transform: scale(0.95);
  }
}
/* ==== FIX ZALO ICON FLOATING ==== */
.floating-contact .btn-zalo {
  width: 52px;
  height: 52px;
  background: #0084ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: transform .25s ease, background .25s ease;
}

.floating-contact .btn-zalo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) invert(1); /* đảm bảo icon trắng trên nền xanh */
}

.floating-contact .btn-zalo:hover {
  background: #006fe0;
  transform: scale(1.08);
}
/* ==== CĂN GIỮA NÚT ĐẶT NGAY TRONG PHẦN DỊCH VỤ ==== */
#services .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center; /* ✅ căn giữa mọi thứ theo chiều ngang */
  text-align: center; /* ✅ nội dung giữa luôn */
}

#services .card .btn {
  align-self: center; /* ✅ đảm bảo nút nằm giữa cả khi card dùng flex */
  margin-top: 10px;
  min-width: 120px;
}

/* Đảm bảo chữ & khoảng cách đều trên mobile */
@media (max-width: 768px) {
  #services .card {
    align-items: center;
    text-align: center;
  }
  #services .card .btn {
    width: 100%;
    max-width: 220px;
  }
}
/* ==== CĂN TRÁI PHẦN FAQ – GIỮ TIÊU ĐỀ GIỮA ==== */
#faq {
  text-align: center; /* tiêu đề giữ nguyên giữa */
}

#faq details {
  text-align: left; /* nội dung FAQ căn trái */
  max-width: 700px;
  margin: 0 auto 14px; /* căn giữa toàn khối trong vùng hiển thị */
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.25s ease;
}

/* Hover & mở rộng FAQ mượt */
#faq details:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--green-500);
}

#faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue-900);
  list-style: none;
  position: relative;
  padding-left: 24px;
}

/* Mũi tên tuỳ chỉnh (đẹp hơn mặc định) */
#faq summary::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green-600);
  font-size: 1.2rem;
  transition: transform 0.25s ease;
}

/* Khi mở câu hỏi – xoay mũi tên */
#faq details[open] summary::before {
  transform: rotate(90deg);
  color: var(--green-700);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  #faq details {
    max-width: 95%;
    padding: 12px 14px;
  }
}
/* ==== FIX HERO FEATURES BULLETS ==== */
.hero-features {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}
.hero-features li {
  margin-bottom: 6px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* ==== CĂN GIỮA HERO FEATURES ==== */
.hero-features {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
  text-align: center; /* ✅ căn giữa toàn bộ danh sách */
  display: inline-block; /* ✅ giúp danh sách gọn lại ở giữa */
}

.hero-info {
  text-align: center; /* đảm bảo cả khối hero-info căn giữa */
}

.hero-features li {
  margin-bottom: 6px;
  display: flex;
  justify-content: center; /* ✅ căn giữa icon và chữ */
  align-items: center;
  gap: 6px;
  font-size: 1rem;
}

