/* ==========================================================================
   Hanith Pre Owned Cars - Modern Traditional Design Token & Styling System
   ========================================================================== */

/* Custom Variables mapped to Brand Logo (Black & Crimson Red) */
:root {
  --primary-color: #0f172a;      /* Deep Slate Charcoal base */
  --primary-hover: #1e293b;
  --accent-color: #bd1e2e;       /* Brand Crimson Red */
  --accent-hover: #991b1b;       /* Darker Red */
  --bg-color: #f8fafc;           /* Pearl Light White */
  --card-bg: #ffffff;
  --text-primary: #0f172a;       /* Dark slate text */
  --text-secondary: #475569;     /* Muted slate text */
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-gold: rgba(189, 30, 46, 0.2); /* Red accent border */
  
  --font-serif: 'Playfair Display', Georgia, Cambria, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.05);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-serif-col h3, .footer-title {
  font-family: var(--font-serif);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Layout Padding Utilities */
section {
  padding: 100px 0;
}

/* ==========================================================================
   Header Navigation Bar
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: 80px;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 48px;
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  position: relative;
  padding: 6px 0;
}

.nav-link:hover {
  color: var(--accent-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: var(--transition-smooth);
}

.nav-link:hover::after {
  width: 100%;
}

.inventory-badge {
  font-size: 0.7rem;
  font-family: var(--font-sans);
  font-weight: 600;
  background-color: rgba(189, 30, 46, 0.08);
  color: var(--accent-color);
  border: 1px solid var(--border-gold);
  padding: 1px 6px;
  border-radius: 20px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Button Classes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 28px;
  border-radius: 6px;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(189, 30, 46, 0.15);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(189, 30, 46, 0.25);
}

.btn-text {
  background: transparent;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 650;
  text-transform: none;
  letter-spacing: 0;
  padding: 10px 0;
  border-radius: 0;
}

.btn-text:hover {
  color: var(--accent-color);
  transform: translateX(4px);
}

/* ==========================================================================
   Hero Slider Section
   ========================================================================== */
.hero-section {
  position: relative;
  height: 80vh;
  min-height: 550px;
  overflow: hidden;
  background-color: #000;
}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 10s ease-out;
  z-index: 1;
}

.slide.active .slide-background {
  transform: scale(1.05);
}

/* Dimming overlay gradient mapping to crimson style */
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.92) 30%, rgba(15, 23, 42, 0.6) 60%, rgba(15, 23, 42, 0.2) 100%);
  z-index: 2;
}

.slide-content {
  position: relative;
  z-index: 3;
  max-width: 650px;
  padding: 0 48px;
  margin-left: calc((100vw - 1200px) / 2);
  color: #ffffff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out 0.4s, transform 0.8s ease-out 0.4s;
}

@media (max-width: 1240px) {
  .slide-content {
    margin-left: 48px;
  }
}

.slide.active .slide-content {
  opacity: 1;
  transform: translateY(0);
}

.slide-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-color);
  margin-bottom: 20px;
  border-left: 2px solid var(--accent-color);
  padding-left: 10px;
}

.slide-title {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.slide-desc {
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
  max-width: 550px;
}

.slide-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.slide-actions .btn-text {
  color: #ffffff;
}

/* Slider Controls */
.slider-controls {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 24px;
  border-radius: 40px;
}

.control-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.control-btn:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}

.slider-index {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.05em;
}

#currentIndex {
  color: var(--accent-color);
  font-weight: 700;
}

/* ==========================================================================
   Section Layout Header
   ========================================================================== */
.section-header {
  max-width: 650px;
  margin-bottom: 60px;
}

.section-header.text-center {
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-color);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.25rem;
  color: var(--primary-color);
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-title.text-center {
  text-align: center;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ==========================================================================
   Value Matrix Section
   ========================================================================== */
.values-section {
  background-color: #ffffff;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.value-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 48px 36px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: transparent;
  transition: var(--transition-smooth);
}

.value-card:hover {
  transform: translateY(-8px);
  background-color: #ffffff;
  border-color: var(--accent-color);
  box-shadow: var(--shadow-lg);
}

.value-card:hover::before {
  background-color: var(--accent-color);
}

.card-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  transition: var(--transition-smooth);
  color: var(--accent-color);
}

