 /* 全局樣式 */
 :root {
  --dark-blue: #1a3c5c;
  --light-blue: #3498db;
  --sky-blue: #87CEEB;
  --navy-blue: #000080; 
 --primary-blue: #1a3c5c;
 --secondary-blue: #3498db;
 --hover-blue: #2980b9;
 --text-color: #ffffff;
}

body {
  font-family: Arial, sans-serif;
  color: #333;
}

 main {
  min-height: 80vh;
 }

/* 頁首樣式 */
.site-header {
  background: linear-gradient(to bottom, var(--dark-blue), var(--light-blue));
  padding: 15px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 50px;
  margin-right: 10px;
}

.site-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

.user-actions a {
  color: white;
  text-decoration: none;
  margin-left: 15px;
  transition: color 0.3s ease;
}

.user-actions a:hover {
  color: var(--sky-blue);
}
@media (max-width: 991.98px) {
  .header-top {
      flex-direction: column;
      align-items: flex-start;
  }
  .logo {
    width: 100%;
    display: block;
  }
  .site-name {
      display: block;

  }
  .user-actions {
      width: 100%;
      justify-content: flex-start;
  }
  .user-actions a {
      margin: 5px 10px 5px 0;
  }
  .menu-toggle {
      display: inline-block;
      font-size: 1.5rem;
      margin-right: 15px;
  }
  .user-actions a[href="/profile"] {
      display: none;
  }
}

.main-nav {
  background: rgba(255, 255, 255, 0.1);   
  background-color: var(--secondary-blue);
}

.nav-list {
  display: flex;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  transition: background-color 0.3s ease;
}

.nav-link:hover, .nav-link:focus {
  background-color: rgba(255, 255, 255, 0.2);
}

/* menu */

.menu-toggle, .menu > li > a.menu-close {
 display: none;
}

.menu {
 list-style-type: none;
 padding: 0;
 margin: auto;
 display: flex;
 flex-wrap: wrap;
}

.menu > li {
 position: relative;
}

.menu > li > a {
 display: block;
 padding: 15px 20px;
 color: var(--text-color);
 text-decoration: none;
 transition: all 0.3s ease;
}

.menu > li:hover > a,
.menu > li.active > a {
 background-color: var(--secondary-blue);
 color: var(--text-color);
}

.dropdown {
 display: none;
 position: absolute;
 top: 100%;
 left: 0;
 background-color: var(--secondary-blue);
 box-shadow: 0 4px 6px rgba(0,0,0,0.1);
 z-index: 1000;
 min-width: 200px;
 margin: 0;
 padding: 0;
 border-radius: 0 0 4px 4px;
}

.menu > li:hover .dropdown {
 display: block;
 animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
 from { opacity: 0; transform: translateY(-10px); }
 to { opacity: 1; transform: translateY(0); }
}
.dropdown li {
 display: block;
}

.dropdown a {
 display: block;
 padding: 12px 20px;
 color: var(--text-color);
 text-decoration: none;
 transition: all 0.3s ease;
}

.dropdown a:hover {
 background-color: var(--hover-blue);
 padding-left: 25px;
}

.mobile {
 display: none;
}

@media (max-width: 768px) {
 .menu-toggle {
     display: block;
     position: fixed;
     top: 10px;
     right: 10px;
     z-index: 1001;
     color: var(--text-color);
     border: none;
     padding: 10px;
     font-size: 1.5em;
     text-decoration: none;
 }

 .favorites-link { display: none; }

 .menu {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background-color: var(--primary-blue);
     flex-direction: column;
     justify-content: center;
     align-items: center;
     z-index: 1000;
 }

 .menu:target {
     display: flex;
 }

 .menu > li {
     border-bottom: 1px solid var(--secondary-blue);
     width: 100%;
     text-align: center;
 }

 .dropdown {
     position: static;
     display: none;
     box-shadow: none;
     background-color: var(--secondary-blue);
     width: 100%;
 }

 .menu > li:hover .dropdown {
     display: none;
 }

 .menu > li > a:focus + .dropdown,
 .menu > li > a:active + .dropdown {
     display: block;
 }

 .dropdown a {
     color: var(--text-color);
 }

 .dropdown a:hover {
     background-color: var(--hover-blue);
 }

 .mobile {
     display: block;
 }

 .mobile-login a {
     display: inline-block;
     margin-right: 10px;
     color: var(--text-color);
 }

 .menu > li > a.menu-close {
     display: block;
     background: transparent;
     border: none;
     color: var(--text-color);
     font-size: 2em;
     text-decoration: none;
     padding: 0;
 }
}


