/* ==========================================================================
   VopsitorieAutoBuzau.ro — Tema v5.0 (Premium Bento / Glassmorphism)
   Design: State-of-the-Art · Cinematic · Editorial
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800;900&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand */
  --red:           #e11d48;
  --red-dark:      #be123c;
  --red-glow:      rgba(225, 29, 72, 0.4);
  
  /* Monochrome scale */
  --n-950: #020617; /* Deepest black */
  --n-900: #0f172a;
  --n-800: #1e293b;
  --n-400: #94a3b8;
  --n-200: #e2e8f0;
  --n-50:  #f8fafc;
  --white: #ffffff;

  /* Typography */
  --font-heading: 'Outfit', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --s1:  4px;   --s2:  8px;   --s3:  12px;  --s4:  16px;
  --s5:  24px;  --s6:  32px;  --s8:  48px;  --s10: 64px;
  --s12: 80px;  --s16: 96px;

  /* Border radius */
  --r-sm: 8px;  --r-md: 16px;  --r-lg: 24px;  --r-xl: 32px;

  /* Layout */
  --max-w: 1300px;
  --nav-h: 80px;

  /* Shadows & Glass */
  --sh-float: 0 20px 40px -10px rgba(0,0,0,0.2);
  --sh-bento: 0 4px 24px -4px rgba(0,0,0,0.05);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255,255,255,0.4);
  --glass-dark-bg: rgba(15, 23, 42, 0.6);
  --glass-dark-border: 1px solid rgba(255,255,255,0.05);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--n-800);
  background: var(--n-50);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; border-radius: var(--r-sm); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--n-950);
}

/* ============================================================
   3. UTILITIES & GLASSMORPHISM
   ============================================================ */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-bento);
}

.glass-panel-dark {
  background: var(--glass-dark-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: var(--glass-dark-border);
  border-radius: var(--r-lg);
}

.section-padding { padding: var(--s12) var(--s5); }
.content-wrapper { max-width: var(--max-w); margin: 0 auto; }

/* ============================================================
   4. NAVIGATION (Classic Fixed Header)
   ============================================================ */
header {
  position: fixed;
  top: 38px; left: 0;
  width: 100%;
  height: var(--nav-h);
  background: var(--n-950);
  border-bottom: 2px solid var(--red);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--s6);
  border-radius: 0 !important;
}
  
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--white);
  transition: all 0.3s ease-in-out;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.logo a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.5px;
}
.logo a span { color: var(--red); }

nav { display: flex; gap: var(--s2); align-items: center; }
nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  padding: var(--s2) var(--s4);
  border-radius: 99px;
  transition: all 0.3s ease;
}
nav a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.btn-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 12px 28px;
  border-radius: 99px;
  font-weight: 700;
  box-shadow: 0 8px 24px var(--red-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-cta:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--red-dark);
}

/* ============================================================
   5. HERO SECTION (Cinematic)
   ============================================================ */
.hero {
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 38px) var(--s5) 0;
  overflow: hidden;
  background: var(--n-950);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--n-950) 0%, transparent 60%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--white);
  margin-bottom: var(--s5);
  text-wrap: balance;
}
.hero-title span {
  background: linear-gradient(135deg, #ff4d4d, var(--red-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--n-200);
  max-width: 600px;
  margin: 0 auto var(--s8);
  text-wrap: balance;
}

/* ============================================================
   6. BENTO GRID (Services & Features)
   ============================================================ */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: var(--s3);
}
.section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--n-400);
  margin-bottom: var(--s10);
  max-width: 600px;
  margin-inline: auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s4);
}

.bento-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--s6);
  min-height: 380px;
  transition: transform 0.4s ease;
}
.bento-item:hover { transform: translateY(-4px); }

.bento-item img.bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-lg);
  transition: transform 0.6s ease;
  z-index: 0;
}
.bento-item:hover img.bg-image { transform: scale(1.05); }

.bento-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,6,23,0.95) 0%, rgba(2,6,23,0.2) 60%, transparent 100%);
  border-radius: var(--r-lg);
  z-index: 1;
}

.bento-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.bento-content h3 { color: var(--white); font-size: 1.5rem; margin-bottom: var(--s2); }
.bento-content p { color: rgba(255,255,255,0.7); font-size: 1rem; margin-bottom: var(--s4); }

.bento-item.large { grid-column: span 8; }
.bento-item.small { grid-column: span 4; }

/* Features Bento */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}
.feature-box {
  padding: var(--s8) var(--s6);
  text-align: center;
}
.feature-box h4 { font-size: 1.25rem; margin-bottom: var(--s3); }

