/*
Theme Name: Luc CM Car Rental
Theme URI: https://thuexetulaidananghoian.com
Author: Luc CM
Author URI: https://thuexetulaidananghoian.com
Description: Theme WordPress cho website cho thue xe tu lai Luc CM (Da Nang - Hoi An). Toi uu cho hien thi danh sach xe theo danh muc, bang gia, bai viet gioi thieu dich vu va FAQ.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hoang-phu-an
*/

/* ==========================================================================
   1. Bien mau & reset
   ========================================================================== */
:root {
  --color-primary: #c41e3a;
  --color-primary-dark: #9c1830;
  --color-primary-light: #e63954;
  --color-black: #111111;
  --color-black-soft: #1a1a1a;
  --color-white: #ffffff;
  --color-text: #222222;
  --color-text-muted: #666666;
  --color-bg-alt: #f6f6f6;
  --color-border: #e5e5e5;

  --font-base: "Segoe UI", "Roboto", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 6px;
  --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.08);
  --container-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  margin: 0 0 12px;
  line-height: 1.3;
  font-weight: 700;
}

p {
  margin: 0 0 14px;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 56px 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section-title {
  text-align: center;
  margin-bottom: 32px;
}

.section-title h2 {
  font-size: 28px;
  color: var(--color-black);
  display: inline-block;
  position: relative;
  padding-bottom: 14px;
}

.section-title h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 64px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
}

.section-title p {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-size: 15px;
}

.btn:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   2. Top bar
   ========================================================================== */
.topbar {
  background: var(--color-black);
  color: #cccccc;
  font-size: 13px;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}

.topbar__contact {
  display: flex;
  gap: 20px;
}

.topbar__contact a:hover {
  color: var(--color-primary-light);
}

.topbar__social {
  display: flex;
  gap: 12px;
}

.topbar__social a {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.topbar__social a:hover {
  background: var(--color-primary);
}

/* ==========================================================================
   3. Header chinh
   ========================================================================== */
.site-header {
  background: var(--color-black-soft);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-white);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.site-logo span {
  color: var(--color-primary);
}

.site-logo img {
  height: 56px;
  width: 56px;
  border-radius: 8px;
  display: block;
}

.footer-logo-img {
  height: 72px;
  width: 72px;
  border-radius: 8px;
  display: block;
  margin-bottom: 14px;
}

.main-nav {
  display: flex;
  gap: 22px;
}

.main-nav a {
  color: var(--color-white);
  font-weight: 600;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-primary-light);
  border-bottom-color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-hotline {
  color: var(--color-white);
  font-size: 14px;
}

.header-hotline strong {
  display: block;
  color: var(--color-primary-light);
  font-size: 16px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 26px;
  cursor: pointer;
}

/* ==========================================================================
   4. Hero
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--color-black) 0%, var(--color-black-soft) 100%);
  color: var(--color-white);
  padding: 64px 0;
  text-align: center;
}

.hero h1 {
  font-size: 34px;
  margin-bottom: 12px;
}

.hero span {
  color: var(--color-primary-light);
}

.hero p {
  color: #cccccc;
  max-width: 620px;
  margin: 0 auto 24px;
}

/* ==========================================================================
   4b. Khung banner anh lon (chen ngay duoi menu)
   ========================================================================== */
.hero-banner {
  background: var(--color-black);
}

.hero-banner__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 700;
  overflow: hidden;
  border-bottom: 4px solid var(--color-primary);
}

.hero-banner__slides {
  position: absolute;
  inset: 0;
}

.hero-banner__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.6s ease;
}

.hero-banner__slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-banner__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-banner__placeholder {
  position: absolute;
  inset: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #2a2a2a 0%, #141414 100%);
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  padding: 16px;
}

.hero-banner__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: var(--color-white);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner__arrow:hover {
  background: var(--color-primary);
}

.hero-banner__arrow--prev {
  left: 16px;
}

.hero-banner__arrow--next {
  right: 16px;
}

.hero-banner__dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-banner__dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-banner__dots button.is-active {
  background: var(--color-primary);
}

/* ==========================================================================
   5. Bo loc xe nhanh
   ========================================================================== */
.car-filter {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px;
  margin-top: -40px;
  position: relative;
  z-index: 5;
}

.car-filter form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.car-filter__field {
  flex: 1;
  min-width: 160px;
}

.car-filter__field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.car-filter select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--color-white);
}

/* ==========================================================================
   6. Danh muc xe / car cards
   ========================================================================== */
.car-category {
  margin-bottom: 44px;
}

.car-category__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.car-category__head h3 {
  font-size: 20px;
  color: var(--color-black);
  border-left: 4px solid var(--color-primary);
  padding-left: 10px;
  margin: 0;
}

.car-category__head a {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 600;
  white-space: nowrap;
}

.car-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.car-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.car-card__image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ececec, #d8d8d8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 10px;
}

.car-card__body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.car-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 6px;
}

.car-card__meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.car-card__price {
  color: var(--color-primary);
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 12px;
}

.car-card__price small {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 12px;
}

