/* ============================================================
   BRB TRUCK DEALERSHIP - SHARED STYLES
   Tiffany Blue Dominant Edition
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400&family=Barlow:wght@300;400;500;600;700&family=Barlow+Condensed:wght@300;400;500;600;700&display=swap');

:root {
  --teal:        #00D4FF;
  --teal-light:  #66E8FF;
  --teal-dim:    #0099BB;
  --teal-dark:   #005F7A;
  --red:         #CC2200;
  --red-dim:     #991A00;
  --white:       #F0FAFF;
  --black:       #020508;
  --dark:        #050D12;
  --dark-2:      #081420;
  --dark-3:      #0C1E2E;
  --glass:       rgba(0,212,255,0.1);
  --glass-border: rgba(0,212,255,0.35);
  --text:        #D8F0FF;
  --text-muted:  #6EB0CC;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

/* ===== ANIMATED GRADIENT BACKGROUND - TIFFANY BLUE RIVER ===== */
body {
  font-family: 'Barlow', sans-serif;
  background: #020810;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 120% 70% at 10% 15%, rgba(0,212,255,0.28) 0%, transparent 50%),
    radial-gradient(ellipse 90% 90% at 90% 85%, rgba(0,180,220,0.22) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 55% 45%, rgba(0,150,200,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 75% 5%, rgba(0,212,255,0.16) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 25% 95%, rgba(204,34,0,0.08) 0%, transparent 60%),
    linear-gradient(180deg, #020A14 0%, #030F1C 35%, #050A14 65%, #020508 100%);
  animation: gradientFlow 20s ease-in-out infinite alternate;
}

@keyframes gradientFlow {
  0%   { transform: scale(1) translate(0px, 0px); }
  33%  { transform: scale(1.02) translate(-10px, 8px); }
  66%  { transform: scale(1.015) translate(8px, -6px); }
  100% { transform: scale(1) translate(0px, 0px); }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(0,212,255,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 25% at 50% 100%, rgba(0,120,160,0.1) 0%, transparent 70%);
  animation: glowPulse 9s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0%   { opacity: 0.5; }
  50%  { opacity: 1; }
  100% { opacity: 0.5; }
}

/* ===== GLASS COMPONENTS ===== */
.glass {
  background: rgba(0,212,255,0.07);
  border: 1px solid rgba(0,212,255,0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-dark {
  background: rgba(2,5,8,0.75);
  border: 1px solid rgba(0,212,255,0.18);
  backdrop-filter: blur(20px);
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed; top:0; left:0; right:0; z-index:1000;
  padding: 18px 60px;
  display: flex; align-items: center; justify-content: space-between;
  transition: all 0.4s;
}

nav.scrolled {
  background: rgba(2,6,12,0.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0,212,255,0.18);
  padding: 12px 60px;
  box-shadow: 0 4px 40px rgba(0,212,255,0.07);
}

.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--teal); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
  text-shadow: 0 0 20px rgba(0,212,255,0.5);
}

.nav-logo span { color: var(--white); }

.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  color: rgba(216,240,255,0.55); text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: 2px; text-transform: uppercase;
  transition: all 0.3s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left:0;
  width:0; height:1px; background: var(--teal);
  transition: width 0.3s;
  box-shadow: 0 0 6px rgba(0,212,255,0.7);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--teal);
  text-shadow: 0 0 12px rgba(0,212,255,0.4);
}
.nav-links a:hover::after, .nav-links a.active::after { width:100%; }

.nav-actions { display: flex; gap: 12px; align-items: center; }

.hamburger { display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; }
.hamburger span { display:block; width:24px; height:1px; background:var(--teal); transition:all 0.3s; box-shadow: 0 0 6px rgba(0,212,255,0.5); }

/* ===== BUTTONS ===== */
.btn-primary {
  background: linear-gradient(135deg, #00D4FF 0%, #0099CC 100%);
  color: #020508;
  padding: 12px 32px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  border: none; cursor: pointer;
  transition: all 0.3s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  box-shadow: 0 4px 20px rgba(0,212,255,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #44E4FF 0%, #00C4EE 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(0,212,255,0.55);
}

.btn-glass {
  background: rgba(0,212,255,0.09);
  border: 1px solid rgba(0,212,255,0.38);
  color: var(--teal);
  padding: 12px 32px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: all 0.3s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn-glass:hover {
  background: rgba(0,212,255,0.18);
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,212,255,0.3);
}

.btn-red {
  background: var(--red);
  color: var(--white);
  padding: 12px 32px;
  font-family: 'Barlow', sans-serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  border: none; cursor: pointer; transition: all 0.3s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}
.btn-red:hover { background: #EE3311; transform: translateY(-2px); }

/* ===== SECTION BASE ===== */
.section { padding: 100px 60px; }
.section-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 5px; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px; display: block;
  text-shadow: 0 0 16px rgba(0,212,255,0.5);
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 56px); font-weight: 400;
  color: var(--white); line-height: 1.1; margin-bottom: 20px;
}
.section-title em {
  font-style: italic;
  color: var(--teal);
  text-shadow: 0 0 24px rgba(0,212,255,0.4);
}
.section-body {
  font-size: 15px; font-weight: 300; color: var(--text-muted);
  line-height: 1.9; max-width: 520px;
}

/* ===== CARDS ===== */
.card {
  background: rgba(0,212,255,0.05);
  border: 1px solid rgba(0,212,255,0.18);
  padding: 28px; transition: all 0.35s; position: relative; overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 0 40px rgba(0,212,255,0.03);
}
.card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background: linear-gradient(90deg,transparent,rgba(0,212,255,0.6),transparent);
}
.card:hover {
  border-color: rgba(0,212,255,0.38);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,212,255,0.14), inset 0 0 40px rgba(0,212,255,0.05);
}

