/* ================== VARIABLES ================== */
:root {
  --hyundai-blue: #002c5f;
  --hyundai-dark: #0a2647;
  --hyundai-accent: #e21e25;
  --hyundai-yellow: #ffdd00;
  --text-light: #f8f9fa;
  --text-dark: #212529;
  --bg-light: #f8f9fa;
  --bg-dark: #212529;
  --transition: all 0.3s ease;
}

/* ================== BASE STYLES ================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  line-height: 1.6;
}

a {
  text-decoration: none;
  transition: var(--transition);
  color: inherit;
}

/* ================== LOADING SCREEN ================== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--hyundai-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--hyundai-yellow);
  animation: spin 1s ease-in-out infinite;
  margin-top: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================== HEADER & NAVBAR ================== */
.site-header {
  background-color: var(--hyundai-dark);
  transition: var(--transition);
  padding: 10px 0;
}

.site-header.scrolled {
  background-color: rgba(10, 38, 71, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 600;
  display: flex;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  color: var(--text-light);
  position: relative;
}

.nav-link:hover {
  color: var(--hyundai-accent);
}

.nav-link.active:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--hyundai-yellow);
}

/* PROMO BOX UPDATE */
.promo-box-container {
  position: absolute;
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  max-width: 320px;
}

.promo-box {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 44, 95, 0.1);
  position: relative;
  overflow: hidden;
}

.promo-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: #002C5F;
}

.promo-content {
  text-align: center;
}

.promo-title {
  font-weight: 700;
  font-size: 1.2rem;
  color: #002C5F;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.promo-subtitle {
  font-weight: 600;
  font-size: 1rem;
  color: #212529;
  margin-bottom: 1rem;
}

.promo-highlight {
  font-weight: 800;
  font-size: 1.8rem;
  color: #002C5F;
  margin: 0.5rem 0;
  display: block;
}

.promo-btn {
  background: #002C5F;
  color: white;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.promo-btn:hover {
  background: #0a2647;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .promo-box-container {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    max-width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
  }
  
  .promo-box {
    margin: 0 auto;
    max-width: 300px;
  }
}
/* Responsive Adjustments */
@media (max-width: 992px) {
  .promo-box-container {
    left: 5%;
    max-width: 400px;
  }
  .promo-text {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .promo-box-container {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    max-width: 100%;
    padding: 0 1rem;
    margin-top: 2rem;
  }
  
  .promo-box {
    margin: 0 auto;
    text-align: center;
    border-left: none;
    border-top: 4px solid var(--hyundai-yellow);
  }
  
  .promo-content {
    text-align: center;
  }
}

/* Tinggi slider di desktop */
.hero-section {
  height: 300px; /* desktop & tablet */
  overflow: hidden;
}

.hero-section img {
  object-fit: cover;
  height: 100%;
}

/* Tinggi slider di HP */
@media (max-width: 768px) {
  .hero-section {
    height: 100px; /* di HP lebih kecil */
  }
}

/* Desktop & tablet */
.hero-section {
  height: 100px;
  overflow: hidden;
}

.hero-section img {
  object-fit: cover;
  height: 100%;
}

/* HP */
@media (max-width: 768px) {
  .hero-section {
    height: 50px;
  }
}


/* Mobile Styles */
@media (max-width: 768px) {
  /* Hero Section */
  .hero-section {
    height: auto;
    min-height: 100vh;
  }
  
  .hero-car-float {
    position: relative;
    max-width: 100%;
    right: auto;
    bottom: auto;
    margin-top: 20px;
  }

  /* Promo Box */
  .promo-box-container {
    position: relative;
    left: 0;
    top: 0;
    transform: none;
    width: 100%;
    margin: 20px 0;
  }

  /* Navbar */
  .navbar-brand {
    font-size: 1rem;
  }
  
  /* Katalog Mobil */
  .mobil-card {
    margin-bottom: 20px;
  }
  
  /* Modal */
  .modal-body {
    padding: 15px;
  }
  
  /* Kontak Section */
  .kontak-section .row {
    flex-direction: column-reverse;
  }
}

/* Tombol yang mudah di-tap */
.btn-mobile {
  min-width: 44px;
  min-height: 44px;
  padding: 12px;
  font-size: 16px;
}

/* Input yang mudah diisi */
input, select, textarea {
  font-size: 16px !important;
}

/* ================== HERO CAR EFFECT ================== */
.hero-car-container {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: show;
}

.hero-car-float {
  position: absolute;
  right: -15%;
  bottom: -20%;
  max-width: 60%;
  z-index: 2;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
  transform-origin: center bottom;
}

.hero-section {
  perspective: 1000px;
}

.hero-car-float {
  transform-style: preserve-3d;
  transform: rotateY(-5deg) rotateX(2deg);
}

/* Animasi mengambang */
@keyframes float {
  0%, 100% { 
    transform: translateY(0) rotate(-1deg) scale(1);
  }
  50% { 
    transform: translateY(-20px) rotate(2deg) scale(1.02);
  }
}

/* Efek saat hover */
.hero-car-float:hover {
  animation-play-state: paused;
  transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-car-float {
    right: -20%;
    bottom: -15%;
    max-width: 80%;
  }
}

@media (max-width: 768px) {
  .hero-car-float {
    position: relative;
    right: auto;
    bottom: auto;
    max-width: 100%;
    margin-top: 2rem;
    animation: none;
  }
  
  .hero-car-container {
    height: auto;
    overflow: visible;
    text-align: center;
  }
}

/* ================== KATALOG SECTION ================== */
.katalog-section {
  padding: 5rem 0;
  background-color: var(--bg-light);
}

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-title {
  font-weight: 700;
  color: var(--hyundai-dark);
  position: relative;
  display: inline-block;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--hyundai-blue);
}

