/*
Theme Name: Sons Logistics
Theme URI: https://fuxiangenergy.local
Author: Sons Logistics
Description: Custom WordPress theme for Sons Logistics.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fuxiangenergy
Tags: custom-menu, featured-images, responsive-layout, one-page
*/

/* === Base === */
html {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  color: #222;
  overflow-x: hidden;
  max-width: 100vw;
}

/* === Navbar === */
.navbar {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.navbar.scrolled {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #0b2c4d;
  text-decoration: none;
  transition: color 0.35s ease;
}

.navbar.scrolled .navbar-brand {
  color: #0b2c4d;
}

.navbar-brand img,
.navbar-brand .custom-logo,
img.custom-logo {
  height: 48px !important;
  width: auto !important;
  max-width: 130px !important;
  object-fit: contain;
  display: block;
}

@media (max-width: 991.98px) {
  .navbar-brand img,
  .navbar-brand .custom-logo,
  img.custom-logo {
    height: 42px !important;
    max-width: 120px !important;
  }

  .navbar-brand-name span:first-child {
    font-size: 16px !important;
  }

  .navbar-brand-name span:last-child {
    font-size: 11px !important;
  }
}

.navbar-brand-name {
  line-height: 1.1;
}

/* Logo: luôn hiện màu gốc */
img.custom-logo {
  filter: none;
}

.custom-logo-white {
  display: none;
}

.fw-800 {
  font-weight: 800;
}

.navbar-toggler {
  border-color: rgba(0, 0, 0, 0.2);
  transition: border-color 0.35s ease;
}

.navbar-toggler-icon {
  filter: none;
}

.nav-link {
  font-weight: 600;
  color: #222 !important;
  margin-left: 18px;
  position: relative;
  padding-bottom: 4px !important;
  transition: color 0.2s ease;
}

/* Underline indicator */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #0d6efd;
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

.nav-link:hover,
.nav-link.active {
  color: #0d6efd !important;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: #0d6efd !important;
}

/* Language switcher */
.lang-trigger {
  display: inline-flex !important;
  width: fit-content;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border: 1px solid rgba(11, 44, 77, 0.25);
  border-radius: 20px;
  padding: 6px 14px !important;
  margin-left: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.lang-trigger:hover {
  background: #f0f4ff;
  border-color: #0d6efd;
}

.lang-trigger-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-trigger-code {
  letter-spacing: 0.5px;
}

.lang-trigger-caret {
  font-size: 0.7rem;
  margin-left: 1px;
  transition: transform 0.2s ease;
}

.lang-trigger[aria-expanded="true"] .lang-trigger-caret {
  transform: rotate(180deg);
}

.navbar.scrolled .lang-trigger {
  border-color: rgba(11, 44, 77, 0.25);
  color: #222 !important;
}

.navbar.scrolled .lang-trigger:hover {
  background: #f0f4ff;
  border-color: #0d6efd;
}

.lang-trigger::after {
  display: none !important;
}

.lang-dropdown {
  min-width: 160px;
  padding: 6px 0;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.lang-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 16px !important;
  font-weight: 500;
  color: #333 !important;
  transition: background 0.15s;
}

.lang-item:hover {
  background: #f0f4ff !important;
  color: #0d6efd !important;
}

.lang-item.active {
  background: #f0f4ff !important;
  color: #0d6efd !important;
  font-weight: 600;
}

.lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-name {
  flex: 1;
}

.lang-check {
  font-size: 0.95rem;
  color: #0d6efd;
  font-weight: 700;
}

/* Navbar dropdown */
.navbar .dropdown-menu {
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  min-width: 100px;
}

.navbar .dropdown-item {
  font-weight: 600;
  color: #222;
  padding: 8px 18px;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item.active {
  color: #0d6efd;
  background: #f0f4ff;
}

/* Mobile/tablet: navbar cùng màu sắc & style với desktop (nền trắng, chữ tối) */
@media (max-width: 991.98px) {
  .navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .navbar-brand {
    color: #0b2c4d !important;
  }

  /* Toggle button: to hơn, cùng màu tối như chữ menu desktop */
  .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  }

  .navbar-toggler-icon {
    width: 1.6em;
    height: 1.6em;
  }

  /* Menu collapse: khoảng cách + phân tách rõ giữa các mục */
  .navbar-collapse {
    padding-top: 14px;
    padding-bottom: 10px;
  }

  .navbar-nav {
    margin-left: 0 !important;
  }

  .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .navbar-nav .nav-item:last-child {
    border-bottom: none;
  }

  .nav-link {
    color: #222 !important;
    margin-left: 0;
    padding: 12px 4px !important;
  }

  .nav-link::after {
    display: none;
  }

  .navbar.scrolled .nav-link {
    color: #222 !important;
  }

  .navbar.scrolled .nav-link:hover,
  .navbar.scrolled .nav-link.active,
  .nav-link:hover,
  .nav-link.active {
    color: #0d6efd !important;
    background: #f0f4ff;
    border-radius: 6px;
  }

  /* Language switcher: nút riêng biệt, không kéo dài hết chiều rộng */
  .navbar-collapse .navbar-nav.ms-3 {
    margin-left: 0 !important;
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .lang-trigger,
  .navbar.scrolled .lang-trigger {
    color: #222 !important;
    background: transparent;
    border-color: rgba(11, 44, 77, 0.25);
    padding: 8px 16px !important;
  }

  .lang-trigger:hover,
  .navbar.scrolled .lang-trigger:hover {
    background: #f0f4ff;
    border-color: #0d6efd;
  }

  .lang-trigger-caret {
    color: rgba(11, 44, 77, 0.7);
  }

  .lang-dropdown {
    margin-top: 8px;
  }
}

/* === Hero === */
.hero {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: #fff;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero p {
  font-size: 20px;
  max-width: 760px;
  margin: 20px auto;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.6rem;
  text-decoration: none;
  animation: scrollBounce 1.8s ease-in-out infinite;
  transition: color 0.2s;
}

.hero-scroll-indicator:hover {
  color: #fff;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.7; }
  50%       { transform: translateX(-50%) translateY(10px); opacity: 1;   }
}

@media (max-width: 576px) {
  .hero-cta .btn {
    display: block;
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: 12px;
  }
}

/* === Sections === */
section[id] {
  scroll-margin-top: 72px;
}

.section-padding {
  padding: 90px 0;
}

.section-title {
  font-weight: 800;
  text-transform: uppercase;
  color: #0b2c4d;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 16px;
  width: fit-content;
}

.text-center .section-title {
  margin-left: auto;
  margin-right: auto;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: #0d6efd;
  border-radius: 2px;
}

.section-subtitle {
  color: #666;
  max-width: 760px;
  margin: 0 auto 45px;
}

/* About Us / Equipment Rental: title căn trái theo cột trên desktop,
   nhưng căn giữa trên mobile/tablet để đồng nhất với các section khác */
@media (max-width: 991.98px) {
  .section-title-center-mobile {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
}

/* === Service cards === */
.service-card {
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-8px);
}

.service-card img {
  height: 230px;
  object-fit: cover;
}

/* Services Swiper */
.services-swiper {
  padding: 8px 4px 48px !important;
}

.services-swiper .service-card {
  height: 100%;
}

.services-swiper-pagination {
  bottom: 4px !important;
}

.services-swiper-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #cdd3da;
  opacity: 1;
  transition: width 0.2s, border-radius 0.2s, background 0.2s;
}

.services-swiper-pagination .swiper-pagination-bullet-active {
  width: 28px;
  border-radius: 5px;
  background: #0d6efd;
}


.icon-box {
  width: 58px;
  height: 58px;
  background: #0d6efd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 26px;
  margin-bottom: 18px;
}

/* === Dark section === */
.dark-section {
  background: #eaf0f8;
  color: #212529;
}

.dark-section .section-title {
  color: #0b2c4d;
}

.equipment-list li {
  margin-bottom: 10px;
}

/* === Project cards (legacy) === */
.project-card {
  transition: transform 0.25s, box-shadow 0.25s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}

.project-card-thumb {
  height: 220px;
  object-fit: cover;
}

.project-hero-img {
  max-height: 480px;
  object-fit: cover;
}

/* === Project Swiper === */
.project-swiper {
  padding-bottom: 56px !important;
}

/* Split layout: image left — content right */
.project-slide-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: none;
  min-height: 480px;
}

.project-slide-item--reverse {
  flex-direction: row-reverse;
}

.project-slide-img-wrap {
  flex: 0 0 50%;
  max-width: 50%;
  overflow: hidden;
  position: relative;
}

.project-slide-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.swiper-slide-active .project-slide-img-wrap img {
  transform: scale(1.04);
}

.project-slide-content {
  flex: 0 0 50%;
  max-width: 50%;
  background: #fff;
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}


.project-slide-desc {
  color: #495057;
  line-height: 1.75;
  margin-bottom: 20px;
}

.project-slide-desc p {
  margin-bottom: 0.5rem;
}

.project-slide-desc p:last-child {
  margin-bottom: 0;
}

.project-slide-tag {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #0b2c4d;
  line-height: 1.3;
  margin-bottom: 14px;
}

.project-slide-content h3 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0b2c4d;
  margin-bottom: 14px;
  line-height: 1.3;
}


