/* 0. Import Montserrat from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* 1. Reset & Setup Body */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  
  /* CHANGE: Swapped from solid hex to transparent so the fixed video can be seen */
  background-color: transparent; 
  color: #ffffff; 
}

/* ADD THIS RIGHT BELOW IT: Fallback container color for sections below the fold */
html {
  background-color: #12110a; 
}

/* 2. Modern Minimalist Header */
.site-header {
  position: absolute; /* Sits directly on top of the hero section layer */
  top: 0;
  left: 0;
  width: 100%;
  height: 10vh; /* Exactly 10% of the screen height */
  
  /* #12110a background with 70% opacity */
  background-color: rgb(18 17 10 / 70%); 
  
  display: flex;
  align-items: center; 
  box-sizing: border-box;
  padding: 0 5%; 
  z-index: 10; /* Ensures the navigation anchors stay accessible over the video layers */
}

.header-nav {
  display: flex;
  align-items: center; /* Ensures the image icon aligns vertically with text links */
  gap: clamp(20px, 4vw, 50px); /* Dynamically scales spacing between items */
  justify-content: flex-start; /* Keeps entire layout left-justified */
  width: 100%;
}

/* Add this below your existing .nav-icon styles in style.css */
.header-nav a:has(.nav-icon):hover {
  opacity: 1; /* Keeps the logo fully solid on link hover */
}

.nav-icon {
  height: clamp(24px, 3.5vh, 40px); /* Dynamically scales height relative to screen sizes */
  aspect-ratio: 1 / 1; /* Locks the dimensions into a perfect square */
  object-fit: contain;
}

.nav-link {
  color: #ffffff; /* Crisp white links */
  text-decoration: none;
  font-weight: 500; 
  letter-spacing: 1px;
  transition: opacity 0.2s ease;
  font-size: clamp(0.875rem, 0.75rem + 0.5vw, 1.125rem); 
}

.nav-link:hover {
  opacity: 0.7; 
}

/* 3. The First Landing Screen Container */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh; /* Full screen height so video runs behind header */
  overflow: hidden; 
  background-color: #12110a; 
}

/* 4. The Video Element */
.bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

/* 5. Dark Overlay over the Video */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(18 17 10 / 40%); /* Custom color tints video layer slightly */
  z-index: 2;
}

/* 6. Foreground Content Layer */
.content-container {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 20px;
  padding-top: 10vh; /* Compensates for header height to keep logo centered */
}

/* 7. Logo & Tagline Group Styling */
.logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 50vw; /* Takes up 50% of browser window width */
  max-width: 600px;
  min-width: 280px;
  text-align: center;
}

.center-logo {
  width: 100%; /* Spans full width of parent wrapper */
  height: auto;
  filter: drop-shadow(0px 4px 10px rgba(18, 17, 10, 0.5));
}

.logo-tagline {
  margin-top: 15px;
  color: #ffffff;
  letter-spacing: 2px;
  font-weight: 700;
  
  /* Scales proportionally with wrapper width */
  font-size: clamp(0.9rem, 1.25vw + 0.5rem, 1.75rem); 
  text-shadow: 0px 2px 8px rgba(18, 17, 10, 0.8);
}

/* 8. Styling for Content Blocks UNDER the video */
.content-block {
  padding: 80px 20px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  color: #ffffff; 
}

.content-block h2 {
  font-size: 2.2rem;
  font-weight: 700; 
  margin-bottom: 20px;
  color: #ffffff; 
}

.content-block p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ==========================================
   9. DEALER DIRECTORY & RESPONSIVE GRID
   ========================================== */

.dealer-container {
  padding-top: 15vh; /* Pushes content down past header */
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding-left: 5%;
  padding-right: 5%;
  min-height: 100vh;
}

.dealer-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-align: center;
  color: #ffffff;
}

.dealer-subtitle {
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  color: #cccccc;
  margin-bottom: 50px;
  text-align: center;
}

/* Master list layout wrapper */
.dealer-grid-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 40px; /* Space between rows */
  margin-bottom: 80px;
}

/* Unified Layout Row */
.dealer-row {
  display: flex;
  flex-direction: row; /* Puts items side-by-side on desktop */
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s ease;
}

.dealer-row:hover {
  border-color: rgba(255, 221, 0, 0.3); /* Brand yellow glow */
}

/* Left Panel: Map Window */
.map-panel {
  flex: 1.2; /* Makes the map wider than the descriptive card text */
  height: 400px;
  background-color: #1a1913;
}