.car-card .btn {
  margin-top: auto;
  padding: 9px 0;
  text-align: center;
  font-size: 14px;
}

/* ==========================================================================
   7. Banner lon
   ========================================================================== */
.banner {
  position: relative;
  color: var(--color-white);
  background: linear-gradient(135deg, var(--color-black) 0%, var(--color-primary-dark) 120%);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 260px;
}

.banner__text {
  padding: 40px;
}

.banner__text h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.banner__text p {
  color: #e6c7cd;
  margin-bottom: 20px;
}

.banner__image {
  height: 100%;
  min-height: 260px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 13px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   8. Testimonials / hinh anh khach hang
   ========================================================================== */
.testimonial-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.testimonial-card,
.gallery-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.testimonial-card__image,
.gallery-card__image {
  aspect-ratio: 16 / 10;
  background: #eeeeee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-size: 13px;
  font-weight: 600;
}

.testimonial-card__body {
  padding: 16px;
}

.testimonial-card__body .stars {
  color: #f5a623;
  margin-bottom: 8px;
  font-size: 14px;
}

.testimonial-card__body .name {
  font-weight: 700;
  color: var(--color-black);
  margin-top: 8px;
}

/* ==========================================================================
   9. Bai viet noi dung dai
   ========================================================================== */
.article {
  max-width: 860px;
  margin: 0 auto;
}

.article h2 {
  font-size: 24px;
  color: var(--color-black);
  margin-top: 40px;
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  font-size: 18px;
  color: var(--color-primary-dark);
  margin-top: 22px;
}

.article ul {
  margin: 0 0 14px;
  padding-left: 20px;
  list-style: disc;
}

.article ul li {
  margin-bottom: 6px;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.article table th,
.article table td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
}

.article table th {
  background: var(--color-black);
  color: var(--color-white);
}

.article table tr:nth-child(even) td {
  background: var(--color-bg-alt);
}

/* ==========================================================================
   10. FAQ accordion
   ========================================================================== */
.faq {
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item__question {
  width: 100%;
  text-align: left;
  background: var(--color-white);
  border: none;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item__question:hover {
  color: var(--color-primary);
}

.faq-item__question::after {
  content: "+";
  font-size: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.faq-item.is-open .faq-item__question::after {
  content: "\2212";
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: var(--color-bg-alt);
}

.faq-item__answer-inner {
  padding: 0 18px 16px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ==========================================================================
   11. Lien he
   ========================================================================== */
.contact-box {
  background: var(--color-black-soft);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  align-items: center;
}

.contact-box h2 {
  color: var(--color-white);
  border: none;
  padding: 0;
}

.contact-box p {
  color: #cccccc;
}

.contact-box__list {
  display: grid;
  gap: 12px;
}

.contact-box__list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: #dddddd;
}

.contact-box__list strong {
  color: var(--color-white);
}

/* ==========================================================================
   12. Footer
   ========================================================================== */
.site-footer {
  background: var(--color-black);
  color: #bbbbbb;
  padding-top: 50px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
  padding-bottom: 40px;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 15px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a:hover {
  color: var(--color-primary-light);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.footer-social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-social a:hover {
  background: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: #888888;
}

/* ==========================================================================
   13. Trang chi tiet xe / archive
   ========================================================================== */
.car-detail {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: start;
}

.car-detail__image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ececec, #d8d8d8);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-weight: 600;
}

.car-detail__box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.car-detail__price {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.car-detail__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 14px;
}

.car-detail__specs li {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--color-primary);
}

/* ==========================================================================
   14. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  /* Tablet (dung, ngang) tro xuong: menu chinh qua nhieu muc (6 muc) + logo +
     hotline + nut CTA khong du cho trong 1 hang, nen chuyen sang menu hamburger
     tu day thay vi doi den 768px, tranh header bi tran/chong chu tren tablet. */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-black-soft);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .main-nav.is-open {
    max-height: 400px;
    overflow-y: auto;
  }

  .main-nav a {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
  }

  .header-hotline {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .car-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .banner {
    grid-template-columns: 1fr;
  }

  .banner__image {
    min-height: 180px;
  }

  .testimonial-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    grid-template-columns: 1fr;
  }

  .car-detail {
    grid-template-columns: 1fr;
  }

  /* Khong doi ty le hero-banner: 3 anh banner da thiet ke san logo/hotline/CTA
     ngay trong anh, phai giu dung ty le goc (~1920:700) de object-fit: cover
     khong cat mat logo/hotline o 2 canh khi thu nho man hinh. */
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }

  .car-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .car-filter form {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .car-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 26px;
  }

  .banner__text {
    padding: 26px;
  }

  .contact-box {
    padding: 24px;
  }

  /* Man hinh dien thoai rat hep: thu gon logo/nut CTA de khong bi tran hang. */
  .site-logo span {
    display: none;
  }

  .site-logo img {
    height: 44px;
    width: 44px;
  }

  .header-actions .btn {
    padding: 9px 16px;
    font-size: 13px;
  }

  .hero-banner__arrow {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .hero-banner__dots button {
    width: 8px;
    height: 8px;
  }
}
