/* ============================================================
   DESIGN SYSTEM — tokens replaced at compile time by generate.py
   TNR Medical Service — Service Aparatură Medicală
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color:  #0a2463;
  --primary-light:  #1e40af;
  --primary-dark:   #051040;
  --accent-color:   #dc2626;
  --accent-light:   #ef4444;
  --accent-dark:    #b91c1c;
  --secondary-color: #475569;
  --bg-light:       #f0f4ff;
  --text-color:     #051040;
  --text-muted:     #64748b;
  --bg-white:       #ffffff;

  --primary-hsl:    222, 81%, 21%;
  --accent-hsl:     0, 72%, 50%;
  --bg-light-hsl:   223, 100%, 97%;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --shadow-sm:  0 2px 4px rgba(5,16,64,0.05);
  --shadow-md:  0 4px 6px -1px rgba(5,16,64,0.08), 0 2px 4px -1px rgba(5,16,64,0.04);
  --shadow-lg:  0 10px 15px -3px rgba(5,16,64,0.1), 0 4px 6px -2px rgba(5,16,64,0.05);
  --shadow-xl:  0 20px 25px -5px rgba(5,16,64,0.12), 0 10px 10px -5px rgba(5,16,64,0.04);
  --shadow-glow: 0 0 20px rgba(var(--accent-hsl), 0.3);

  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   600ms cubic-bezier(0.4, 0, 0.2, 1);

  --border-radius-sm:   6px;
  --border-radius-md:   12px;
  --border-radius-lg:   24px;
  --border-radius-pill: 50px;

  --z-back:     -10;
  --z-base:       1;
  --z-dropdown:  10;
  --z-sticky:    20;
  --z-overlay:   30;
  --z-modal:     50;
  --z-max:     9999;
}

/* ---- Anti-spam Honeypot ---- */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.7;
}
body > main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-dark);
}
.font-heading { font-family: var(--font-heading); }
.text-muted { color: var(--text-muted) !important; }
.text-primary-dark { color: var(--primary-dark) !important; }

a { color: var(--accent-color); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--accent-dark); }
.hover-gold:hover { color: var(--accent-color) !important; }
.hover-white:hover { color: #fff !important; }

/* ---- Skip Link ---- */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--accent-color); color: #fff;
  padding: 8px 16px; border-radius: var(--border-radius-sm);
  z-index: var(--z-max); font-weight: 600;
}
.skip-link:focus { top: 8px; }

/* ---- Promo Banner ---- */
body.has-promo-banner { padding-top: 116px; }
.promo-banner-top {
  background-color: var(--accent-color);
  font-weight: 600;
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 9999; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.875rem;
}

/* ---- Navbar ---- */
.navbar-custom {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(5,16,64,0.05);
  transition: top 300ms ease, background-color 300ms ease, padding 300ms ease, box-shadow 300ms ease;
  z-index: var(--z-sticky);
  top: 0;
}
body.has-promo-banner .navbar-custom { top: 40px; }
body.has-promo-banner .navbar-custom.navbar-scrolled { top: 0; }
.navbar-custom.navbar-scrolled {
  box-shadow: var(--shadow-lg);
  padding-top: 8px;
  padding-bottom: 8px;
}
.navbar-brand-img { height: 72px; width: auto; }

.navbar-custom .nav-link {
  color: var(--primary-dark) !important;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.5rem 1rem;
}
.navbar-custom .nav-link::after {
  content: '';
  position: absolute; bottom: 0; left: 1rem; right: 1rem;
  height: 2px; background: var(--accent-color);
  transform: scaleX(0); transition: transform var(--transition-normal);
}
.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after { transform: scaleX(1); }

/* ---- Buttons ---- */
.btn-gold {
  background: var(--accent-color);
  color: #fff !important;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--border-radius-pill);
  border: 2px solid var(--accent-color);
  transition: var(--transition-normal);
  display: inline-flex; align-items: center; gap: 8px;
  position: relative; overflow: hidden;
}
.btn-gold:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-navy-outline {
  background: transparent;
  color: var(--primary-color);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--border-radius-pill);
  border: 2px solid var(--primary-color);
  transition: var(--transition-normal);
  display: inline-flex; align-items: center; gap: 8px;
  position: relative; overflow: hidden;
}
.btn-navy-outline:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.btn-phone {
  background: var(--primary-light);
  color: #fff !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--border-radius-pill);
  font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 6px;
  transition: var(--transition-normal);
}
.btn-phone:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Ripple */
span.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0); animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}
@keyframes rippleEffect { to { transform: scale(4); opacity: 0; } }

