/* ============================================
   CA Medlynks Design System
   Shared foundation for parent site + all LPs
   ============================================ */

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Design Tokens --- */
:root {
  /* Brand Colors (from flyer: white, blue, green) */
  --brand-blue:        #2B7CB6;
  --brand-blue-dark:   #1E5F8E;
  --brand-blue-light:  #3A93D4;
  --brand-green:       #8DC63F;
  --brand-green-dark:  #74A832;
  --brand-green-light: #A3D65E;

  /* Semantic Colors */
  --color-primary:         var(--brand-blue);
  --color-primary-dark:    var(--brand-blue-dark);
  --color-primary-light:   var(--brand-blue-light);
  --color-primary-subtle:  #E8F2FA;

  --color-accent:          var(--brand-green);
  --color-accent-dark:     var(--brand-green-dark);

  --color-success:         #10b981;
  --color-success-light:   #d1fae5;
  --color-warning:         #f59e0b;
  --color-warning-light:   #fef3c7;
  --color-error:           #ef4444;
  --color-error-light:     #fee2e2;

  --color-whatsapp:        #25d366;
  --color-whatsapp-dark:   #1da851;

  /* Neutrals */
  --color-text:            #1a1a2e;
  --color-text-secondary:  #555770;
  --color-text-light:      #8a8ca5;
  --color-text-inverse:    #ffffff;

  --color-bg:              #ffffff;
  --color-bg-warm:         #fafbfe;
  --color-bg-cool:         #f0f4f8;
  --color-bg-dark:         #0F2A3E;
  --color-border:          #e2e8f0;

  /* Feature Icon Palette */
  --color-blue-bg:    #e0f2fe;
  --color-green-bg:   #d1fae5;
  --color-amber-bg:   #fef3c7;
  --color-purple-bg:  #ede9fe;
  --color-rose-bg:    #ffe4e6;
  --color-teal-bg:    #ccfbf1;

  /* LP Accent (overridden per LP) */
  --lp-accent:       var(--color-accent);
  --lp-accent-dark:  var(--color-accent-dark);
  --lp-accent-bg:    #F0F9E8;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Border Radius */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow:      0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md:   0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg:   0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
  --shadow-xl:   0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px rgba(43, 124, 182, 0.15);

  /* Layout */
  --container-sm:  640px;
  --container-md:  960px;
  --container-lg:  1140px;
  --container-xl:  1280px;

  /* Z-Index */
  --z-floating:  99;
  --z-sticky:    100;
  --z-overlay:   200;
  --z-modal:     300;
}

/* --- Base Styles --- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: var(--z-modal);
  padding: 12px 24px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* --- Screen Reader Only (Accessibility) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Focus Visible (Accessibility) --- */
:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}

button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(43, 124, 182, 0.15);
}

.container {
  width: 100%;
  max-width: var(--container-sm);
  margin: 0 auto;
  padding: 0 20px;
}

.container--wide {
  max-width: var(--container-lg);
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

/* --- Animations --- */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in:nth-child(1) { animation-delay: 0.1s; }
.animate-fade-in:nth-child(2) { animation-delay: 0.2s; }
.animate-fade-in:nth-child(3) { animation-delay: 0.3s; }
.animate-fade-in:nth-child(4) { animation-delay: 0.4s; }
.animate-fade-in:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulseDot {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  display: inline-block;
  animation: pulseDot 2s infinite;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(43, 124, 182, 0.3);
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 4px 12px rgba(43, 124, 182, 0.4);
  transform: translateY(-1px);
}

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

.btn--whatsapp:hover {
  background: var(--color-whatsapp-dark);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary-subtle);
}

.btn--outline-light {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.8);
}

.btn--lg {
  padding: 14px 16px;
  font-size: 14px;
  border-radius: var(--radius);
}

@media (min-width: 375px) {
  .btn--lg {
    padding: 16px 20px;
    font-size: 15px;
  }
}

.btn--md {
  padding: 14px 20px;
  font-size: 15px;
  min-height: 44px;
}

.btn--sm {
  padding: 12px 16px;
  font-size: 14px;
  min-height: 44px;
}

.btn--block {
  display: flex;
  width: 100%;
}

/* --- Section Titles --- */
.section-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  color: var(--color-text);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.section-title--left {
  text-align: left;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* --- Feature Cards --- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.feature {
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.25s ease;
}

.feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.feature__icon-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature__icon-wrap--blue   { background: var(--color-blue-bg);   color: #0369a1; }
.feature__icon-wrap--green  { background: var(--color-green-bg);  color: #059669; }
.feature__icon-wrap--amber  { background: var(--color-amber-bg);  color: #d97706; }
.feature__icon-wrap--purple { background: var(--color-purple-bg); color: #7c3aed; }
.feature__icon-wrap--rose   { background: var(--color-rose-bg);   color: #e11d48; }
.feature__icon-wrap--teal   { background: var(--color-teal-bg);   color: #0d9488; }

.feature__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-text);
}

.feature__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* --- Testimonial Cards --- */
.testimonials {
  padding: 52px 0;
  background: var(--color-bg);
}

.testimonials__grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.testimonial {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 48px;
  font-weight: 800;
  color: var(--color-primary-subtle);
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial__stars {
  color: var(--color-warning);
  font-size: 16px;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.testimonial__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.testimonial__text strong {
  color: var(--color-primary);
}

.testimonial__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.testimonial__author {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.testimonial__date {
  font-size: 12px;
  color: var(--color-text-light);
}

/* --- FAQ Accordion --- */
.faq {
  padding: 52px 0;
  background: var(--color-bg);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
  transition: all 0.25s ease;
}

.faq__item[open] {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.faq__question {
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-text);
  transition: color 0.2s;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--color-text-light);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.faq__item[open] .faq__question::after {
  content: '\2212';
  color: var(--color-primary);
}

.faq__item[open] .faq__question {
  color: var(--color-primary);
}

.faq__answer {
  padding: 0 20px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* --- Location Cards --- */
.locations {
  padding: 52px 0;
  background: var(--color-bg-cool);
}

.locations__grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.location {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  position: relative;
}

.location__badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--color-accent);
  color: #fff;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.location__name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--color-text);
}

.location__address,
.location__hours {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.location__address svg,
.location__hours svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-primary);
}

/* --- Form Inputs --- */
.form-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-family: var(--font-family);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: all 0.25s ease;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(43, 124, 182, 0.15);
}

/* Light theme form inputs (for parent site) */
.form-input--light {
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
}

.form-input--light::placeholder {
  color: var(--color-text-light);
}

.form-input--light:focus {
  border-color: var(--color-primary);
  background: var(--color-bg);
  box-shadow: 0 0 0 3px rgba(43, 124, 182, 0.1);
}

/* --- Footer (minimal LP version) --- */
.footer {
  padding: 24px 0;
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.footer__info p {
  font-size: 13px;
  margin-bottom: 4px;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

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

/* --- Trust Item (shared) --- */
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  opacity: 0.9;
  font-weight: 500;
}

/* =============================================
   TABLET & DESKTOP SHARED BREAKPOINTS
   ============================================= */
@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
    padding: 0 32px;
  }

  .section-title {
    font-size: 32px;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .testimonials__grid {
    flex-direction: row;
  }

  .testimonial {
    flex: 1;
  }

  .locations__grid {
    flex-direction: row;
  }

  .location {
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 36px;
  }

  .features {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