/* ============================================================
   7. FOOTER
   ============================================================ */
footer {
  background: var(--n-950);
  color: var(--n-400);
  padding: 120px var(--s5) 40px;
  margin-top: 0;
  text-align: left;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 80px;
}
.footer-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-logo { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 900; color: var(--white); margin-bottom: var(--s4); letter-spacing: -1px; }
.footer-logo span { color: var(--red); }
.footer-col h4 { color: var(--white); font-size: 1.25rem; font-weight: 700; margin-bottom: var(--s5); }
.footer-col p, .footer-col a { color: var(--n-300); font-size: 1.125rem; transition: color 0.3s; line-height: 1.8; margin-bottom: 12px; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-col iframe { border-radius: var(--r-lg) !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1) !important; }

hr.footer-divider {
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0 0 40px 0;
}

/* Footer Buttons */
.footer-btn {
  display: inline-block;
  width: 100%;
  padding: 12px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-md);
  color: var(--n-200) !important;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}
.footer-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white) !important;
  transform: translateY(-2px);
  text-decoration: none !important;
}
.footer-btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white) !important;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}
.footer-btn-primary:hover {
  background: var(--red-dark);
}
.footer-btn-outline {
  background: transparent;
  border: 2px solid var(--n-600);
}
.footer-btn-outline:hover {
  border-color: var(--white);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  text-align: center;
}
.footer-bottom p { color: var(--n-500); font-size: 0.9375rem; }
.legal-links a, .anpc-links a { color: var(--n-400); font-size: 0.9375rem; margin: 0 10px; transition: color 0.3s; }
.legal-links a:hover, .anpc-links a:hover { color: var(--white); }

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ============================================================
   8. MEDIA QUERIES
   ============================================================ */
@media (max-width: 992px) {
  .bento-item.large, .bento-item.small { grid-column: span 12; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  header { width: 100%; padding: 0 var(--s4); left: 0; transform: none; }
  
  /* Editorial Two Column Layout Collapse */
  section .content-wrapper[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: var(--s6) !important;
  }
  .glass-panel-dark[style*="position: sticky"] {
    position: static !important;
  }
}

@media (max-width: 768px) {
  /* Hamburger Menu Activation */
  .hamburger { display: block !important; }
  
  nav {
    position: fixed;
    top: var(--nav-h); right: -100%;
    width: 100%; height: calc(100vh - var(--nav-h));
    background: linear-gradient(rgba(15,23,42,0.5), rgba(15,23,42,0.75)), url('/media/images/gallery/hero-bg.png') center/cover no-repeat;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }
  nav.nav-open { right: 0; }
  
  nav a {
    font-size: 1.5rem;
    margin-bottom: var(--s4);
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  }
  
  /* Fix broken long CTA buttons on mobile */
  a.btn-cta {
    white-space: normal !important;
    text-align: center !important;
    font-size: clamp(0.9rem, 4vw, 1.1rem) !important;
    padding: 15px !important;
  }
  
  /* Typography & Spacing Reductions */
  .hero-title { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
  .section-padding { padding: var(--s8) var(--s4); }
  
  /* Form Layout */
  .parts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  /* Tables */
  .glass-panel table {
    display: table;
    width: 100%;
    white-space: normal;
  }
  .glass-panel table th,
  .glass-panel table td {
    padding: 12px 8px !important;
    font-size: 0.9rem !important;
  }
  .parts-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   9. LEGACY OVERRIDES (Legal pages & Contact)
   ============================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: calc(var(--nav-h) + 80px) var(--s5) var(--s10) var(--s5); }
.service-detail-header h1 { font-size: 3rem !important; }
/* ============================================================
   10. FORMS & CALCULATOR (Premium UI)
   ============================================================ */
.form-glass {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s5);
  box-shadow: var(--sh-bento);
  border: 1px solid var(--n-200);
}

.form-group { margin-bottom: var(--s5); }
.form-group label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--n-900);
  margin-bottom: var(--s2);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 14px 20px;
  background: var(--n-50);
  border: 2px solid transparent;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--n-900);
  transition: all 0.3s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-glow);
}

/* Parts Select Grid (App-like UI) */
.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s3);
  margin-bottom: var(--s8);
}