/* ---- Hero Section ---- */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
  color: #fff;
  padding: 140px 0 100px;
  position: relative;
  overflow: hidden;
  min-height: 85vh;
  display: flex; align-items: center;
}

.hero-content { position: relative; z-index: var(--z-base); }
.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700; line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #fff;
  animation: slideUp 0.8s ease forwards;
}
.hero-content .lead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.9; max-width: 650px;
  margin-bottom: 1.5rem;
  animation: slideUp 0.8s ease 0.15s forwards;
  opacity: 0; animation-fill-mode: forwards;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 2rem; animation: slideUp 0.8s ease 0.3s forwards; opacity: 0; animation-fill-mode: forwards; }
.hero-badges .badge {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  font-size: 0.85rem; padding: 8px 16px;
  border-radius: var(--border-radius-pill);
  display: flex; align-items: center; gap: 6px;
  font-weight: 500;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; animation: slideUp 0.8s ease 0.45s forwards; opacity: 0; animation-fill-mode: forwards; }
.hero-section .btn-gold { background: var(--accent-light); border-color: var(--accent-light); }
.hero-section .btn-gold:hover { background: var(--accent-color); border-color: var(--accent-color); }
.hero-section .btn-navy-outline { color: #fff; border-color: rgba(255,255,255,0.5); }
.hero-section .btn-navy-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* Wave divider */
.wave-divider {
  position: absolute; bottom: -2px; left: 0; right: 0;
  line-height: 0;
}
.wave-divider svg { width: 100%; height: 80px; }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Inner Hero (subpages) ---- */
.inner-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: #fff;
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}
.inner-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); }
.inner-hero p { opacity: 0.9; max-width: 600px; }

/* ---- Stats Section ---- */
.stats-section {
  background: var(--bg-light);
  padding: 60px 0;
}
.stat-card {
  text-align: center;
  padding: 30px 20px;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
}
.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ---- Card Premium ---- */
.card-premium {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(5,16,64,0.06);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  height: 100%;
  transition: var(--transition-normal);
}
.card-premium:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.card-premium .icon-circle {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
  transition: transform var(--transition-normal);
}
.card-premium:hover .icon-circle { transform: rotate(10deg) scale(1.1); }

/* ---- Service Cards ---- */
.service-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(5,16,64,0.06);
  box-shadow: var(--shadow-md);
  padding: 36px 30px;
  height: 100%;
  transition: var(--transition-normal);
  display: flex; flex-direction: column;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-color);
}
.service-card .service-icon {
  font-size: 2.4rem;
  color: var(--accent-color);
  margin-bottom: 18px;
  transition: transform var(--transition-normal);
}
.service-card:hover .service-icon { transform: rotate(10deg) scale(1.1); }
.service-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.service-card ul { list-style: none; padding: 0; margin: 0; }
.service-card ul li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex; align-items: flex-start; gap: 8px;
}
.service-card ul li i { color: var(--primary-light); margin-top: 4px; }

/* ---- Testimonials ---- */
.testimonial-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
  height: 100%;
  border-left: 4px solid var(--accent-color);
}
.testimonial-stars { color: var(--accent-light); font-size: 1rem; }
.testimonial-stars i { opacity: 0; transform: scale(0.5); transition: opacity 0.4s ease, transform 0.4s ease; }
.testimonial-stars i.revealed { opacity: 1; transform: scale(1); }
.testimonial-card blockquote { font-style: italic; color: var(--text-color); margin: 12px 0; font-size: 0.95rem; }
.testimonial-author { font-weight: 600; color: var(--primary-dark); font-size: 0.9rem; }

/* ---- FAQ Accordion ---- */
.accordion-item {
  border: 1px solid rgba(5,16,64,0.08);
  border-radius: var(--border-radius-md) !important;
  overflow: hidden;
  margin-bottom: 12px;
}
.accordion-button {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 1rem;
  padding: 18px 24px;
}
.accordion-button:not(.collapsed) {
  background: var(--bg-light);
  color: var(--primary-color);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: none; border-color: var(--accent-color); }