.value-card:hover .card-icon-wrapper {
  background-color: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

.value-card .card-title {
  font-size: 1.35rem;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.value-card .card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ==========================================================================
   Location Network Hub (Simplified Centered Layout)
   ========================================================================== */
.network-section {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.network-container {
  max-width: 850px;
  margin: 0 auto;
}

.seo-text-block {
  background-color: #ffffff;
  border-left: 3px solid var(--accent-color);
  border-radius: 0 8px 8px 0;
  padding: 30px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}

.seo-text-block p {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.7;
}

.seo-text-block strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hub-address-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.address-mini-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.address-mini-card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

.mini-icon {
  color: var(--accent-color);
  flex-shrink: 0;
  margin-top: 2px;
}

.mini-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 4px;
}

.mini-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 550;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.reviews-section {
  background-color: #ffffff;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
}

.review-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 48px;
  position: relative;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: 5rem;
  color: var(--accent-color);
  position: absolute;
  top: 10px;
  left: 30px;
  line-height: 1;
  opacity: 0.15;
}

.review-text {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  z-index: 2;
  margin-bottom: 30px;
}

.review-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.author-name {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.author-role {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #10b981;
  background-color: rgba(16, 185, 129, 0.08);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ==========================================================================
   Footer Widget (Compact Size)
   ========================================================================== */
.footer {
  background-color: var(--primary-color);
  color: #ffffff;
  padding-top: 40px;               /* Reduced from 80px */
  border-top: 1px solid var(--primary-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 4fr 2fr 3fr 3fr;
  gap: 36px;                       /* Reduced from 60px */
  padding-bottom: 30px;            /* Reduced from 60px */
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1.35rem;              /* Reduced from 1.5rem */
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 0.8rem;               /* Reduced from 0.85rem */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-color);
  margin-bottom: 16px;             /* Reduced from 24px */
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-text {
  font-size: 0.85rem;              /* Reduced from 0.9rem */
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

.footer-links li {
  margin-bottom: 8px;              /* Reduced from 12px */
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  transition: var(--transition-smooth);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--accent-color);
}

.footer-links li:hover {
  color: var(--accent-color);
  transform: translateX(4px);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;                       /* Reduced from 16px */
  margin-bottom: 16px;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;               /* Reduced from 0.85rem */
  color: rgba(255, 255, 255, 0.65);
}

.contact-icon {
  color: var(--accent-color);
}

.footer-form {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 4px;                    /* Reduced from 6px */
  transition: var(--transition-smooth);
}

.footer-form:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(189, 30, 46, 0.2);
}

.form-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.8rem;               /* Reduced from 0.85rem */
  padding: 6px 10px;
  width: 100%;
  font-family: var(--font-sans);
}

.form-input:focus {
  outline: none;
}

.form-btn {
  background-color: var(--accent-color);
  border: none;
  color: #ffffff;
  width: 32px;                     /* Reduced from 36px */
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.form-btn:hover {
  background-color: #ffffff;
  color: var(--primary-color);
}

.sub-status {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-color);
  margin-top: 6px;
}

.footer-location {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-coordinates {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  padding: 10px 16px;
  width: 100%;
}

.btn-coordinates:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px 0;                 /* Reduced from 30px 0 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   Mobile Responsive Rules
   ========================================================================== */

/* Tablet viewports */
@media (max-width: 991px) {
  section {
    padding: 80px 0;
  }
  
  .header {
    height: 70px;
  }
  
  .nav-menu {
    gap: 20px;
  }
  
  .slide-title {
    font-size: 2.75rem;
  }
  
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* Mobile viewports */
@media (max-width: 767px) {
  /* Show menu in mobile view, centered and wrapped */
  .nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin-top: 12px;
  }
  
  .header {
    height: auto;
    padding: 16px 0;
  }
  
  .header-container {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
  
  .nav-link {
    font-size: 0.8rem;
    padding: 4px 0;
  }
  
  .logo-img {
    height: 40px;
    max-height: 40px;
  }
  
  .hero-section {
    height: 70vh;
    min-height: 480px;
  }
  
  .slide-content {
    padding: 0 24px;
    margin-left: 0;
    text-align: center;
  }
  
  .slide-tag {
    margin-bottom: 12px;
  }
  
  .slide-title {
    font-size: 2rem;
    margin-bottom: 12px;
  }
  
  .slide-desc {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }
  
  .slide-actions {
    justify-content: center;
    flex-direction: column;
    gap: 14px;
  }
  
  .slide-actions .btn {
    width: 100%;
  }
  
  .section-title {
    font-size: 1.85rem;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .value-card {
    padding: 36px 24px;
  }
  
  .seo-text-block {
    padding: 20px;
  }
  
  .hub-address-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .address-mini-card {
    padding: 16px;
  }
  
  .review-card {
    padding: 30px 24px;
  }
  
  .footer {
    padding-top: 24px;
    padding-bottom: 24px;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .footer-heading {
    margin-bottom: 12px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
