/* ==========================================================================
   Callme.ro — Custom styles & theme tokens (complements Tailwind CDN).
   Palette derived from the real service van (img/auto2.jpg):
   RED body + LIME stripes/wheels + BLUE lettering.
   Brand wordmark — "Call" (blue) + "Me" (red) + ™. Primary accent = red.
   ========================================================================== */

:root {
  --accent: #e02424;        /* emergency red — primary CTA (van body) */
  --accent-600: #b91c1c;    /* hover */
  --lime: #b7c400;          /* van stripes/wheels — secondary highlight */
  --brand-call: #1e6fbf;    /* blue — "Call" (van lettering) */
  --brand-me: #e02424;      /* red — "Me" */

  /* Light theme tokens */
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --header-bg: rgba(255, 255, 255, 0.82);
}

html.dark {
  --brand-call: #5aa9f0;    /* lighter blue for contrast on dark */
  --lime: #c9d800;
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1f2a3c;
  --header-bg: rgba(11, 17, 32, 0.78);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* --- Themed helper utilities --------------------------------------------- */
.surface   { background-color: var(--surface); }
.surface-2 { background-color: var(--surface-2); }
.text-muted { color: var(--text-muted); }
.bd        { border-color: var(--border); }
.accent    { color: var(--accent); }
.bg-accent { background-color: var(--accent); }
/* Tailwind's `text-racing`/`border-racing`/`bg-racing` map to the accent via
   the inline tailwind.config; these mirror them for hand-written classes. */
.hover\:text-racing:hover { color: var(--accent); }
.hover\:border-racing:hover { border-color: var(--accent); }

/* --- Brand wordmark (two-tone) ------------------------------------------ */
.brand-mark { letter-spacing: -0.02em; font-size: 1.18em; }
.brand-call { color: var(--brand-call); }
.brand-me   { color: var(--brand-me); }
.hero .brand-call { color: #93c5fd; }   /* keep legible on the dark hero */
.brand-tm {
  font-size: 0.62em;
  font-weight: 700;
  vertical-align: super;
  margin-left: 1px;
  color: var(--accent);
  opacity: 0.85;
}

/* --- Language dropdown items (hover works on both themes) ---------------- */
.lang-menu { display: none; }
.lang-menu.open { display: block; }
.lang-item { color: var(--text); }
.lang-item .lang-endonym { color: var(--text-muted); }
.lang-item:hover,
.lang-item:focus-visible { background: var(--accent); color: #fff; }
.lang-item:hover .lang-endonym,
.lang-item:focus-visible .lang-endonym { color: #fff; }

/* --- Call button attention pulse ---------------------------------------- */
.btn-call { position: relative; animation: call-bounce 2.4s ease-in-out infinite; }
.btn-call::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(224, 36, 36, 0.55);
  animation: call-ring 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes call-ring {
  0%   { box-shadow: 0 0 0 0 rgba(224, 36, 36, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(224, 36, 36, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 36, 36, 0); }
}
@keyframes call-bounce {
  0%, 88%, 100% { transform: translateY(0); }
  92%           { transform: translateY(-2px); }
  96%           { transform: translateY(-1px); }
}

/* --- Live availability badge -------------------------------------------- */
.badge-live { display: inline-flex; align-items: center; gap: 0.5rem; }
.badge-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; }
.badge-dot.pulse { animation: dot-pulse 1.8s ease-in-out infinite; }
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.75); }
}

/* --- Promo gift icon (distinct gold) ------------------------------------ */
.promo-gift { color: #ffd400; }

/* --- Header -------------------------------------------------------------- */
.site-header {
  background-color: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

/* --- Hero (real service van photo) -------------------------------------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.90)),
    url("img/auto2.jpg") center / cover no-repeat fixed;
  color: #f8fafc;
}
html:not(.dark) .hero {
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.82)),
    url("img/auto2.jpg") center / cover no-repeat fixed;
}
@media (max-width: 768px) { .hero { background-attachment: scroll; } }

/* --- Buttons ------------------------------------------------------------- */
.btn-accent {
  background-color: var(--accent);
  color: #fff;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 8px 24px -10px rgba(224, 36, 36, 0.7);
}
.btn-accent:hover { background-color: var(--accent-600); box-shadow: 0 12px 30px -8px rgba(224, 36, 36, 0.65); }
.btn-accent:active { transform: scale(0.97); }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  transition: background-color 0.2s ease, transform 0.12s ease;
}
.btn-ghost:hover { background-color: rgba(255, 255, 255, 0.12); }
.btn-ghost:active { transform: scale(0.97); }

/* WhatsApp / SMS tinted buttons */
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb457; }
.btn-sms { background: var(--brand-call); color: #fff; }
.btn-sms:hover { filter: brightness(1.08); }

/* --- Cards --------------------------------------------------------------- */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.55);
}