.section-subtitle {
  color: #6c757d;
  font-size: 1.1rem;
}

.filter-kategori {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.btn-kategori {
  border: 2px solid var(--hyundai-blue);
  color: var(--hyundai-blue);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: var(--transition);
  background: transparent;
}

.btn-kategori.active, 
.btn-kategori:hover {
  background: var(--hyundai-blue);
  color: white;
}

.mobil-card {
  transition: var(--transition);
  border-radius: 10px;
  background-color: white;
  height: 100%;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.mobil-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.mobil-img {
  height: 200px;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.5s ease;
}

.mobil-card:hover .mobil-img {
  transform: scale(1.05);
}

.mobil-card .btn-primary {
  background-color: #002C5F;
  border-color: #002C5F;
}

.mobil-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,44,95,0.1);
}

/* Responsive adjustment */
@media (max-width: 768px) {
  .mobil-img {
    height: 180px !important;
  }
}

/* ================== TENTANG SECTION ================== */
.tentang-section {
  padding: 5rem 0;
  background-color: white;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  cursor: pointer;
  border-radius: 12px;
}

.gallery-img:hover {
  transform: scale(0.98);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.visi-misi ul {
  padding-left: 1.2rem;
}

.visi-misi li {
  margin-bottom: 0.5rem;
  position: relative;
}


/* ================== KONTAK SECTION ================== */
.kontak-section {
  background: var(--hyundai-dark);
  color: white;
  padding: 5rem 0;
}

.bg-darker {
  background: #0a1a30;
}

.card.bg-transparent {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.form-control.bg-transparent,
.form-select.bg-transparent {
  background: rgba(255, 255, 255, 0.1) !important;
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

.form-control.bg-transparent::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.social-media {
  display: flex;
  gap: 15px;
}

.social-media a {
  color: white;
  font-size: 1.5rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-media a:hover {
  transform: scale(1.1);
  color: var(--hyundai-yellow);
}
/* ================== KONTAK SECTION ================== */
.kontak-section {
  background: var(--hyundai-dark);
  color: white;
  padding: 5rem 0;
}

.kontak-section .section-title:after {
  background: var(--hyundai-yellow);
}

.kontak-section .btn-success {
  background-color: #25D366;
  border-color: #25D366;
  transition: all 0.3s ease;
}

.kontak-section .btn-success:hover {
  background-color: #128C7E;
  border-color: #128C7E;
  transform: translateY(-2px);
}

.kontak-section .btn-outline-light {
  transition: all 0.3s ease;
}

.kontak-section .btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  color: var(--hyundai-yellow);
  border-color: var(--hyundai-yellow);
}

.kontak-section .social-media a {
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.kontak-section .social-media a:hover {
  color: var(--hyundai-yellow);
  transform: translateY(-3px);
}

.kontak-section .address-box {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(5px);
}

/* Maps Style */
.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive Email Text */
@media (max-width: 992px) {
  .email-text {
    font-size: 0.8rem;
  }
}

/* WhatsApp Button Style */
.whatsapp-contact {
  display: inline-flex;
  align-items: center;
  background: #25D366;
  color: white;
  padding: 8px 15px;
  border-radius: 50px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.whatsapp-contact:hover {
  background: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* ================== WHATSAPP FLOAT BUTTON ================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 100;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background: #128C7E;
}

/* ================== MODAL STYLES ================== */
.modal-content {
  border: none;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.color-option:hover {
  border-color: var(--hyundai-blue);
}

#galleryModal .modal-content {
  background: transparent;
  border: none;
}

#galleryModal .btn-close {
  filter: brightness(0) invert(1);
  opacity: 1;
  position: absolute;
  top: 20px;
  right: 20px;
}

/* ================== RESPONSIVE STYLES ================== */
@media (max-width: 992px) {
  .hero-car-float {
    max-width: 400px;
    right: -30px;
  }
  
  .hero-content .display-5 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-content {
    text-align: center;
  }
  
  .hero-car-float {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 2rem;
    max-width: 100%;
  }
  
  .section-title:after {
    bottom: -8px;
  }
  
  .filter-kategori {
    gap: 8px;
  }
  
  .btn-kategori {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    min-height: 500px;
  }
  
  .hero-content .display-5 {
    font-size: 2rem;
  }
  
  .hero-content .lead {
    font-size: 1rem;
  }
  
  .mobil-card {
    margin-bottom: 1.5rem;
  }
}

/* ================== UTILITY CLASSES ================== */
.rounded-3 {
  border-radius: 1rem !important;
}

.shadow-sm {
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

.ratio-16x9 {
  aspect-ratio: 16/9;
}

/* ================== FORM VALIDATION STYLES ================== */
.was-validated .form-control:invalid,
.was-validated .form-control.is-invalid {
  border-color: #dc3545;
}

.invalid-feedback {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}