/* ============================================
   ACME Domácí péče — Custom Styles
   ============================================ */

/* --- Theme as CSS Custom Properties --- */
:root {
  --color-primary-50: #eef2ff;
  --color-primary-100: #dbe4ff;
  --color-primary-200: #bac8ff;
  --color-primary-300: #91a7ff;
  --color-primary-400: #5c7cfa;
  --color-primary-500: #3b5bdb;
  --color-primary-600: #2f4cc0;
  --color-primary-700: #2b3f8e;
  --color-primary-800: #1e2d5f;
  --color-primary-900: #141d3d;

  --color-accent-50: #fff5f5;
  --color-accent-100: #ffe3e3;
  --color-accent-200: #ffc9c9;
  --color-accent-300: #ffa8a8;
  --color-accent-400: #e03131;
  --color-accent-500: #c92a2a;
  --color-accent-600: #a51e1e;

  --color-sand-50: #faf9f7;
  --color-sand-100: #f5f3f0;
  --color-sand-200: #e9e5df;
  --color-sand-300: #ddd7cf;
  --color-sand-400: #a8a29e;
  --color-sand-500: #78716c;
  --color-sand-600: #57534e;
  --color-sand-700: #44403c;
  --color-sand-800: #36312d;
  --color-sand-900: #1c1917;

  --color-hospice: #e8890c;
  --color-hospice-light: #fef3e2;
  --color-physio: #0ea5a0;
  --color-physio-light: #e0f7f6;

  --font-display: 'Source Sans 3', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
}

/* --- Base Styles --- */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-sand-900);
  background: white;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  font-size: 16px;
  overflow-x: clip;
}

/* Minimum font size 16px — senior-friendly */
.text-xs, .text-sm {
  font-size: 1rem !important;
}

/* --- Header States --- */
.header-transparent {
  background: transparent;
  padding-top: 24px;
}
@media (min-width: 768px) {
  .header-transparent { margin-top: 8px; }
}
.header-scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding-top: 4px;
  padding-bottom: 4px;
  margin-top: 0;
}

.header-transparent .nav-link { color: rgba(255, 255, 255, 0.8); }
.header-scrolled .nav-link { color: var(--color-sand-700); }
.nav-link:hover { color: var(--color-accent-400) !important; }

.header-transparent .logo-text { color: white; }
.header-scrolled .logo-text { color: var(--color-primary-800); }

.header-transparent #hamburger { color: white; }
.header-scrolled #hamburger { color: var(--color-primary-800); }
.menu-open #hamburger { color: var(--color-primary-800) !important; }

/* Logo sizing */
.header-logo {
  width: auto;
  transition: height 0.3s;
  height: 52px;
}
.header-transparent .header-logo {
  height: 52px;
}
@media (min-width: 768px) {
  .header-transparent .header-logo {
    height: 120px;
  }
}
.header-scrolled .header-logo {
  height: 52px;
}

/* --- Sticky sidebar fix --- */
.sidebar-sticky {
  position: sticky;
  top: 6rem;
  align-self: start;
}
@media (max-width: 1023px) {
  .sidebar-sticky {
    position: static;
  }
}

/* --- Dropdown Nav --- */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-dropdown-trigger svg.chevron {
  transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-dropdown-trigger svg.chevron {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 260px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px -8px rgba(0,0,0,0.15);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-sand-700);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu a:hover {
  background: var(--color-sand-50);
  color: var(--color-accent-400);
}

/* Mobile dropdown */
.mobile-dropdown-content {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 1rem;
}
.mobile-dropdown-content.open {
  display: flex;
}

/* --- Service Card --- */
.service-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.service-card:hover {
  transform: translateY(-8px);
}
.service-card[data-service="hospice"]:hover {
  box-shadow: 0 25px 60px -12px rgba(232, 137, 12, 0.25);
}
.service-card[data-service="health"]:hover {
  box-shadow: 0 25px 60px -12px rgba(224, 49, 49, 0.25);
}
.service-card[data-service="physio"]:hover {
  box-shadow: 0 25px 60px -12px rgba(14, 165, 160, 0.25);
}
.service-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-card .card-description {
  flex: 1;
}
.service-card .card-cta {
  margin-top: 24px;
  transition: gap 0.3s ease;
  align-self: flex-start;
}
.service-card:hover .card-cta {
  gap: 1rem;
}

/* Clickable card link reset */
a.service-card {
  text-decoration: none;
  color: inherit;
}

/* --- Benefits Section Background --- */
.benefits-section {
  position: relative;
  overflow: hidden;
}
.benefits-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(224, 49, 49, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: blob-drift 20s ease-in-out infinite;
}
.benefits-section::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 91, 219, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: blob-drift 25s ease-in-out infinite reverse;
}
.benefits-noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  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.9' 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: 256px 256px;
}