/* 輪播圖樣式 */
.carousel-item {
 background-color: var(--sky-blue);
 transition: opacity 1s ease-in-out; /* 調整淡入淡出效果的持續時間 */
 opacity: 0; /* 初始設置為透明 */
}

.carousel-item.active {
 opacity: 1; /* 當項目變為活動狀態時設置為完全不透明 */
}

/* 桌面設備 */
@media (min-width: 768px) {
 .carousel-item {
   height: 400px;
 }
}


/* 章節標題樣式 */
.section-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-title {
  display: inline-block;
  font-size: 1.8rem;
  color: var(--dark-blue);
  margin: 0;
  padding: 10px 0;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--light-blue), transparent);
}

.title-icon {
  margin-right: 10px;
  font-size: 1.2em;
  color: var(--light-blue);
}

/* 車輛展示部分樣式 */
.car-section {
  background-color: #f0f8ff;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.car-section::before,
.car-section::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background-color: rgba(135, 206, 235, 0.1);
  border-radius: 50%;
}

.car-section::before {
  top: -100px;
  left: -100px;
}

.car-section::after {
  bottom: -100px;
  right: -100px;
}

.car-block {
  background-color: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.car-block:hover {
  transform: translateY(-5px);
}

.car-content {
  padding: 40px;
}
@media (max-width: 991.98px) {
  .car-content {
      padding: 5px;
  }
.car-content img  {
  max-width: 100%;
}
}

.car-subtitle {
  color: var(--dark-blue);
  font-size: 1.8rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
}

.car-subtitle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--light-blue);
}

.car-description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 25px;
}

.car-image-wrapper {
  position: relative;
  padding: 20px;
}

.car-image {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 最新消息部分樣式 */
.news-section {
  background-color: #f0f8ff;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.news-item {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  transition: transform 0.3s ease;
  display: flex;
}

.news-item:hover {
  transform: translateY(-5px);
}

.news-date {
  background-color: var(--dark-blue);
  color: #fff;
  padding: 15px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 100px;
}

.news-content {
  display: flex;
  flex: 1;
}

.news-image {
  width: 200px;
  overflow: hidden;
}

.news-text {
  padding: 20px;
  flex: 1;
}

.news-title {
  color: var(--dark-blue);
  font-size: 1.5rem;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 10px;
}

.news-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--light-blue);
}

/* 特色服務部分樣式 */
.services-section {
  position: relative;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.3);
}

