/* ==========================================================================
   Asistență Auto — global stylesheet
   Augments Tailwind with brand-specific styles, animations, utilities.
   ========================================================================== */

:root {
  --brand-yellow: #FACC15;        /* primary accent */
  --brand-yellow-dark: #EAB308;   /* hover/pressed */
  --brand-yellow-soft: #FEF9C3;   /* background tints */
  --brand-ink: #0F172A;           /* primary text */
  --brand-muted: #475569;         /* secondary text */
  --brand-line: #E2E8F0;          /* hairlines */
  --brand-bg-soft: #F8FAFC;       /* section backgrounds */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--brand-ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* Headings keep slightly tighter tracking */
h1, h2, h3, h4 { letter-spacing: -0.015em; }

/* Reusable button styles (kept here so we don't repeat Tailwind chains) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-yellow);
  color: var(--brand-ink);
  box-shadow: 0 4px 14px -4px rgba(234, 179, 8, 0.55);
}
.btn-primary:hover {
  background: var(--brand-yellow-dark);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--brand-ink);
  border: 1px solid var(--brand-line);
}
.btn-ghost:hover { background: var(--brand-bg-soft); }
.btn-dark {
  background: var(--brand-ink);
  color: #fff;
}
.btn-dark:hover { background: #1e293b; }

/* Sticky mobile call-to-action — visible only on small screens */
.mobile-call-bar {
  position: fixed;
  inset: auto 0 0 0;
  background: var(--brand-yellow);
  color: var(--brand-ink);
  text-align: center;
  font-weight: 700;
  padding: 0.85rem 1rem;
  z-index: 50;
  box-shadow: 0 -4px 20px -2px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .mobile-call-bar { display: none; }
  body { padding-bottom: 0; }
}
@media (max-width: 767.98px) {
  body { padding-bottom: 4rem; } /* reserve space for sticky bar */
}

/* Hero gradient background */
.hero-gradient {
  background:
    radial-gradient(circle at 20% 0%, rgba(250, 204, 21, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(250, 204, 21, 0.12) 0%, transparent 50%),
    #ffffff;
}

/* ==========================================================================
   Hero banner photo (homepage)
   ========================================================================== */
.hero-banner {
  /* fade-up on load */
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp .9s cubic-bezier(.16, 1, .3, 1) .15s forwards;
}
@keyframes heroFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-banner__img {
  /* gentle Ken Burns drift + smooth scale on hover */
  transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
  transform: scale(1.02);
  animation: heroDrift 18s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  0%   { transform: scale(1.02) translateX(0); }
  100% { transform: scale(1.05) translateX(-1%); }
}
.hero-banner:hover .hero-banner__img {
  animation-play-state: paused;
  transform: scale(1.06);
}

.hero-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, .15) 0%, rgba(15, 23, 42, 0) 25%);
  pointer-events: none;
}

.hero-banner__cta {
  /* slight bounce-in on first paint */
  opacity: 0;
  transform: translateY(-8px);
  animation: ctaPop .6s cubic-bezier(.16, 1, .3, 1) 1s forwards;
}
@keyframes ctaPop {
  to { opacity: 1; transform: translateY(0); }
}