/* ---- CTA Section ---- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: #fff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 150%; height: 150%;
  background: radial-gradient(circle at 30% 70%, rgba(var(--accent-hsl), 0.15), transparent 60%);
  animation: glowPulse 6s ease-in-out infinite;
}
@keyframes glowPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.cta-section .container { position: relative; z-index: var(--z-base); }

/* ---- Pulse Call ---- */
.pulse-call {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-light);
  font-weight: 600;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ---- Footer ---- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  flex-shrink: 0;
  padding: 60px 0 30px;
}
.footer h5 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}
.footer h5::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--accent-color);
  border-radius: 2px;
}
.footer a { color: rgba(255,255,255,0.6); transition: var(--transition-fast); }
.footer a:hover { color: var(--accent-light); }
.footer .social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: var(--transition-normal);
  font-size: 1.1rem;
}
.footer .social-icon:hover { background: var(--accent-color); transform: translateY(-3px); }

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px;
  width: 48px; height: 48px;
  background: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-normal);
  z-index: var(--z-overlay);
  box-shadow: var(--shadow-lg);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--accent-dark); transform: translateY(-3px); }

/* ---- Mobile Bottom Bar ---- */
.mobile-bottom-bar {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-white);
  border-top: 1px solid rgba(5,16,64,0.1);
  z-index: var(--z-overlay);
  padding: 8px 16px;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.08);
}
.mobile-bottom-bar .btn { font-size: 0.85rem; padding: 10px 16px; }
@media (max-width: 768px) {
  .mobile-bottom-bar { display: flex; }
  body { padding-bottom: 70px; }
  .back-to-top { bottom: 80px; }
}

/* ---- Gallery / Portfolio ---- */
.gallery-filter-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 40px; }
.filter-btn {
  background: var(--bg-white); color: var(--primary-color);
  border: 2px solid var(--primary-color); font-weight: 600;
  padding: 8px 24px; border-radius: var(--border-radius-pill);
  transition: var(--transition-fast); cursor: pointer;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary-color); color: var(--bg-white);
  box-shadow: var(--shadow-md);
}
.gallery-item {
  display: block; position: relative;
  border-radius: var(--border-radius-md); overflow: hidden;
  box-shadow: var(--shadow-md); transition: var(--transition-normal);
}
.gallery-item:hover { transform: scale(1.03); box-shadow: var(--shadow-xl); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(5,16,64,0.9) 0%, rgba(5,16,64,0.15) 70%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 25px; opacity: 0; transition: var(--transition-normal);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h3 { color: var(--bg-white); font-size: 1.2rem; margin-bottom: 4px; }
.gallery-overlay p  { color: var(--accent-light); font-size: 0.85rem; margin: 0; }

/* ---- Blog Cards ---- */
.blog-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-normal);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.blog-card .card-body { padding: 28px; }

/* ---- Contact Page ---- */
.contact-info-card {
  background: var(--bg-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
  height: 100%;
  transition: var(--transition-normal);
  display: flex; align-items: flex-start; gap: 16px;
}
.contact-info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.contact-info-card .ci-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ---- Form Styles ---- */
.form-control, .form-select {
  border: 1px solid rgba(5,16,64,0.15);
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-hsl), 0.15);
}
.form-control.is-invalid { animation: shake 0.4s ease; border-color: #dc3545; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* ---- Scroll Reveal ---- */
.scroll-reveal { opacity: 0; transform: translateY(30px); transition: opacity 800ms ease, transform 800ms ease; }
.scroll-reveal.revealed { opacity: 1; transform: translateY(0); }

/* ---- Service Area Badges ---- */
.service-area-badge {
  display: inline-block;
  background: var(--bg-light);
  color: var(--primary-color);
  border: 1px solid rgba(5,16,64,0.1);
  padding: 6px 16px;
  border-radius: var(--border-radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
}
.service-area-badge:hover {
  background: var(--primary-color);
  color: #fff;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .scroll-reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
  .navbar-custom .nav-link::after { display: none; }
  .hero-section { min-height: 60vh; padding: 110px 0 60px; }
}
@media (max-width: 576px) {
  .hero-content h1 { font-size: 1.8rem; }
  .stat-number { font-size: 2.2rem; }
  .gallery-filter-bar { gap: 8px; }
  .filter-btn { padding: 6px 16px; font-size: 0.85rem; }
}
