/* ==========================================================================
   DESIGN ENHANCEMENTS — Anti-AI Patterns
   Noise textures, gradient orbs, staggered animations, physicality.
   Inspired by Linear, Vercel, Arc, Superhuman.
   ========================================================================== */


/* ---- Noise Texture Overlay (Arc pattern) ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}


/* ---- Warm Background Tint ---- */
:root {
  --color-bg-primary: #F9F8F5;
  --shadow-colored-blue: 0 8px 30px rgba(37, 99, 235, 0.08);
  --shadow-colored-gold: 0 8px 30px rgba(200, 169, 126, 0.12);
  --shadow-colored-success: 0 8px 30px rgba(16, 185, 129, 0.1);
}


/* ---- Hero Decorative Gradient Orbs ---- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -80px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0.02) 50%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: orb-drift 20s ease-in-out infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 169, 126, 0.07) 0%, rgba(200, 169, 126, 0.02) 50%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: orb-drift 25s ease-in-out infinite alternate-reverse;
}

@keyframes orb-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}


/* ---- CTA Section Gradient Orbs ---- */
.cta-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #0C1220 0%, #141B2D 40%, #0E1630 100%);
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -15%;
  width: 50%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(200, 169, 126, 0.08) 0%, transparent 60%);
  pointer-events: none;
}


/* ---- Button Physicality (Arc pattern) ---- */
.btn {
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

.btn--primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3), 0 2px 8px rgba(37, 99, 235, 0.15);
}

.btn--primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  transition-duration: 100ms;
}

.btn--secondary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(200, 169, 126, 0.25);
}

.btn--secondary:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 100ms;
}

.btn--ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.btn--ghost:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 100ms;
}

.btn--dark:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.btn--dark:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 100ms;
}


/* ---- Cards: Multi-Layer Shadows + Colored Accents ---- */
.card {
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 300ms ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.card--featured:hover {
  box-shadow:
    0 12px 40px rgba(37, 99, 235, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}


/* ---- Pricing Card Enhancements ---- */
.pricing-card {
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 300ms ease;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.04);
}

.pricing-card--featured {
  border-color: transparent;
  background: linear-gradient(var(--color-bg-secondary), var(--color-bg-secondary)) padding-box,
              linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-secondary)) border-box;
  border: 2px solid transparent;
}

.pricing-card--featured:hover {
  transform: scale(1.05) translateY(-8px);
  box-shadow:
    0 20px 60px rgba(37, 99, 235, 0.15),
    0 8px 24px rgba(0, 0, 0, 0.06);
}


/* ---- Staggered Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids and lists */
.bento-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.bento-grid .reveal:nth-child(2) { transition-delay: 80ms; }
.bento-grid .reveal:nth-child(3) { transition-delay: 160ms; }
.bento-grid .reveal:nth-child(4) { transition-delay: 240ms; }
.bento-grid .reveal:nth-child(5) { transition-delay: 320ms; }

.testimonial-carousel .testimonial-card:nth-child(1) { transition-delay: 0ms; }
.testimonial-carousel .testimonial-card:nth-child(2) { transition-delay: 100ms; }
.testimonial-carousel .testimonial-card:nth-child(3) { transition-delay: 200ms; }
.testimonial-carousel .testimonial-card:nth-child(4) { transition-delay: 300ms; }

.pricing-grid .pricing-card:nth-child(1) { transition-delay: 0ms; }
.pricing-grid .pricing-card:nth-child(2) { transition-delay: 100ms; }
.pricing-grid .pricing-card:nth-child(3) { transition-delay: 200ms; }


/* ---- Navigation Glassmorphism Enhancement ---- */
.nav {
  background: rgba(249, 248, 245, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.nav.is-scrolled {
  background: rgba(249, 248, 245, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
}


/* ---- Nav Link Hover Effect ---- */
.nav__link::after {
  background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
  height: 2px;
  border-radius: 1px;
}


/* ---- Section Decorative Dividers ---- */
.section--accent {
  position: relative;
}

.section--accent::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-primary) 20%, var(--color-border-primary) 80%, transparent);
}

.section--accent::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-primary) 20%, var(--color-border-primary) 80%, transparent);
}


/* ---- Dark Section Enhancements ---- */
.section--dark {
  position: relative;
  overflow: hidden;
}

.section--dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  pointer-events: none;
}


/* ---- Comparison Table Enhancement ---- */
.comparison-table {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
}