.project-slide-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-slide-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.93rem;
  color: #343a40;
}

.project-slide-list li i {
  color: #0d6efd;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Pagination */
.project-swiper-pagination {
  bottom: 8px !important;
}

.project-swiper-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: #cdd3da;
  opacity: 1;
  transition: width 0.2s, border-radius 0.2s, background 0.2s;
}

.project-swiper-pagination .swiper-pagination-bullet-active {
  width: 28px;
  border-radius: 5px;
  background: #0d6efd;
}

/* Navigation arrows */
.project-swiper-prev,
.project-swiper-next {
  color: #fff !important;
  background: rgba(11, 44, 77, 0.65);
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  transition: background 0.2s;
  top: calc(50% - 28px) !important;
}

.project-swiper-prev:hover,
.project-swiper-next:hover {
  background: #0d6efd;
}

.project-swiper-prev::after,
.project-swiper-next::after {
  font-size: 18px !important;
}

/* Responsive: UI riêng cho mobile/tablet (kể cả iPad) — dạng card đứng, ảnh tỉ lệ cố định + nội dung gọn */
@media (max-width: 991.98px) {
  .project-swiper {
    padding-bottom: 40px !important;
  }

  .project-slide-item,
  .project-slide-item--reverse {
    flex-direction: column;
    min-height: unset;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .project-slide-img-wrap,
  .project-slide-content {
    flex: unset;
    max-width: 100%;
    width: 100%;
  }

  .project-slide-img-wrap {
    height: 0;
    padding-bottom: 62%;
  }

  .project-slide-content {
    padding: 22px 20px 26px;
  }

  .project-slide-tag {
    font-size: 1.35rem;
    margin-bottom: 10px;
  }

  .project-slide-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .project-slide-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 14px;
  }

  .project-slide-list li {
    font-size: 0.87rem;
  }

  /* Mũi tên trước/sau đè lên nội dung khi item cao — ưu tiên vuốt (swipe) + dấu chấm trên mobile.
     !important vì swiper-bundle.min.css (CDN) nạp sau style.css nên override display:flex mặc định. */
  .project-swiper-prev,
  .project-swiper-next {
    display: none !important;
  }

  .project-swiper-pagination {
    bottom: 4px !important;
  }
}