.services-background {
  position: absolute;
  top: -50px;
  left: 0;
  right: 0;
  bottom: -50px;
  background-image: url('https://images.unsplash.com/photo-1611016186353-9af58c69a533?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.1;
  z-index: -1;
}

.service-item {
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.service-icon {
  font-size: 3rem;
  color: var(--light-blue);
  margin-bottom: 20px;
}

.service-title {
  color: var(--dark-blue);
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.service-description {
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}

/* 熱門車款部分樣式 */
.popular-cars {
  background-color: #f0f8ff;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.popular-cars::before,
.popular-cars::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border: 3px solid rgba(52, 152, 219, 0.3);
  border-radius: 50%;
  z-index: 0;
}

.popular-cars::before {
  top: -100px;
  left: -100px;
}

.popular-cars::after {
  bottom: -100px;
  right: -100px;
}

.car-slider-container {
  position: relative;
  padding: 0 50px;
}

.car-slider {
  display: flex;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.car-slide {
  flex: 0 0 100%;
  max-width: 300px;
  padding: 0 15px;
  scroll-snap-align: start;
}

.car-item {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.car-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.car-image {
  height: 200px;
  overflow: hidden;
}

.car-details {
  padding: 20px;
}

.car-name {
  font-size: 1.2rem;
  color: var(--dark-blue);
  margin-bottom: 10px;
}

.car-price {
  font-size: 1.1rem;
  color: var(--light-blue);
  font-weight: bold;
  margin-bottom: 15px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--dark-blue);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1;
}

.prev-arrow {
  left: 0;
}

.next-arrow {
  right: 0;
}

.slider-arrow:hover {
  background-color: var(--light-blue);
}

/* 頁尾樣式 */
.site-footer {
  background-color: var(--dark-blue);
  color: #ffffff;
  padding: 60px 0 20px;
  position: relative;
  margin-top: 3rem;
}

/* .site-footer::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 40px;
  background-color: var(--dark-blue);
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0% 100%);
}
 */
.footer-title {
  color: var(--light-blue);
  font-size: 1.5rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--light-blue);
}

.contact-info {
  list-style: none;
  padding: 0;
}

.contact-info li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.contact-info li i {
  margin-right: 10px;
  color: var(--light-blue);
}

.social-links {
  list-style: none;
  padding: 0;
  display: flex;
}

.social-links li {
  margin-right: 15px;
}

.social-links a {
  color: #ffffff;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--light-blue);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
  } 

  .car-block {
    margin-bottom: 20px;
  }

  .car-image {
    height: 200px;
    margin-top: 20px;
  }

  .news-item {
    flex-direction: column;
  }

  .news-date {
    flex-direction: row;
    justify-content: center;
    padding: 10px;
  }

  .news-date .day,
  .news-date .month {
    margin: 0 5px;
  }

  .news-content {
    flex-direction: column;
  }

  .news-image {
    width: 100%;
    height: 150px;
  }

  .site-footer [class^="col-"] {
    margin-bottom: 30px;
  }
}
/* 車輛相關裝飾元素 */
.car-decoration {
  position: absolute;
  opacity: 0.1;
  z-index: -1;
}

.car-wheel {
  width: 100px;
  height: 100px;
  border: 15px solid var(--dark-blue);
  border-radius: 50%;
  position: absolute;
}

.car-wheel::before {
  content: '';
  width: 20px;
  height: 20px;
  background-color: var(--dark-blue);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.car-wheel-1 {
  top: -50px;
  left: -50px;
}

.car-wheel-2 {
  bottom: -50px;
  right: -50px;
}

.car-silhouette {
  width: 200px;
  height: 80px;
  background-color: var(--light-blue);
  position: absolute;
  bottom: 20px;
  right: 20px;
  clip-path: polygon(0% 100%, 5% 80%, 15% 60%, 25% 50%, 70% 50%, 80% 60%, 90% 80%, 100% 100%);
}

/* 動畫效果 */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.car-block:hover .car-image {
  animation: float 3s ease-in-out infinite;
}

/* 按鈕樣式增強 */
.btn-primary {
  background-color: var(--light-blue);
  border-color: var(--light-blue);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--dark-blue);
  border-color: var(--dark-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 圖片佔位符樣式 */
.image-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--sky-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 添加一些微妙的背景圖案 */
.car-section, .news-section, .popular-cars {
  position: relative;
  background-color: #f0f8ff; /* 保持淡藍色背景 */
}

.car-section::before, .news-section::before, .popular-cars::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle, rgba(135, 206, 235, 0.1) 10%, transparent 10.5%),
    radial-gradient(circle, rgba(135, 206, 235, 0.1) 10%, transparent 10.5%);
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
  opacity: 0.5;
  z-index: 0;
}

.car-section::after, .news-section::after, .popular-cars::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(to right, rgba(135, 206, 235, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(135, 206, 235, 0.1) 1px, transparent 1px);
  background-size: 25px 25px;
  opacity: 0.3;
  z-index: 0;
}

/* 確保內容在背景之上 */
.car-section > *, .news-section > *, .popular-cars > * {
  position: relative;
  z-index: 1;
}

/* 增強 hover 效果 */
.service-item:hover .service-icon {
  transform: scale(1.1) rotate(10deg);
  transition: all 0.3s ease;
}

.news-item:hover .news-title {
  color: var(--light-blue);
  transition: color 0.3s ease;
}

/* 添加一些陰影效果 */
.section-title {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.car-subtitle, .service-title, .news-title {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* 添加一些過渡效果 */
.car-block, .news-item, .service-item, .car-item {
  transition: all 0.3s ease;
}

/* 自定義滾動條 */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--light-blue);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-blue);
}

/* 增強可訪問性 */
.nav-link:focus, .btn:focus, .social-links a:focus {
  outline: 2px solid var(--light-blue);
  outline-offset: 2px;
}

/* 打印樣式 */
@media print {
  .site-header, .site-footer, .carousel, .services-section {
    display: none;
  }

  .car-block, .news-item, .car-item {
    page-break-inside: avoid;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a::after {
    content: " (" attr(href) ")";
  }
}

.pagination {margin: 1rem 0 1rem 0;}
/* 將分頁容器設置為 flex 佈局 */
.pagination nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  font-size: 0.875rem; /* 14px */
}

/* 隱藏移動設備版本的分頁控件 */
.pagination .sm\:hidden {
  display: none;
}

/* 顯示桌面版本的分頁控件 */
.pagination .hidden.sm\:flex-1 {
  display: flex !important;
  flex: 1;
  align-items: center;
  justify-content: space-between;
}

/* 調整 "Showing X to Y of Z results" 文字 */
.pagination p {
  margin: 0 1rem 0 0;
  white-space: nowrap;
}

/* 調整分頁按鈕容器 */
.pagination .relative.z-0 {
  display: flex;
  align-items: center;
}

/* 調整分頁按鈕樣式 */
.pagination .relative.z-0 > * {
  margin: 0 0.25rem;
}

/* 調整分頁圖標大小 */
.pagination svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* 調整分頁按鈕的內邊距，使其更緊湊 */
.pagination .px-2, .pagination .px-4 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* 調整按鈕高度 */
.pagination .py-2 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* 可選：如果需要進一步縮小整體大小 */
.pagination {
  transform: scale(0.9);
  transform-origin: left center;
}





#featuredCars .car-slider-container {
  position: relative;
  overflow: hidden;
  padding: 0 30px;  /* Add padding for arrows */
}