.comparison-table thead th.is-highlighted {
  background: linear-gradient(135deg, var(--color-accent-primary), #1E40AF);
}

.comparison-table tbody td.is-highlighted {
  background: rgba(37, 99, 235, 0.04);
  position: relative;
}


/* ---- Testimonial Cards Enhancement ---- */
.testimonial-card {
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 300ms ease;
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: var(--space-4);
  right: var(--space-6);
  font-family: var(--font-heading);
  font-size: 4rem;
  line-height: 1;
  color: var(--color-accent-primary-light);
  pointer-events: none;
}


/* ---- FAQ Enhancement ---- */
.faq-item__question {
  transition: color 200ms ease, transform 200ms ease;
}

.faq-item__question:hover {
  transform: translateX(var(--space-2));
}

.faq-item.is-open .faq-item__question {
  color: var(--color-accent-primary);
}


/* ---- Calculator Enhancement ---- */
.calculator {
  position: relative;
  background: linear-gradient(180deg, var(--color-bg-secondary) 0%, #F5F5F0 100%);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.calculator__savings {
  position: relative;
  overflow: hidden;
}

.calculator__savings::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(16, 185, 129, 0.02) 100%);
  pointer-events: none;
}

.calculator__slider::-webkit-slider-thumb {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3), 0 0 0 3px var(--color-bg-secondary);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.calculator__slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4), 0 0 0 3px var(--color-bg-secondary);
}


/* ---- Versus Section Enhancement ---- */
.versus__side {
  position: relative;
  overflow: hidden;
}

.versus__side--france::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.06), transparent 70%);
  pointer-events: none;
}

.versus__side--lettonie::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06), transparent 70%);
  pointer-events: none;
}


/* ---- Badge Enhancements ---- */
.badge {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge--blue {
  background: rgba(219, 234, 254, 0.8);
  border: 1px solid rgba(37, 99, 235, 0.1);
}


/* ---- Hero Title Gradient Accent ---- */
.hero__title span {
  background: linear-gradient(135deg, var(--color-accent-primary) 0%, #3B82F6 50%, var(--color-accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ---- Section Label Decoration ---- */
.section-header__label {
  position: relative;
  padding: var(--space-1) var(--space-4);
  background: var(--color-accent-primary-light);
  border-radius: var(--radius-full);
}

.section-header__label::before {
  content: '';
  position: absolute;
  left: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-primary);
}

.section-header__label {
  padding-left: calc(var(--space-4) + 10px);
}


/* ---- Metrics Enhancement ---- */
.metric__value {
  background: linear-gradient(135deg, var(--color-accent-primary), #3B82F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ---- Card Icon Subtle Animation ---- */
.card__icon {
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card__icon {
  transform: scale(1.1) rotate(-3deg);
}


/* ---- Step Number Enhancement ---- */
.step.is-active .step__number {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}


/* ---- Footer Enhancement ---- */
.footer {
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06) 30%, rgba(255, 255, 255, 0.06) 70%, transparent);
}

.footer__social-link {
  transition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer__social-link:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}


/* ---- Scroll Progress Indicator ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
  z-index: 10000;
  transform-origin: left;
  transform: scaleX(0);
  transition: none;
  pointer-events: none;
  will-change: transform;
  contain: layout style;
}


/* ---- Selection Color ---- */
::selection {
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-text-primary);
}


/* ---- Smooth Transitions on Focus ---- */
*:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  transition: outline-offset 150ms ease;
}


/* ---- Link Underline Animation ---- */
.footer__link {
  position: relative;
}

.footer__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-text-inverse-secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.footer__link:hover::after {
  transform: scaleX(1);
}


/* ---- Text Wrap Balance (modern browsers) ---- */
h1, h2, .cta-section__title {
  text-wrap: balance;
}


/* ---- Reduce Motion Accessibility ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero::before,
  .hero::after {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* ---- Mobile Adjustments ---- */
@media (max-width: 768px) {
  .hero::before {
    width: 300px;
    height: 300px;
    top: -60px;
    right: -60px;
  }

  .hero::after {
    width: 250px;
    height: 250px;
    bottom: -40px;
    left: -60px;
  }

  .testimonial-card::before {
    font-size: 3rem;
  }
}


/* ==========================================================================
   ADDITIONAL CSS POLISH — Phase 2
   Animated borders, glow effects, micro-interactions.
   ========================================================================== */


/* ---- Animated Gradient Border on Featured Cards ---- */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.card--featured {
  --angle: 0deg;
  border: 2px solid transparent;
  background: linear-gradient(var(--color-bg-secondary), var(--color-bg-secondary)) padding-box,
              conic-gradient(from var(--angle), var(--color-accent-primary), var(--color-accent-secondary), var(--color-accent-primary)) border-box;
  animation: rotate-border 4s linear infinite;
}

@keyframes rotate-border {
  to { --angle: 360deg; }
}


/* ---- Hover Glow Effect on Service Card Icons ---- */
.card__icon {
  position: relative;
}

.card:hover .card__icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-md);
  background: inherit;
  opacity: 0.3;
  filter: blur(8px);
  z-index: -1;
}