.map-panel iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Right Panel: Content Info Card */
.dealer-card {
  flex: 1;
  padding: 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.card-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.card-address {
  font-size: 1.05rem;
  color: #cccccc;
  margin: 0;
  line-height: 1.4;
}

.card-phone {
  font-size: 1.1rem;
  color: #ffdd00; /* Signature Brand Yellow */
  font-weight: 600;
  margin: 0;
  text-decoration: none;
}

.card-phone:hover {
  text-decoration: underline;
}

.card-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* Minimal Action Button Inside Card */
.map-action-btn {
  align-self: flex-start;
  background-color: #ffdd00; /* Signature Brand Yellow */
  color: #12110a;            /* Signature Dark Base */
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px 24px;
  letter-spacing: 1px;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: opacity 0.2s ease;
}

.map-action-btn:hover {
  opacity: 0.9;
}

/* ==========================================
   GLOBAL RESPONSIVE NAVIGATION SYSTEM
   ========================================== */

/* Prevent mobile browser viewports from zooming on standard selector forms */
@media (max-width: 768px) {
  select { 
    font-size: 16px !important; 
  }
}

/* Desktop View Layout Rules (769px and above) */
@media (min-width: 769px) {
  .site-header-nav { 
    display: flex !important; 
  }
  .mobile-burger-btn { 
    display: none !important; 
  }
  #mobileDrawer { 
    display: none !important; 
    background-color: rgba(18, 17, 10, 0.98);
  }
}
/* Mobile & Tablet View Layout Rules (768px and below) */
@media (max-width: 768px) {
  .site-header-nav { 
    display: none !important; 
  }
  .header-nav {
    justify-content: center !important; /* Centers the container contents */
  }
  .mobile-burger-btn { 
    display: flex !important; 
    margin-left: 0 !important; /* Removes the Tailwind class pushing it to the right */
  }
}

/* ==========================================================================
   10. TIRE LINEUP GRID ARCHITECTURE & CAROUSEL DECK COMPONENTS
   ========================================================================== */
.lineup-main-adjustment {
  padding-top: 15vh; 
  align-items: stretch !important;
}

.lineup-title-block {
  width: 100%; 
  max-width: 1200px; 
  display: flex; 
  flex-direction: column; 
  align-items: flex-start;
}

.lineup-title-block .dealer-title {
  text-align: left; 
  margin: 0;
}

.lineup-title-block .dealer-subtitle {
  text-align: left; 
  margin: 10px 0 0 0;
}

.stretch-grid-layout {
  display: flex; 
  flex-direction: column; 
  align-items: stretch; 
  width: 100%; 
  max-width: 1200px;
}

.brand-text-accent {
  color: #ffdd00;
}

.category-section {
  margin-top: 50px;
  margin-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  width: 100%;
}

.category-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ffffff;
  margin: 0;
}

.tire-display-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 30px;
  width: 100%;
  margin-bottom: 40px;
}

.tire-lineup-card {
  background: rgba(255, 255, 255, 0.02); 
  border: 1px solid rgba(255, 255, 255, 0.08); 
  border-radius: 6px; 
  padding: 25px; 
  display: flex; 
  flex-direction: column; 
  transition: border-color 0.2s ease;
}

.tire-lineup-card:hover {
  border-color: rgba(255, 221, 0, 0.3);
}

.carousel-wrapper {
  position: relative; 
  width: 100%; 
  aspect-ratio: 1 / 1; 
  background: rgba(0, 0, 0, 0.3); 
  border-radius: 4px; 
  overflow: hidden; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  margin-bottom: 20px;
}

.carousel-image-panel {
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
  padding: 15px; 
  transition: transform 0.3s ease;
}

.carousel-btn {
  position: absolute; 
  top: 50%; 
  transform: translateY(-50%); 
  background: rgba(18, 17, 10, 0.7); 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  color: #ffffff; 
  width: 30px; 
  height: 30px; 
  border-radius: 50%; 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.carousel-wrapper:hover .carousel-btn {
  opacity: 1;
}

.nav-arrow-left { left: 8px; }
.nav-arrow-right { right: 8px; }

.carousel-indicator-dots {
  position: absolute; 
  bottom: 8px; 
  display: flex; 
  gap: 5px;
}

.indicator-dot {
  width: 6px; 
  height: 6px; 
  border-radius: 50%; 
  background: rgba(255, 255, 255, 0.3); 
  transition: background 0.2s;
}

.indicator-dot.dot-active {
  background: #ffdd00;
}

.card-name-accent {
  color: #ffdd00; 
  font-size: 1.3rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  margin: 0 0 10px 0; 
  letter-spacing: 0.5px;
}

.card-desc-accent {
  font-size: 0.9rem; 
  color: #cccccc; 
  margin: 0; 
  line-height: 1.5; 
  font-weight: 400;
}

@media (min-width: 640px) {
  .tire-display-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .tire-display-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}