@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@600;700;800&display=swap');

:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Background colors - cleaner, less saturated */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --surface: #ffffff;

  /* Primary accent - from frontend_clinicas theme */
  --primary: #456CB0;
  --primary-dark: #3D5FA0;
  --primary-light: #5a7fc4;

  /* Generated palette from #456CB0 base */
  --accent-50: #eef3f9;
  --accent-100: #d4e0f0;
  --accent-200: #a9c1e1;
  --accent-300: #7ea2d2;
  --accent-400: #5383c3;
  --accent-500: #3D5FA0;
  --accent-600: #456CB0;
  --accent-700: #324d7e;
  --accent-800: #243a5f;

  /* Legacy gradient variables - updated to use new palette */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --gradient-hero: linear-gradient(135deg, var(--primary) 0%, var(--accent-500) 50%, var(--primary-light) 100%);

  /* Dark navy text */
  --text: #0f172a;
  --text-muted: #475569;

  /* Borders - cleaner, no blue tint */
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.04);

  /* Neutral shadows - no blue tint */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(69, 108, 176, 0.25);

  /* Spacing rhythm - 8px grid */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;

  /* Border radius - consistent */
  --radius: 1rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.5rem;
}

/* Keyframe Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, var(--accent-50) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
}

body.menu-open {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3vw;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  align-items: flex-start;
}

.brand-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(5, 137, 245, 0.2));
}

.brand p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.05em;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  border-radius: 2px;
}

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

nav a:hover::after {
  transform: scaleX(1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn.ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn.ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--accent-50);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  padding: 6rem 3vw 4rem;
  align-items: center;
}

.hero h1 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 1rem 0;
  color: var(--text);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  animation: float 8s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  animation-play-state: paused;
}

.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;
}

.carousel {
  position: relative;
  margin-top: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  height: 400px;
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

/* Carousel navigation arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.carousel-nav:hover {
  background: var(--surface);
  transform: translateY(-50%) scale(1.05);
}

.carousel-prev {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  z-index: 10;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dots button:hover {
  background: var(--accent-400);
}

.carousel-dots button.active {
  background: var(--primary);
  transform: scale(1.2);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

.lead {
  color: var(--text-muted);
  max-width: 48ch;
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 1rem 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--accent-50);
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.grid-section {
  padding: 4rem 3vw;
}

.section-heading {
  max-width: 48ch;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.section-heading h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-top: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.grid article {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.grid article h3 {
  margin-top: 0;
  font-family: "Poppins", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.grid article p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.info-section {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  padding: 4rem 3vw;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--accent-50);
}

.info-section h2 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
}

.info-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-section li {
  margin-bottom: 1rem;
  max-width: 44ch;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  position: relative;
  padding-left: 1.75rem;
}

.info-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

.process {
  padding: 4rem 3vw;
}

.process h2 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

.process .steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.process .steps > div {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.process .steps > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.process h4 {
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0.25rem 0;
}

.process p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.process span {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
}

.faq {
  padding: 4rem 3vw;
  background: var(--accent-50);
  border-top: 1px solid var(--border-light);
}

.faq h2 {
  margin-bottom: 2rem;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  text-align: center;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: var(--accent-50);
}

.faq-item summary span {
  flex: 1;
  padding-right: 1rem;
}

.faq-item .chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] .chevron {
  transform: rotate(180deg);
}

.faq-item .faq-content {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item .faq-content p {
  margin: 0;
}

/* Legacy grid fallback */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.faq-grid article {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.faq-grid h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.faq-grid p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* Features Showcase Section */
.features-showcase {
  padding: 4rem 3vw;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header.center {
  text-align: center;
}

.section-header h2 {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
  margin: 0.5rem 0 0;
}

.feature-tabs {
  max-width: 1100px;
  margin: 0 auto;
}

.tab-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.tab-btn {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.tab-panels {
  position: relative;
}

.tab-panel {
  display: none;
  animation: fadeInUp 0.3s ease;
}

.tab-panel.active {
  display: block;
}

.feature-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.feature-text h3 {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.25rem;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

.feature-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .feature-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-text {
    order: 2;
  }

  .feature-image {
    order: 1;
  }

  .tab-nav {
    gap: 0.375rem;
  }

  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

.footer {
  padding: 3rem 3vw 1.5rem;
  background: var(--accent-800);
  color: #f8fafc;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  max-width: 28ch;
  color: rgba(248, 250, 252, 0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.footer-nav h4,
.footer-contact h4 {
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.7rem;
  color: rgba(248, 250, 252, 0.6);
}

.footer-nav,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a,
.footer-link {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-link:hover {
  color: var(--accent-200);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer .btn.primary {
  background: var(--primary-light);
}

.footer .btn.primary:hover {
  background: var(--primary);
}

.footer .btn.ghost {
  border-color: rgba(248, 250, 252, 0.3);
  color: #f8fafc;
  background: transparent;
}

.footer .btn.ghost:hover {
  border-color: rgba(248, 250, 252, 0.6);
  background: rgba(248, 250, 252, 0.1);
}

.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(248, 250, 252, 0.6);
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .site-header .btn.primary {
    display: none;
  }

  nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    padding: 5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 100;
  }

  nav.open {
    transform: translateX(0);
  }

  nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.1rem;
  }

  nav a::after {
    display: none;
  }

  .nav-overlay {
    display: block;
  }

  .nav-overlay.active {
    display: block;
  }

  .hero {
    padding: 3rem 1rem 2rem;
    gap: 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-card {
    padding: 1rem;
  }

  .carousel {
    height: 280px;
  }

  .grid-section,
  .info-section,
  .process,
  .faq {
    padding: 3rem 1rem;
  }
}

@media (max-width: 480px) {
  .carousel {
    height: 220px;
  }

  .carousel-nav {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .carousel-prev {
    left: 0.5rem;
  }

  .carousel-next {
    right: 0.5rem;
  }
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1000;
  text-decoration: none;
  color: white;
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

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

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 52px;
    height: 52px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }
}


/* Scroll Animation Utilities */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 {
  transition-delay: 0.1s;
}

.stagger-2 {
  transition-delay: 0.2s;
}

.stagger-3 {
  transition-delay: 0.3s;
}

.stagger-4 {
  transition-delay: 0.4s;
}