/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-yellow);
  color: var(--black); /* Changed to black for better contrast on yellow */
}

.btn-primary:hover {
  background-color: var(--primary-yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--white);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary-red);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary-red);
  color: var(--primary-red);
}

.btn-outline:hover {
  background-color: var(--primary-red);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  padding: 40px 30px;
  text-align: center;
  border: 1px solid var(--border-color);
}

.service-icon {
  width: 80px;
  height: 80px;
  background-color: rgba(255, 193, 7, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--primary-yellow);
}

.service-card h3 {
  margin-bottom: 15px;
}

/* Hero Section Specifics */
.hero {
  /* Updated gradient to use red tones */
  background: linear-gradient(rgba(204, 0, 0, 0.8), rgba(204, 0, 0, 0.7)), 
              url('https://trae-api-sg.mchost.guru/api/ide/v1/text_to_image?prompt=car%20engine&image_size=landscape_16_9');
  background-size: cover;
  background-position: center;
  color: var(--white);
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

/* Testimonials */
.testimonial-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.testimonial-item {
  display: none;
  animation: fadeIn 0.5s ease;
}

.testimonial-content {
  font-size: 1.25rem;
  font-style: italic;
  margin-bottom: 20px;
  color: var(--secondary-gray);
}

.testimonial-author {
  font-weight: 700;
  color: var(--primary-red);
}

.testimonial-rating {
  color: #fbbf24;
  margin-bottom: 15px;
}

.testimonial-controls {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.control-btn {
  background: var(--white);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--primary-red);
  transition: all 0.2s;
}

.control-btn:hover {
  background: var(--primary-red);
  color: var(--white);
}

/* Contact Form */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.contact-info {
  background: var(--primary-red);
  color: var(--white);
  padding: 40px;
}

.contact-info h3 {
  color: var(--white);
}

.contact-info-item {
  margin-bottom: 25px;
}

.contact-info-item h4 {
  color: var(--primary-yellow);
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.form-container {
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--primary-red);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-yellow);
}

.form-control.error {
  border-color: #e53e3e;
}

/* Service Page Listings */
.service-category {
  margin-bottom: 60px;
}

.service-category h3 {
  border-bottom: 2px solid var(--primary-yellow);
  padding-bottom: 10px;
  display: inline-block;
  margin-bottom: 30px;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.service-item {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  transition: box-shadow 0.3s;
}

.service-item:hover {
  box-shadow: var(--shadow-md);
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--light-gray);
  padding-bottom: 15px;
}

.service-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-red);
}

.service-price {
  font-weight: 600;
  color: var(--primary-yellow);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Direction Card Overlay */
.direction-card {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  background: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-width: 350px;
  z-index: 10;
  border-left: 5px solid var(--primary-red);
}

.direction-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--primary-red);
}

.direction-card p {
  margin-bottom: 20px;
  color: var(--secondary-gray);
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.video-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  border: 1px solid var(--border-color);
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.video-thumbnail {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #000;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.5s;
}

.video-card:hover .video-thumbnail img {
  opacity: 1;
  transform: scale(1.05);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background-color: rgba(204, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.3s, background-color 0.3s;
}

.video-card:hover .play-button {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: var(--primary-red);
}

.video-info {
  padding: 20px;
}

.video-info h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--primary-red);
  font-weight: 700;
}

.video-info p {
  font-size: 0.95rem;
  color: var(--secondary-gray);
  margin-bottom: 15px;
  line-height: 1.5;
}

.btn-text {
  color: var(--primary-red);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.2s;
}

.btn-text:hover {
  gap: 8px;
}

.brand-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
}

.brand-item {
  background: var(--white);
  border-radius: 8px;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-item img {
  max-width: 100%;
  max-height: 60px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.brand-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.brand-item:hover img {
  filter: grayscale(0%);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  background-color: var(--primary-red);
  color: var(--white);
  padding: 20px;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 30px 20px;
  color: var(--secondary-gray);
  font-size: 1rem;
  line-height: 1.6;
}

.modal-jo-number {
  background-color: var(--light-gray);
  padding: 10px 15px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--black);
  margin: 15px 0;
  display: block;
  text-align: center;
  border: 1px dashed var(--border-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-jo-number:hover {
  background-color: #e2e8f0;
}

.modal-footer {
  padding: 20px;
  background-color: #f9f9f9;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  border-top: 1px solid var(--border-color);
}