/* === Contact === */
.contact-box {
  background: #f8f9fa;
  border-radius: 18px;
  padding: 35px;
  height: 100%;
}

/* CF7 form → match Bootstrap #contactForm style */

/* Title inside CF7 form */
.contact-box .custom-contact-form h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #212529;
}

/* Reset <p> wrapper (CF7 wraps each field in <p>) */
.contact-box .wpcf7-form .form-group {
  margin-bottom: 1rem;
}

.contact-box .wpcf7-form .form-group p,
.contact-box .wpcf7-form .form-submit p {
  margin-bottom: 0;
}

/* Hide the <br> that CF7 places between label and input */
.contact-box .wpcf7-form p br {
  display: none;
}

/* Labels */
.contact-box .wpcf7-form label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 400;
  color: #212529;
}

/* Required asterisk — red like #contactForm's .text-danger */
.contact-box .wpcf7-form label span {
  color: #dc3545;
}

/* Span wrap → block so input fills full width */
.contact-box .wpcf7-form-control-wrap {
  display: block !important;
  width: 100% !important;
}

/* Inputs & textarea */
.contact-box .wpcf7-form .wpcf7-form-control:not([type="submit"]) {
  display: block !important;
  width: 100% !important;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #dee2e6;
  appearance: none;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-shadow: none;
}