/* ===== FORM ELEMENTS ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(0,212,255,0.05);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--text); padding: 12px 16px;
  font-family: 'Barlow', sans-serif; font-size: 14px;
  outline: none; transition: all 0.3s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal);
  background: rgba(0,212,255,0.08);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.12);
}
.form-input::placeholder, .form-textarea::placeholder { color: rgba(110,176,204,0.3); }
.form-select option { background: var(--dark); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===== STATUS BADGES ===== */
.badge {
  display: inline-block; padding: 3px 10px;
  font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
}
.badge-available { background: rgba(0,212,255,0.14); color: var(--teal); border: 1px solid rgba(0,212,255,0.3); }
.badge-sold { background: rgba(110,176,204,0.08); color: var(--text-muted); border: 1px solid rgba(110,176,204,0.2); }
.badge-out { background: rgba(204,34,0,0.1); color: #FF6655; border: 1px solid rgba(204,34,0,0.2); }

/* ===== MODAL ===== */
.modal {
  position: fixed; inset: 0; background: rgba(0,5,10,0.9);
  backdrop-filter: blur(14px); display: flex; align-items: center; justify-content: center;
  z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.3s; padding: 20px;
}
.modal.show { opacity:1; pointer-events:all; }
.modal-box {
  background: linear-gradient(160deg, #081420 0%, #050D18 100%);
  border: 1px solid rgba(0,212,255,0.25);
  padding: 40px; width: 100%; max-width: 560px;
  position: relative; max-height: 90vh; overflow-y: auto;
  animation: fadeUp 0.3s ease both;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 60px rgba(0,212,255,0.08);
}
.modal-box::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background: linear-gradient(90deg,transparent,var(--teal),transparent);
  box-shadow: 0 0 14px rgba(0,212,255,0.5);
}
.modal-box.wide { max-width: 720px; }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px);} to{opacity:1;transform:translateY(0);} }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid rgba(0,212,255,0.12);
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 400; color: var(--white); }
.modal-close { background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:18px; transition:color 0.2s; }
.modal-close:hover { color: var(--teal); }

/* ===== REVEAL ANIMATION ===== */
.reveal { opacity:0; transform:translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 30px; right: 30px; z-index: 99999;
  background: linear-gradient(135deg, #081420, #050D18);
  border: 1px solid rgba(0,212,255,0.3);
  padding: 16px 24px; font-size: 13px; color: var(--text);
  animation: slideIn 0.3s ease; max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,212,255,0.12);
}
.toast.success { border-color: rgba(0,212,255,0.5); color: var(--teal); }
.toast.error { border-color: rgba(204,34,0,0.4); color: #FF6655; }
@keyframes slideIn { from{opacity:0;transform:translateX(20px);} to{opacity:1;transform:translateX(0);} }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #020810; }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.55); }

/* ===== SELECTION ===== */
::selection { background: rgba(0,212,255,0.25); color: var(--white); }

/* ===== RESPONSIVE ===== */
@media(max-width:1024px) {
  nav { padding: 16px 32px; }
  nav.scrolled { padding: 12px 32px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section { padding: 80px 32px; }
}
@media(max-width:768px) {
  nav { padding: 14px 20px; }
  nav.scrolled { padding: 10px 20px; }
  .section { padding: 60px 20px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ===== IMAGE OPTIMIZATION ===== */
img { max-width:100%; height:auto; display:block; }
.car-img img { width:100%; height:100%; object-fit:cover; transition:transform 0.6s ease; will-change:transform; image-rendering:auto; }
.car-img { background:linear-gradient(135deg, #081420, #050D12); }

/* Fast image display */
.car-img { overflow:hidden; background:#081420; }
.car-img img { display:block; }

/* ===== SMOOTH SCROLLING & PERFORMANCE ===== */
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
* { -webkit-tap-highlight-color: transparent; }

/* Page fade in */
body { animation: pageFadeIn 0.35s ease both; }
@keyframes pageFadeIn { from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:translateY(0);} }

/* Smooth hover transitions globally */
a, button { transition: all 0.2s ease; }

/* Skeleton loading animation */
.skeleton {
  background: linear-gradient(90deg, rgba(0,212,255,0.05) 25%, rgba(0,212,255,0.12) 50%, rgba(0,212,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 2px;
}
@keyframes shimmer { 0%{background-position:200% 0;} 100%{background-position:-200% 0;} }

/* Smooth image load */
img { transition: opacity 0.3s ease; }
img[loading] { opacity: 0; }
img.loaded { opacity: 1; }

/* Smooth card hover */
.car-card, .card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }

/* Loading spinner */
.spin { animation: spin 0.8s linear infinite; }

/* Scroll snap for mobile */
@media(max-width:768px) {
  .cars-grid { scroll-snap-type: x mandatory; overflow-x: auto; display:flex; gap:16px; padding-bottom:12px; }
  .car-card { scroll-snap-align: start; min-width: 280px; flex-shrink:0; }
}
