/* ===== KLN Healthcare - Modern Design System v2 ===== */

:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #ede9fe;
  --accent: #f59e0b;
  --accent-light: #fffbeb;
  --dark: #1e1b4b;
  --gray: #6b7280;
  --light: #faf5ff;
  --surface: #ffffff;
  --border: #e9d5ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--dark);
  background: var(--light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Typography ===== */
.gradient-text {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-bg {
  background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
}

.gradient-bg-emerald {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}

/* ===== Glass ===== */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Header ===== */
#header {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05), 0 4px 20px rgba(0,0,0,0.03);
}

.nav-link {
  position: relative;
  padding: 0.375rem 0;
  font-size: 0.938rem;
  font-weight: 500;
  color: var(--gray);
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--dark); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-weight: 600; font-size: 0.938rem;
  border-radius: 12px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn:hover::before { transform: translateX(100%); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-weight: 600; font-size: 0.938rem;
  border-radius: 12px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-accent {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-weight: 600; font-size: 0.938rem;
  border-radius: 12px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white; box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}
.btn-accent::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-accent:hover::before { transform: translateX(100%); }
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-outline-light {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-weight: 600; font-size: 0.938rem;
  border-radius: 12px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  background: transparent; color: white;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-outline-light::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-outline-light:hover::before { transform: translateX(100%); }
.btn-outline-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-weight: 600; font-size: 0.938rem;
  border-radius: 12px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-outline:hover::before { transform: translateX(100%); }
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-weight: 600; font-size: 0.938rem;
  border-radius: 12px;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  background: #25d366; color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.btn-whatsapp:hover::before { transform: translateX(100%); }
.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
}

/* ===== Sections ===== */
.section { padding: 7rem 1.5rem; }
.section-padding { padding: 7rem 1.5rem; }
@media (max-width: 768px) { .section, .section-padding { padding: 5rem 1rem; } }

/* ===== Product Cards ===== */
.product-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -8px rgba(0,0,0,0.1), 0 0 0 1px var(--primary-light);
}
.product-card .card-img-wrap {
  overflow: hidden;
  position: relative;
}
.product-card .card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.03) 100%);
}
.product-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover img { transform: scale(1.06); }

.rent-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  font-size: 0.75rem; font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(139,92,246,0.3);
}

/* ===== Service Cards ===== */
.service-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #6366f1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  box-shadow: 0 16px 40px -10px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}

.service-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

/* ===== Testimonials ===== */
.testimonial-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.testimonial-card:hover {
  box-shadow: 0 12px 30px -6px rgba(0,0,0,0.07);
  transform: translateY(-3px);
}

/* ===== Footer ===== */
.footer-link {
  color: #94a3b8;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}
.footer-link:hover {
  color: white;
  transform: translateX(4px);
}

/* ===== WhatsApp Float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 60px; height: 60px;
  background: #25d366;
  color: white;
  border-radius: 30px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: all 0.3s ease;
  text-decoration: none;
  animation: whatsapp-pulse 2.5s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  border-radius: 16px;
  animation: none;
}
.whatsapp-float svg { width: 30px; height: 30px; }

@keyframes whatsapp-pulse {
  0%, 100% { box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 8px 40px rgba(37, 211, 102, 0.65); }
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  position: fixed; top: 0; right: -100%;
  width: 85%; max-width: 400px; height: 100vh;
  background: var(--surface);
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 2rem;
  box-shadow: -20px 0 50px rgba(0,0,0,0.15);
}
.mobile-menu.open { right: 0; }

.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }

/* ===== Category Pills ===== */
.category-pill {
  padding: 0.6rem 1.5rem;
  border-radius: 12px;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--gray);
}
.category-pill.active {
  background: var(--dark);
  color: white;
  border-color: var(--dark);
}
.category-pill:hover:not(.active) {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== Policy Tabs ===== */
.tab-btn {
  padding: 0.75rem 1.75rem;
  font-weight: 600; font-size: 0.9rem;
  border: none; background: none; cursor: pointer;
  color: var(--gray);
  border-bottom: 2px solid transparent;
  transition: all 0.25s ease;
}
.tab-btn.active { color: var(--dark); border-bottom-color: var(--primary); }
.tab-btn:hover { color: var(--dark); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== Timeline ===== */
.timeline-line {
  position: absolute; left: 27px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--primary-light));
}
.timeline-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  position: relative; z-index: 1;
}

/* ===== Inputs ===== */
.input-modern {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 0.938rem;
  transition: all 0.2s ease;
}
.input-modern:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.08);
}

/* ===== Animations ===== */
.animate-float {
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== Hero Specific ===== */
.hero-pattern {
  background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ===== Stat Counter ===== */
.stat-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-3px); }