.contact-box .wpcf7-form .wpcf7-form-control:not([type="submit"]):focus {
  color: #212529;
  background-color: #fff;
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Textarea height */
.contact-box .wpcf7-form textarea.wpcf7-form-control {
  height: 130px;
  resize: vertical;
}

/* Submit button — btn btn-primary rounded-pill px-5 */
.contact-box .wpcf7-form input[type="submit"] {
  display: inline-block;
  padding: 0.375rem 3rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
  background-color: #0d6efd;
  border: 1px solid #0d6efd;
  border-radius: 50rem;
  cursor: pointer;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  text-align: center;
  user-select: none;
}

.contact-box .wpcf7-form input[type="submit"]:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.contact-box .wpcf7-form input[type="submit"]:focus {
  box-shadow: 0 0 0 0.25rem rgba(49, 132, 253, 0.5);
  outline: 0;
}

/* Validation */
.contact-box .wpcf7-not-valid-tip {
  display: block;
  font-size: 0.875rem;
  color: #dc3545;
  margin-top: 0.25rem;
}

.contact-box .wpcf7-form .wpcf7-not-valid {
  border-color: #dc3545 !important;
}

/* Response output (success/error alert) */
.contact-box .wpcf7-response-output {
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.contact-box .wpcf7-form.sent .wpcf7-response-output {
  background-color: #d1e7dd;
  border-color: #badbcc;
  color: #0f5132;
}

.contact-box .wpcf7-form.failed .wpcf7-response-output,
.contact-box .wpcf7-form.invalid .wpcf7-response-output,
.contact-box .wpcf7-form.spam .wpcf7-response-output {
  background-color: #f8d7da;
  border-color: #f5c2c7;
  color: #842029;
}

/* === Back to top === */
#backToTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0b2c4d;
  color: #fff;
  border: none;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTop:hover {
  background: #0d6efd;
}

/* === Footer === */
footer.site-footer {
  background: #061a2e;
  color: #fff;
  padding: 28px 0;
}

/* === Blog / inner pages === */
.inner-page-content {
  padding: 100px 0 60px;
}

.post-card-inner {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  transition: .25s;
  height: 100%;
}

.post-card-inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}

.post-card-inner img {
  height: 200px;
  object-fit: cover;
}

.entry-content h2 { color: #0b2c4d; margin: 2rem 0 .75rem; }
.entry-content h3 { margin: 1.5rem 0 .5rem; }
.entry-content p  { margin-bottom: 1.1rem; }
.entry-content ul,
.entry-content ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.entry-content blockquote {
  border-left: 4px solid #0d6efd;
  padding: 12px 20px;
  background: #f0f4ff;
  border-radius: 0 8px 8px 0;
  color: #555;
  font-style: italic;
  margin: 1.5rem 0;
}

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1         { font-size: 34px; }
  .hero p          { font-size: 17px; }
  .section-padding { padding: 60px 0; }
}
