/* =============================================
   FRONTIER MITSUBISHI — HOMEPAGE STYLES
   ============================================= */

/* --- Hero Slider --- */
body.homepage site-header {
  position: relative;
  z-index: 20;
}

body.homepage main {
  padding-top: 0;
}

@media (max-width: 1024px) {
  body.homepage main {
    padding-top: 0;
  }
}

.hero {
  position: relative;
  height: calc(100vh - var(--header-height) - var(--header-top-height));
  min-height: 580px;
  max-height: 860px;
  overflow: hidden;
  background: var(--black);
}
@media (max-width: 1024px) {
  .hero {
    height: var(--homepage-hero-available-height, calc(100dvh - var(--homepage-header-offset, var(--header-height))));
    min-height: var(--homepage-hero-available-height, calc(100dvh - var(--homepage-header-offset, var(--header-height))));
    max-height: none;
  }
  .hero-slide-bg {
    background-size: auto 100%;
    background-position: center center;
  }
  .hero-slide-video {
    object-fit: cover;
    object-position: center center;
  }
}
@supports not (height: 100dvh) {
  @media (max-width: 1024px) {
    .hero {
      height: var(--homepage-hero-available-height, calc(100vh - var(--homepage-header-offset, var(--header-height))));
      min-height: var(--homepage-hero-available-height, calc(100vh - var(--homepage-header-offset, var(--header-height))));
    }
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: all;
}
.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  transition: transform 8s ease;
}
@media (max-width: 768px) {
  .hero-slide-bg {
    background-image: var(--hero-mobile-image, var(--hero-desktop-image)) !important;
  }
}
.hero-slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform 8s ease;
}
.hero-slide.active .hero-slide-bg {
  transform: none;
}
.hero-slide.active .hero-slide-video {
  transform: none;
}

/* Mobile hero media fills the entire post-header viewport height.
   16:9 source assets crop at the sides on tall phone screens, never top/bottom. */
@media (max-width: 1024px) {
  .hero .hero-slide-bg {
    background-size: auto 100%;
    background-position: center center;
  }
  .hero .hero-slide-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0,0,0,0.78) 0%,
    rgba(0,0,0,0.45) 45%,
    rgba(0,0,0,0.15) 100%
  );
}
.hero-slide-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
}
.hero-slide-content .container { width: 100%; }
.hero-text {
  max-width: 580px;
  text-align: left;
}

/* --- Hero Loader --- */
.hero-loader {
  position: absolute;
  inset: 0;
  background: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: opacity 0.5s ease;
}
.hero-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}
.hero-loader-logo {
  width: 120px;
  height: auto;
  animation: hero-logo-pulse 1.6s ease-in-out infinite;
}
@keyframes hero-logo-pulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 1; }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s 0.2s ease, transform 0.6s 0.2s ease;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--red);
}
.hero-slide.active .hero-eyebrow { opacity: 1; transform: none; }
.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s 0.35s ease, transform 0.6s 0.35s ease;
}
.hero-slide.active .hero-title { opacity: 1; transform: none; }
.hero-desc {
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 460px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s 0.5s ease, transform 0.6s 0.5s ease;
}
.hero-slide.active .hero-desc { opacity: 1; transform: none; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-start;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s 0.65s ease, transform 0.6s 0.65s ease;
}
.hero-slide.active .hero-actions { opacity: 1; transform: none; }
.hero-price-tag {
  position: absolute;
  right: 10%;
  bottom: 12%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  text-align: center;
  color: var(--white);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.6s 0.8s ease, transform 0.6s 0.8s ease;
}
.hero-slide.active .hero-price-tag { opacity: 1; transform: none; }
.hero-price-tag .label { font-size: 11px; letter-spacing: 0.08em; opacity: 0.65; }
.hero-price-tag .amount { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.hero-price-tag .note { font-size: 11px; opacity: 0.55; margin-top: 2px; }

/* --- Hero Controls --- */
.hero-controls {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  z-index: 10;
}
@media (min-width: 1440px) { .hero-controls { padding: 0 48px; } }
.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  padding: 0;
}
.hero-dot.active {
  background: var(--white);
  width: 24px;
  border-radius: 4px;
}
.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}
.hero-arrow:hover { background: var(--red); border-color: var(--red); }
.hero-arrow svg { width: 18px; height: 18px; }

/* --- Quick Actions Bar --- */
.quick-actions {
  background: var(--charcoal);
  padding: 0;
  border-bottom: 3px solid var(--red);
}
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid rgba(255,255,255,0.06);
}
.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px;
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  border-right: 1px solid rgba(255,255,255,0.06);
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.quick-action-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--red);
  opacity: 0;
  transition: opacity var(--transition);
}
.quick-action-item:hover::before { opacity: 1; }
.quick-action-item:hover { color: var(--white); }
.quick-action-item > * { position: relative; }
.quick-action-icon {
  font-size: 28px;
  line-height: 1;
}
.quick-action-item strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--white);
  display: block;
}
.quick-action-item span {
  font-size: 12px;
  display: block;
  opacity: 0.6;
  margin-top: 2px;
}

/* --- Featured Models --- */
.models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --- Offers Banner --- */
.offers-banner {
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  border-radius: var(--radius-xl);
  padding: 64px 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  overflow: hidden;
  position: relative;
}
.offers-banner::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.offers-banner::after {
  content: '';
  position: absolute;
  bottom: -60%;
  right: 15%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.offers-banner-content { position: relative; }
.offers-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.offers-banner h2 { color: var(--white); margin-bottom: 12px; }
.offers-banner p { color: rgba(255,255,255,0.8); font-size: 16px; max-width: 420px; }
.offers-banner-actions { display: flex; flex-direction: column; gap: 12px; position: relative; }
.offers-banner .btn-white {
  background: var(--white);
  color: var(--red);
  border: 2px solid var(--white);
  font-weight: 700;
}
.offers-banner .btn-white:hover { background: transparent; color: var(--white); }

/* --- Why Us --- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.why-item {
  background: var(--white);
  padding: 36px 28px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.why-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.why-item:hover::before { transform: scaleX(1); }
.why-item:hover { box-shadow: var(--shadow-lg); z-index: 1; }
.why-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(228, 0, 43, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  transition: background var(--transition);
}
.why-item:hover .why-icon { background: var(--red); }
.why-item:hover .why-icon svg { color: var(--white); }
.why-icon svg { width: 28px; height: 28px; color: var(--red); transition: color var(--transition); }
.why-item h3 {
  font-size: 16px;
  margin-bottom: 10px;
}
.why-item p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.65;
}

/* --- Testimonials --- */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
}
.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
  color: #F59E0B;
  font-size: 18px;
}
.testimonial-text {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.testimonial-author-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.testimonial-author-detail {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--red);
  padding: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid rgba(255,255,255,0.12);
}
.stat-item {
  padding: 36px 24px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
}
.stat-number {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1;
  display: block;
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 6px;
  display: block;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--charcoal);
  padding: 100px 0;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228,0,43,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-section h2 { color: var(--white); margin-bottom: 16px; position: relative; }
.cta-section p { color: rgba(255,255,255,0.65); font-size: 17px; margin-bottom: 40px; max-width: 500px; margin-left: auto; margin-right: auto; position: relative; }
.cta-actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; position: relative; }

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .offers-banner { padding: 40px 32px; }
}
@media (max-width: 768px) {
  .models-grid { grid-template-columns: 1fr; }
  .offers-banner { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .hero-price-tag { display: none; }
  .hero-title { font-size: 2rem; }
}
@media (max-width: 480px) {
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