#featuredCars .car-slider {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;  /* Firefox */
  -ms-overflow-style: none;  /* IE 10+ */
  padding: 30px;  
}

#featuredCars .car-slider::-webkit-scrollbar {
  display: none;  /* Chrome, Safari, newer versions of Opera */
}

#featuredCars .car-item {
  width: 300px;  /* Fixed width for all screen sizes */
  flex-shrink: 0;
  padding: 1rem;
  box-sizing: border-box;
  margin-right: 1rem;  /* Add right margin for spacing */
}

#featuredCars .slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  padding: 10px;
  cursor: pointer;
  z-index: 2;
}

#featuredCars .prev-arrow {
  left: 0;
}

#featuredCars .next-arrow {
  right: 0;
}

#featuredCars .car-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

#featuredCars .car-details {
  padding-top: 1rem;
}

#featuredCars .car-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

#featuredCars .car-price {
  font-size: 1.5rem;
  color: #dc3545;
  font-weight: bold;
  margin: 0.5rem 0;
}

#featuredCars .btn {
  width: 100%;
}

@media (max-width: 767px) {
  #featuredCars .car-slider-container {
      padding: 0 15px;  /* Reduce padding on mobile */
  }
  #featuredCars .car-slider{
    padding: 0px;  
  }

  #featuredCars .car-item {
      width: 85%;  /* Adjust width for mobile view */
  }

  #featuredCars .car-image img {
      height: 180px;  /* Slightly reduce image height on mobile */
  }

  #featuredCars .slider-arrow {
      display: none;  /* Hide arrows on mobile */
  }
}