/* Reduce motion: disable Ken Burns + animations */
@media (prefers-reduced-motion: reduce) {
  .hero-banner,
  .hero-banner__img,
  .hero-banner__cta { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Small decorative pulse for the live "24/7" badge */
.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #16a34a;
  opacity: .35;
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(.8); opacity: .5; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Subtle card elevation */
.card {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 1rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.18);
  border-color: #cbd5e1;
}

/* Section paddings */
.section { padding-top: 4rem; padding-bottom: 4rem; }
@media (min-width: 768px) { .section { padding-top: 6rem; padding-bottom: 6rem; } }

/* Container helper */
.container-x { max-width: 1200px; margin-inline: auto; padding-inline: 1.25rem; }

/* Prose / blog typography refinements */
.prose-blog h2 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: .75rem; font-weight: 700; }
.prose-blog h3 { font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: .5rem; font-weight: 600; }
.prose-blog p  { margin-bottom: 1rem; line-height: 1.7; color: #334155; }
.prose-blog ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.prose-blog ul li { margin-bottom: .35rem; color: #334155; }
.prose-blog a  { color: #b45309; text-decoration: underline; text-underline-offset: 3px; }

/* Mobile menu transitions */
.mobile-menu { display: none; }
.mobile-menu.is-open { display: block; }

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--brand-yellow-dark);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   GDPR Cookie Consent — popup modal (banner) + settings modal
   ========================================================================== */
#cc-banner {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  padding: 0;
}
@media (min-width: 768px) { #cc-banner { align-items: center; padding: 1.5rem; } }
#cc-banner.is-visible { opacity: 1; pointer-events: auto; }
.cc-banner__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.cc-banner__panel {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 480px;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -20px 60px -10px rgba(15, 23, 42, .4);
  transform: translateY(24px) scale(.98);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
  text-align: center;
}
@media (min-width: 768px) {
  .cc-banner__panel { border-radius: 1.5rem; box-shadow: 0 30px 80px -15px rgba(15, 23, 42, .45); padding: 2rem 2rem 1.75rem; }
}
#cc-banner.is-visible .cc-banner__panel { transform: translateY(0) scale(1); }

.cc-banner__icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--brand-yellow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.cc-banner__panel h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0 0 .5rem;
  color: var(--brand-ink);
}
.cc-banner__panel p {
  font-size: .9rem;
  line-height: 1.55;
  color: var(--brand-muted);
  margin: 0 0 1.5rem;
}
.cc-banner__panel a { color: #b45309; text-decoration: underline; text-underline-offset: 3px; }
.cc-banner__actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.cc-banner__actions .cc-btn--primary,
.cc-banner__actions .cc-btn--ghost { width: 100%; padding: .85rem 1.1rem; }

/* Buttons (own classes — not Tailwind, so they survive the future build switch) */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.1rem;
  border-radius: .65rem;
  font-weight: 600;
  font-size: .92rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s ease, transform .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
  font-family: inherit;
}
.cc-btn--primary { background: var(--brand-yellow); color: var(--brand-ink); }
.cc-btn--primary:hover { background: var(--brand-yellow-dark); transform: translateY(-1px); }
.cc-btn--ghost { background: transparent; color: var(--brand-ink); border-color: var(--brand-line); }
.cc-btn--ghost:hover { background: var(--brand-bg-soft); border-color: #cbd5e1; }
.cc-btn--link {
  background: transparent;
  color: var(--brand-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: .5rem 1rem;
  font-size: .85rem;
  margin-top: .25rem;
}
.cc-btn--link:hover { color: var(--brand-ink); }

/* Sticky mobile call bar nu trebuie să acopere banner-ul pe mobil */
@media (max-width: 767.98px) {
  body:has(#cc-banner.is-visible) .mobile-call-bar { display: none; }
  body:has(#cc-banner.is-visible) { padding-bottom: 0; }
}

/* Modal */
#cc-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
@media (min-width: 768px) { #cc-modal { align-items: center; } }
#cc-modal.is-visible { opacity: 1; pointer-events: auto; }
.cc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(2px);
}
.cc-modal__panel {
  position: relative;
  background: #fff;
  border-radius: 1rem 1rem 0 0;
  max-width: 540px;
  width: 100%;
  padding: 1.5rem 1.5rem 1.25rem;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 -20px 60px -10px rgba(15, 23, 42, .35);
  transform: translateY(20px);
  transition: transform .2s ease;
}
#cc-modal.is-visible .cc-modal__panel { transform: translateY(0); }
@media (min-width: 768px) {
  .cc-modal__panel { border-radius: 1.25rem; box-shadow: 0 30px 80px -15px rgba(15, 23, 42, .4); }
}
.cc-modal__panel h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .5rem; }
.cc-modal__intro { font-size: .9rem; color: var(--brand-muted); margin: 0 0 1.25rem; line-height: 1.5; }
.cc-modal__close {
  position: absolute;
  top: .65rem;
  right: .65rem;
  background: transparent;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--brand-muted);
  cursor: pointer;
  width: 2rem;
  height: 2rem;
  border-radius: .5rem;
}
.cc-modal__close:hover { background: var(--brand-bg-soft); color: var(--brand-ink); }
.cc-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--brand-line);
}
.cc-modal__actions .cc-btn { flex: 1 1 auto; }

/* Categorii */
.cc-cat {
  border: 1px solid var(--brand-line);
  border-radius: .85rem;
  padding: .85rem 1rem;
  margin-bottom: .75rem;
  background: #fff;
}
.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .25rem;
}
.cc-cat__head strong { font-size: .95rem; }
.cc-cat__badge {
  margin-left: .5rem;
  font-size: .7rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: var(--brand-yellow-soft);
  color: #854d0e;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cc-cat p { font-size: .85rem; color: var(--brand-muted); margin: 0; line-height: 1.5; }

/* Toggle (input checkbox custom) */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-toggle__slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s ease;
}
.cc-toggle__slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.cc-toggle input:checked + .cc-toggle__slider { background: var(--brand-yellow-dark); }
.cc-toggle input:checked + .cc-toggle__slider::before { transform: translateX(18px); }
.cc-toggle input:disabled + .cc-toggle__slider { background: var(--brand-yellow); opacity: .6; cursor: not-allowed; }
.cc-toggle input:focus-visible + .cc-toggle__slider { outline: 2px solid var(--brand-yellow-dark); outline-offset: 2px; }