.benefit-card {
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}
/* Noise texture */
.benefit-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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-size: 200px 200px;
}
/* Static corner glow */
.benefit-card::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 49, 49, 0.09) 0%, transparent 70%);
  pointer-events: none;
}
.benefit-card:hover {
  background-color: rgba(43, 63, 142, 0.55);
}

/* --- Blog card equal height --- */
a.blog-card {
  text-decoration: none;
  color: inherit;
}
.blog-card {
  display: flex;
  flex-direction: column;
}
.blog-card .p-6 {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card .blog-excerpt {
  flex: 1;
  font-size: 15px;
}
.blog-card .blog-cta {
  margin-top: auto;
  padding-top: 1rem;
}

/* --- Hamburger visibility --- */
#hamburger { display: flex; }
@media (min-width: 768px) {
  #hamburger { display: none !important; }
}

/* --- Lottie player --- */
lottie-player {
  background: transparent;
  --lottie-player-toolbar-height: 0;
  --lottie-player-toolbar-icon-color: transparent;
}
lottie-player::part(animation) {
  background: transparent;
}

/* --- Accordion --- */
.accordion-content {
  overflow: hidden;
  height: 0;
  opacity: 0;
}
.accordion-icon {
  transition: transform 0.2s ease;
}

/* --- Marquee --- */
.marquee-track:hover {
  animation-play-state: paused;
}

/* --- Insurance Logo --- */
.insurance-logo {
  filter: none;
  opacity: 1;
}

/* --- Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  border: none;
}
.btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-primary-400), 0 0 0 4px white;
}
.btn-sm { padding: 0.625rem 1.25rem; font-size: 1rem; }
.btn-md { padding: 0.875rem 1.75rem; font-size: 1.125rem; }
.btn-lg { padding: 1.25rem 2.5rem; font-size: 1.25rem; }
.btn-primary {
  background-color: var(--color-primary-500);
  color: white;
  box-shadow: 0 4px 14px -4px rgba(59, 91, 219, 0.2);
}
.btn-primary:hover { background-color: var(--color-primary-600); }
.btn-secondary {
  background-color: var(--color-accent-400);
  color: white;
  box-shadow: 0 4px 14px -4px oklch(0.63 0.20 25 / 0.2);
}
.btn-secondary:hover {
  background-color: var(--color-accent-500);
  transform: scale(1.05);
  box-shadow: 0 10px 28px -4px rgba(224, 49, 49, 0.4);
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* --- Heading Weights --- */
h1 { font-weight: 600; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }

/* --- Heading Divider --- */
.heading-divider {
  width: 3rem;
  height: 0.25rem;
  border-radius: 9999px;
  background-color: var(--color-accent-400);
}

/* --- GSAP initial states (before animation) --- */
[data-reveal],
.hero-badge, .hero-headline, .hero-subtitle, .hero-ctas, .hero-trust {
  opacity: 0;
}

/* --- Keyframe Animations --- */
@keyframes flame-flicker {
  0%, 100% { transform: scaleY(1) scaleX(1); opacity: 1; }
  25% { transform: scaleY(1.04) scaleX(0.97); opacity: 0.9; }
  50% { transform: scaleY(0.96) scaleX(1.02); opacity: 0.95; }
  75% { transform: scaleY(1.02) scaleX(0.98); opacity: 0.88; }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

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

@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(224, 49, 49, 0.3)); }
  50% { filter: drop-shadow(0 0 12px rgba(224, 49, 49, 0.6)); }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], .hero-badge, .hero-headline, .hero-subtitle, .hero-ctas, .hero-trust {
    opacity: 1 !important;
  }
}