/* --- Form fields --------------------------------------------------------- */
.field {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(224, 36, 36, 0.18);
}

/* --- Tariff table -------------------------------------------------------- */
.tariff-table { width: 100%; border-collapse: collapse; }
.tariff-table th, .tariff-table td {
  text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border);
}
.tariff-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.tariff-table td.price { font-weight: 800; color: var(--accent); white-space: nowrap; }
.tariff-table tr:last-child td { border-bottom: 0; }

/* --- Zone calculator segmented control ---------------------------------- */
.zone-btn {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.1s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.zone-btn:hover { border-color: var(--accent); }
.zone-btn.selected { background-color: var(--accent); border-color: var(--accent); color: #fff; }

/* --- FAQ accordion ------------------------------------------------------- */
.faq-item { border: 1px solid var(--border); border-radius: 0.9rem; background: var(--surface); overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.25rem; font-weight: 600; text-align: left; cursor: pointer; color: var(--text); }
.faq-q .faq-chevron { transition: transform 0.25s ease; flex-shrink: 0; }
.faq-item.open .faq-q .faq-chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a-inner { padding: 0 1.25rem 1.2rem; color: var(--text-muted); line-height: 1.65; }

/* --- Testimonials carousel ---------------------------------------------- */
#tst-track > li { flex: 0 0 100%; box-sizing: border-box; padding: 0 0.5rem; }
@media (min-width: 768px)  { #tst-track > li { flex-basis: 50%; } }
@media (min-width: 1024px) { #tst-track > li { flex-basis: 33.3333%; } }
.tst-dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--border); transition: background 0.2s ease, width 0.2s ease; }
.tst-dot.active { background: var(--accent); width: 22px; }

/* --- Mobile nav ---------------------------------------------------------- */
#mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
#mobile-menu.open { max-height: 520px; }

/* --- Modal --------------------------------------------------------------- */
.modal-backdrop { background: rgba(2, 6, 23, 0.6); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.25s ease; }
.modal-backdrop.open { opacity: 1; }
.modal-card {
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.modal-backdrop.open .modal-card { transform: translateY(0) scale(1); opacity: 1; }

/* --- Cookie consent banner ---------------------------------------------- */
#cookie-banner:not(.hidden) { animation: cookie-up 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes cookie-up {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* --- Scroll-reveal micro-animation -------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* --- Floating WhatsApp --------------------------------------------------- */
.wa-fab {
  background: #25d366;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, 0.6);
  animation: wa-pulse 2.6s infinite;
}
@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- Image gallery ------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 640px)  { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-item {
  position: relative; overflow: hidden; border-radius: 0.9rem; cursor: zoom-in;
  aspect-ratio: 4 / 3; border: 1px solid var(--border); background: var(--surface-2);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(2, 6, 23, 0.45));
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover::after { opacity: 1; }

/* --- Lightbox ------------------------------------------------------------ */
.lightbox { background: rgba(2, 6, 23, 0.9); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.25s ease; }
.lightbox.open { opacity: 1; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 0.75rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.8); }
.lightbox-btn { background: rgba(255,255,255,0.12); color: #fff; transition: background 0.2s ease; }
.lightbox-btn:hover { background: rgba(255,255,255,0.25); }

/* --- Partners strip ------------------------------------------------------ */
.partner-logo { max-height: 46px; width: auto; opacity: 0.85; transition: opacity 0.2s ease, transform 0.2s ease; filter: grayscale(1); }
.partner-logo:hover { opacity: 1; transform: translateY(-2px); filter: grayscale(0); }
.partner-chip {
  display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 0.9rem;
  padding: 0.6rem 1.1rem; border-radius: 9999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); transition: color 0.2s ease, border-color 0.2s ease;
}
.partner-chip:hover { color: var(--accent); border-color: var(--accent); }

/* --- About mascot / logo ------------------------------------------------- */
.about-logo { max-width: 320px; width: 100%; height: auto; }

/* --- Scrollbar ----------------------------------------------------------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