/* ---- Typing Cursor Effect for Hero Badge ---- */
.hero__badge::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 14px;
  background: currentColor;
  margin-left: var(--space-1);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}


/* ---- Section Accent Gradient Background ---- */
.section--accent {
  background: linear-gradient(180deg, var(--color-bg-accent) 0%, var(--color-bg-primary) 100%);
}


/* ---- Card Hover Border Glow ---- */
.card:hover {
  border-color: rgba(37, 99, 235, 0.2);
}


/* ---- Enhanced Testimonial Card Hover ---- */
.testimonial-card:hover::before {
  color: var(--color-accent-primary-light);
  transform: scale(1.1);
  transition: all 300ms ease;
}


/* ---- Smooth Number Counter Glow ---- */
.metric__value {
  text-shadow: 0 0 40px rgba(37, 99, 235, 0.15);
}


/* ==========================================================================
   DESIGN REVIEW FIXES — Typography, colors, consistency
   ========================================================================== */

/* ---- Subtitles: black not gray, max semi-bold ---- */
.section-header__subtitle {
  color: var(--color-text-primary);
  font-weight: var(--weight-medium);
}

.hero__subtitle {
  color: var(--color-text-primary) !important;
}

/* ---- Step text and versus items: black not gray ---- */
.versus__item span {
  color: var(--color-text-primary);
}

.step__text {
  color: var(--color-text-primary);
}

/* ---- Numbers/stats: always use heading font (Playfair Display) ---- */
.metric__value,
.calculator__result-amount,
.calculator__savings-amount,
.calculator__value,
.pricing-card__price,
.card__tag {
  font-family: var(--font-heading);
}

/* ---- Card titles & section titles: semi-bold max ---- */
.card__title,
.section-header__title {
  font-weight: var(--weight-semibold);
}


/* ==========================================================================
   PHOTO BREAKS — Full-width Latvia imagery
   ========================================================================== */

.photo-break {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.photo-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.photo-break--tall {
  height: 500px;
}

.photo-break__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.1) 0%,
    rgba(15, 23, 42, 0) 30%,
    rgba(15, 23, 42, 0) 70%,
    rgba(15, 23, 42, 0.15) 100%
  );
  pointer-events: none;
}

.photo-break__caption {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-6);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Parallax-lite on scroll */
@media (prefers-reduced-motion: no-preference) {
  .photo-break img {
    transition: transform 0.1s linear;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .photo-break {
    height: 260px;
  }
  .photo-break--tall {
    height: 320px;
  }
}


/* ==========================================================================
   MOBILE UX FIXES
   ========================================================================== */

@media (max-width: 768px) {
  /* Hero: reduce title size on small screens */
  .hero__title {
    font-size: var(--text-3xl) !important;
  }
  .hero__subtitle {
    font-size: var(--text-base) !important;
  }

  /* Hero CTAs: full width on mobile */
  .hero__ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .hero__ctas .btn {
    width: 100%;
    white-space: normal;
  }

  /* Trust bar: hide dividers on mobile */
  [aria-label="Classement OCDE"] [style*="width: 1px"] {
    display: none !important;
  }
  [aria-label="Classement OCDE"] .container {
    flex-direction: column !important;
    gap: var(--space-4) !important;
    text-align: center;
  }

  /* Metrics: tighter spacing */
  .metrics {
    margin-top: var(--space-8) !important;
  }

  /* Buttons: allow text wrap in calculator CTA */
  .calculator .btn {
    white-space: normal;
  }

  /* Slider thumb: larger for touch */
  .calculator__slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }
  .calculator__slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  /* FAQ: disable hover translateX on touch */
  .faq-item__question:hover {
    transform: none !important;
  }

  /* Comparison table: scroll hint */
  .table-wrapper {
    position: relative;
  }
  .table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--color-bg-primary));
    pointer-events: none;
    z-index: 2;
  }

  /* Testimonial carousel: show scroll indicator */
  .testimonial-carousel {
    padding-bottom: var(--space-6);
    position: relative;
  }
  .testimonial-carousel::after {
    content: 'Swipez →';
    display: block;
    text-align: center;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-3);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
  }
}

