/* =======================================================
 * S&B Autogroup Custom Styles
 * Centralized CSS file for consistent styling across pages
 * ======================================================= */

/* =======================================================
 * GLOBAL STYLES
 * ======================================================= */

/* Top header mobile responsive rules */
@media (max-width: 767.98px) {
  .mobile-hidden {
    display: none !important;
  }
}

/* Scroll-to-top button styling */
.scroll-top {
  background: linear-gradient(135deg, #dc2626, #000000) !important;
}

/* Beautiful Card Styles - Shared across pages */
.car-card-hover {
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.1);
}

.car-card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.car-image {
  transition: transform 0.3s ease;
}

.car-card-hover:hover .car-image {
  transform: scale(1.05);
}

.wishlist-btn {
  transition: all 0.2s ease;
}

.wishlist-btn:hover {
  transform: scale(1.1);
  background-color: white !important;
}

.whatsapp-btn {
  transition: all 0.2s ease;
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

/* Improved rounded corners */
.rounded-4 {
  border-radius: 1rem !important;
}

.rounded-3 {
  border-radius: 0.75rem !important;
}

/* =======================================================
 * SEARCH FUNCTIONALITY STYLES (for buycar.php)
 * ======================================================= */

/* Ensure suggestions dropdown works properly */
.suggestions {
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.suggestions > div {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  transition: background-color 0.2s;
}

.suggestions > div:hover {
  background-color: #f3f4f6;
}

.suggestions > div:last-child {
  border-bottom: none;
}

/* Models container styling */
.models-container {
  margin-top: 8px;
}

.models-container > div {
  padding: 8px 12px;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.models-container > div:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  transform: translateX(4px);
}

/* Selected items styling */
.selected-items > div {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin: 4px;
  background: linear-gradient(135deg, #dc2626, #000000);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.selected-items .delete {
  margin-left: 16px;
  padding-left: 12px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

.selected-items .delete:hover {
  color: #fca5a5;
}

/* Make sure dropdowns have proper text color */
#min_year option, #max_year option, #min_price option, #max_price option {
  color: #374151;
  background: white;
}

/* Fix search input placeholder in focus state */
#searchInput:focus::placeholder {
  color: rgba(55, 65, 81, 0.5);
}

/* Pagination styles */
.pagination {
  margin: 2rem 0;
}

.pagination .page-link {
  color: #dc2626;
  border: 1px solid #e5e7eb;
  padding: 0.75rem 1rem;
  margin: 0 0.125rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination .page-link:hover {
  color: white;
  background: linear-gradient(135deg, #dc2626, #000000);
  border-color: #dc2626;
  transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
  color: white;
  background: linear-gradient(135deg, #dc2626, #000000);
  border-color: #dc2626;
}

.pagination .page-item.disabled .page-link {
  color: #6b7280;
  background-color: #f9fafb;
  border-color: #e5e7eb;
}

/* =======================================================
 * CONTACT PAGE STYLES
 * ======================================================= */

/* Custom Contact Page Styles */
.contact-hero {
  background: linear-gradient(135deg, #dc2626 0%, #000000 100%);
  color: white;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.contact-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('assets/img/car.avif') center/cover;
  opacity: 0.1;
  z-index: 0;
}

.contact-hero .container {
  position: relative;
  z-index: 1;
}

.contact-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.1);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.contact-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #dc2626, #000000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: white;
  font-size: 28px;
}

.form-control:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #dc2626, #000000);
  border: none;
  padding: 15px 40px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

.map-container {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-info-item {
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
}

.contact-info-item:hover {
  background: rgba(220, 38, 38, 0.05);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #dc2626, #000000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

.breadcrumb {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 10px 20px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: white;
}

/* FAQ Accordion Styles */
.accordion-item {
  border-radius: 15px !important;
  /* overflow: hidden; removed to prevent hiding accordion content */
  margin-bottom: 1rem;
}

.accordion-button {
  background: white;
  color: #333;
  border: none;
  padding: 1.5rem;
  font-size: 1.1rem;
  position: relative;
  transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, #dc2626, #000000);
  color: white;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(220, 38, 38, 0.25);
  border-color: #dc2626;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
  padding: 1.5rem;
  background: #fafafa;
  color: #666;
  line-height: 1.7;
  overflow: visible !important;
  max-height: none !important;
}

/* Simplified accordion display rules */
.accordion-collapse {
  transition: none !important;
  overflow: visible !important;
  max-height: none !important;
}

.accordion-collapse.show {
  display: block !important;
  opacity: 1;
}

.accordion-collapse:not(.show) {
  display: none !important;
}

/* =======================================================
 * ABOUT PAGE STYLES
 * ======================================================= */

/* About Hero Section */
.about-hero {
  background: linear-gradient(135deg, #dc2626 0%, #000000 100%);
  color: white;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/car.avif') center/cover;
  opacity: 0.1;
  z-index: 0;
}

.about-hero .container {
  position: relative;
  z-index: 1;
}

/* Stats Cards */
.stats-card {
  background: white;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.1);
}

.stats-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.stats-number {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #dc2626, #000000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 15px;
}

/* Value Items */
.value-item {
  background: white;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid rgba(220, 38, 38, 0.1);
}

.value-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.value-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #dc2626, #000000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  color: white;
  font-size: 35px;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #dc2626, #000000);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin: 50px 0;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 50px;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 50px;
}

.timeline-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border: 4px solid #dc2626;
  border-radius: 50%;
  top: 10px;
}

.timeline-item:nth-child(odd) .timeline-marker {
  right: -10px;
}

.timeline-item:nth-child(even) .timeline-marker {
  left: -10px;
}

.timeline-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border: 1px solid rgba(220, 38, 38, 0.1);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Team Cards */
.team-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(220, 38, 38, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.team-image {
  height: 250px;
  background: linear-gradient(135deg, #dc2626, #000000);
  position: relative;
}

.team-image::after {
  content: '👤';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: white;
  opacity: 0.7;
}

.team-content {
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

/* Team Email Styling */
.email-contact {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(0, 0, 0, 0.05));
  padding: 12px 15px;
  border-radius: 12px;
  margin-top: auto;
  border: 1px solid rgba(220, 38, 38, 0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-contact:hover {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(0, 0, 0, 0.08));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.2);
}

.email-link {
  color: #dc2626;
  text-decoration: none;
  font-weight: 600;
  font-size: 10px;
  transition: all 0.3s ease;
}

.email-link:hover {
  color: #000000;
  text-decoration: underline;
}

/* Mobile Responsive Timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 60px !important;
    padding-right: 0 !important;
  }
  
  .timeline-marker {
    left: 10px !important;
    right: auto !important;
  }
  
  .stats-number {
    font-size: 2.5rem;
  }
  
  .value-icon {
    width: 60px;
    height: 60px;
    font-size: 25px;
  }

  /* Mobile Header Dropdown Background */
  #mobile-menu {
    background: white !important;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-top: 1px;
    border-radius: 0 0 12px 12px;
  }
  
  #mobile-menu .space-y-1 {
    padding: 8px;
  }
  
  #mobile-menu a {
    margin: 2px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
  }
  
  #mobile-menu a:hover {
    background: rgba(220, 38, 38, 0.05) !important;
  }
}