/* ============================================================
   MS HEAL Platform - Common Styles
   Patient-Facing Platform Design System
   Apple-inspired, Mobile-First, Clean & Spacious
   ============================================================ */

/* ============================================================
   1. FONT
   ============================================================ */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

/* ============================================================
   2. CSS VARIABLES
   ============================================================ */
:root {
  /* --- Primary --- */
  --color-primary: #FF6B54;
  --color-primary-light: #FF8A75;
  --color-primary-dark: #E8533D;
  --color-primary-50: #FFF5F3;
  --color-primary-100: #FFE8E3;

  /* --- Neutrals --- */
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-300: #D4D4D4;
  --gray-400: #A3A3A3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #171717;

  /* --- Functional --- */
  --color-success: #22C55E;
  --color-whatsapp: #25D366;
  --color-instagram: #E1306C;

  /* --- Typography --- */
  --font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;

  /* --- Spacing --- */
  --section-padding: 80px 20px;
  --container-max: 1200px;
  --nav-height: 72px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);

  /* --- Radius --- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================================
   3. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   4. UTILITY / LAYOUT
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.section {
  padding: var(--section-padding);
}

.section-label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: var(--font-size-lg);
  color: var(--gray-500);
  line-height: 1.7;
  max-width: 600px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .section-desc {
  margin: 0 auto;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: var(--font-size-base);
  border-radius: var(--radius-full);
  padding: 14px 32px;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-cta {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 84, 0.35);
}

.btn-cta:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 84, 0.45);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--gray-800);
  border: 1.5px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--gray-800);
  background: var(--gray-50);
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background: #1EBE5A;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
}

.btn-instagram {
  background: var(--color-instagram);
  color: #fff;
  box-shadow: 0 4px 16px rgba(225, 48, 108, 0.3);
}

.btn-instagram:hover {
  background: #C82A5E;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 24px;
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: 18px 40px;
  font-size: var(--font-size-lg);
}

/* ============================================================
   6. NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--transition-base);
}

.nav.scrolled {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.nav-logo {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--gray-900);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--color-whatsapp);
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.nav-wa:hover {
  background: #1EBE5A;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  color: #fff;
}

.nav-wa svg {
  width: 18px;
  height: 18px;
}

/* Nav menu (alias for nav-links) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-menu a {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition-fast);
}

.nav-menu a:hover {
  color: var(--gray-900);
}

/* Nav toggle (alias for nav-hamburger) */
.nav-toggle {
  display: none;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  color: var(--gray-800);
}

/* Mobile nav-menu open state */
.nav-menu.open {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.nav-menu.open a {
  font-size: var(--font-size-2xl);
  font-weight: 600;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--gray-800);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--gray-800);
}

.nav-mobile a:hover {
  color: var(--color-primary);
}

/* ============================================================
   7. FLOATING WHATSAPP BUTTON
   ============================================================ */
.floating-wa {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  text-decoration: none;
}

.floating-wa-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.floating-wa-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.floating-wa-label {
  background: #fff;
  color: var(--gray-800);
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: all var(--transition-base);
  position: absolute;
  right: 64px;
}

.floating-wa:hover .floating-wa-icon {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.floating-wa:hover .floating-wa-label {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   8. FOOTER
   ============================================================ */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 64px 20px 32px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .nav-logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: var(--font-size-sm);
  line-height: 1.8;
  color: var(--gray-400);
}

.footer-col h4 {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col a {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--gray-400);
  margin-bottom: 12px;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  margin: 0;
}

.footer-social a:hover {
  background: var(--color-primary);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
  color: var(--gray-400);
}

.footer-social a:hover svg {
  color: #fff;
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

/* ============================================================
   9. CARDS
   ============================================================ */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--gray-100);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--color-primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.card h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.card p {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  line-height: 1.7;
}

/* ============================================================
   10. ACCORDION (FAQ)
   ============================================================ */
.accordion-item {
  border-bottom: 1px solid var(--gray-200);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--gray-800);
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.accordion-trigger svg {
  width: 20px;
  height: 20px;
  color: var(--gray-400);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.accordion-item.open .accordion-trigger svg {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.accordion-content p {
  padding: 0 0 24px;
  font-size: var(--font-size-base);
  color: var(--gray-500);
  line-height: 1.8;
}

/* ============================================================
   11. SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================================
   12. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-padding: 64px 20px;
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 56px 16px;
    --nav-height: 64px;
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }

  .section-desc {
    font-size: var(--font-size-base);
  }

  .section-header {
    margin-bottom: 40px;
  }

  /* Nav mobile */
  .nav-links,
  .nav-menu,
  .nav-cta,
  .nav-wa {
    display: none;
  }

  .nav-hamburger,
  .nav-toggle {
    display: flex;
  }

  /* Footer mobile */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* Floating WA smaller */
  .floating-wa {
    bottom: 20px;
    right: 20px;
  }

  .floating-wa-icon {
    width: 52px;
    height: 52px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  :root {
    --section-padding: 48px 16px;
  }

  .section-title {
    font-size: var(--font-size-xl);
  }

  .btn {
    padding: 12px 24px;
    font-size: var(--font-size-sm);
  }

  .btn-lg {
    padding: 14px 28px;
    font-size: var(--font-size-base);
  }
}