/* ==========================================================================
   TABLET UX FIXES (iPad portrait + landscape: 768-1024px)
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1024px) {
  /* Hero: intermediate title size for tablet */
  .hero__title {
    font-size: var(--text-4xl) !important;
  }

  /* Slider thumb: larger for touch on tablet */
  .calculator__slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }
  .calculator__slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  /* FAQ: disable hover translateX on touch tablets */
  .faq-item__question:hover {
    transform: none !important;
  }

  /* Testimonial: show scroll hint on tablet too */
  .testimonial-carousel {
    padding-bottom: var(--space-6);
  }
  .testimonial-carousel::after {
    content: 'Glissez pour voir plus →';
    display: block;
    text-align: center;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-3);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
  }
}

/* ==========================================================================
   TOUCH TARGET FIXES (all screen sizes)
   ========================================================================== */

/* "En savoir plus" links: larger touch target */
.card a[href*="services"],
.card a[href*="savoir"] {
  padding: var(--space-2) var(--space-1);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Nav links: taller touch target on touch-capable tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav__link {
    padding: var(--space-3) var(--space-2) !important;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Footer social icons: larger touch target */
.footer__social a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Testimonial: desktop scroll hint via subtle arrow buttons */
@media (min-width: 1025px) {
  .testimonial-carousel {
    position: relative;
  }
  .testimonial-carousel::after {
    content: 'Voir plus →';
    display: block;
    text-align: right;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-3);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    padding-right: var(--space-4);
  }
}


/* Extra small screens (iPhone SE, Galaxy S20) */
@media (max-width: 400px) {
  .hero__title {
    font-size: var(--text-2xl) !important;
  }

  .footer__grid {
    grid-template-columns: 1fr !important;
  }

  .testimonial-card {
    flex: 0 0 290px !important;
  }
}


/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-4) var(--space-6);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__text {
  max-width: 600px;
}

.cookie-banner__text a {
  color: var(--color-accent-primary);
  text-decoration: underline;
}

.cookie-banner__buttons {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.cookie-banner__btn:hover {
  opacity: 0.85;
}

.cookie-banner__btn--accept {
  background: var(--color-accent-primary);
  color: white;
}

.cookie-banner__btn--refuse {
  background: transparent;
  color: var(--color-text-inverse-secondary);
  border: 1px solid var(--color-border-secondary);
}

@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-4);
  }
  .cookie-banner__buttons {
    width: 100%;
    justify-content: center;
  }
}


/* ==========================================================================
   STICKY MOBILE CTA BAR
   ========================================================================== */

/* Sticky Mobile CTA Bar */
.mobile-cta-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-cta-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-primary);
    border-top: 1px solid var(--color-border-primary);
    padding: var(--space-3) var(--space-4);
    z-index: 9998;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  }

  .mobile-cta-bar.is-visible {
    transform: translateY(0);
  }

  .mobile-cta-bar__btn {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    font-family: var(--font-body);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    min-height: 44px;
  }

  .mobile-cta-bar__btn:hover {
    background: var(--color-accent-primary-dark, #1D4ED8);
  }

  /* Add bottom padding to body so content isn't hidden behind the bar */
  body.has-mobile-cta {
    padding-bottom: 72px;
  }

  /* Hide on contact page (already there) */
  body.page-contact .mobile-cta-bar {
    display: none;
  }
  body.page-contact.has-mobile-cta {
    padding-bottom: 0;
  }

  /* Adjust if cookie banner is also showing */
  .cookie-banner.is-visible ~ .mobile-cta-bar {
    bottom: 60px;
  }
}


/* ==========================================================================
   WHATSAPP FLOATING BUTTON
   ========================================================================== */

.whatsapp-btn {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 9997;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg {
  width: 28px;
  height: 28px;
  fill: white;
}

.whatsapp-btn__tooltip {
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.whatsapp-btn:hover .whatsapp-btn__tooltip {
  opacity: 1;
}

@media (max-width: 768px) {
  .whatsapp-btn {
    bottom: 84px; /* Above sticky mobile CTA bar */
    right: var(--space-4);
    width: 52px;
    height: 52px;
  }
  .whatsapp-btn svg {
    width: 26px;
    height: 26px;
  }
  .whatsapp-btn__tooltip {
    display: none;
  }
}