.part-card {
  position: relative;
  background: var(--n-50);
  border: 2px solid var(--n-200);
  border-radius: var(--r-md);
  padding: var(--s4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.part-card:hover {
  border-color: var(--n-400);
  transform: translateY(-2px);
}
.part-card.selected {
  background: var(--red-glow);
  border-color: var(--red);
}

.part-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.part-card .part-name { font-weight: 700; color: var(--n-900); font-size: 0.9375rem; margin-bottom: var(--s1); }
.part-card .part-price { font-size: 0.8125rem; font-weight: 600; color: var(--red); background: var(--white); padding: 2px 8px; border-radius: 99px; }
.part-card.selected .part-price { background: var(--red); color: var(--white); }

/* Floating Total Bar */
.calc-total-bar {
  background: var(--n-950);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  margin-top: var(--s8);
  margin-bottom: var(--s8);
}
.calc-total-bar h4 { color: rgba(255,255,255,0.7); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0; }
.calc-total-price { font-size: 2.5rem; font-family: var(--font-heading); font-weight: 900; line-height: 1; }
.calc-total-price span { color: var(--red); }

@media (max-width: 768px) {
  .calc-total-bar { flex-direction: column; text-align: center; gap: var(--s4); padding: var(--s5); }
}

/* ============================================================
   11. WHATSAPP TICKER & MOBILE CTA BAR (Restored)
   ============================================================ */
.whatsapp-ticker {
  display: flex;
  background-color: var(--red);
  color: white;
  align-items: center;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: 38px;
  z-index: 10001;
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: scrollText 30s linear infinite;
}
.ticker-text {
  /* padding is included in the span content directly or here */
}
@keyframes scrollText {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   12. COOKIE BANNER (Premium Dark)
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 80px; /* above mobile CTA */
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  width: 90%;
  max-width: 600px;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  color: var(--n-200);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.cookie-banner.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner-text { font-size: 0.875rem; text-align: center; line-height: 1.5; }
.cookie-banner-text a { color: var(--red); text-decoration: underline; font-weight: bold; }
.cookie-btn {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 700;
  cursor: pointer;
  align-self: center;
  transition: background 0.3s;
}
.cookie-btn:hover { background: var(--red-dark); }

.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  background: var(--white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}
.mobile-cta-bar a {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mobile-cta-call { color: var(--n-950); }
.mobile-cta-maps { background: #4285F4; color: white; border-left: 1px solid rgba(0,0,0,0.05); border-right: 1px solid rgba(255,255,255,0.2); }
.mobile-cta-whatsapp { background: #25D366; color: white; }

@media (max-width: 768px) {
  .whatsapp-ticker span { animation: scrollText 15s linear infinite; }
  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 60px; } /* Room for mobile CTA bar */
}/* 13. GALERIE ORIZONTALA (SCROLL SNAP) */
.horizontal-gallery-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: var(--s2) 0;
}
.horizontal-gallery {
    display: flex;
    gap: var(--s3);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--s3);
}
.horizontal-gallery::-webkit-scrollbar {
    height: 8px;
}
.horizontal-gallery::-webkit-scrollbar-track {
    background: var(--n-200);
    border-radius: 4px;
}
.horizontal-gallery::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
.gallery-item {
    scroll-snap-align: center;
    flex: 0 0 85%;
    max-width: 600px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    background: var(--n-900);
}
@media (min-width: 768px) {
    .gallery-item {
        flex: 0 0 45%;
    }
}
@media (min-width: 1200px) {
    .gallery-item {
        flex: 0 0 30%;
    }
}
.gallery-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--s3);
    background: linear-gradient(to top, rgba(15,23,42,0.95), transparent);
    color: var(--white);
    font-weight: 600;
}

/* ============================================================
   14. ACCORDION / DESPLEGABLES
   ============================================================ */
.accordion-menu {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  max-width: 900px;
  margin: 0 auto;
}

.accordion-item {
  background: var(--white);
  border: 1px solid var(--n-200);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-bento);
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: var(--n-400);
  transform: translateY(-2px);
}

.accordion-item summary {
  padding: var(--s4) var(--s5);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--n-900);
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
}

.accordion-item summary::-webkit-details-marker {
  display: none;
}

.accordion-item summary::after {
  content: '+';
  position: absolute;
  right: var(--s5);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--red);
  transition: transform 0.3s ease;
}

.accordion-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.accordion-item[open] summary {
  background: var(--n-50);
  border-bottom: 1px solid var(--n-200);
}

.accordion-content {
  padding: var(--s4) var(--s5);
  background: var(--white);
  color: var(--n-700);
  font-size: 1rem;
  line-height: 1.6;
}

.accordion-content p {
  margin-bottom: var(--s2);
}
.accordion-content p:last-child {
  margin-bottom: 0;
}

.accordion-content strong {
  color: var(--n-950);
  font-weight: 700;
}
