:root {
  /* Tuvital brand palette (definitive) — see _DEPLOY/docs/paleta_tuvital/README.md.
     Graphite + vital red-coral + warm sand; blue deliberately excluded from
     any brand surface. */
  --brand: #c1442d;
  --brand-hover: #a3341f;
  --accent: #e8815f;
  --dark: #24211d;
  --muted: #8a8378;
  --bg: #faf7f2;
  --surface: #efe7da;
  --success: #5c7a5e;
  --border: rgba(36, 33, 29, 0.15);
  --text: var(--dark);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-hover: #d95a3f;
    --bg: #18160f;
    --surface: #26221a;
    --muted: #a89d8c;
    --border: rgba(255, 255, 255, 0.1);
    --text: #f3ede1;
    --success: #7fa382;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.nav nav {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.logo-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .logo-light {
    display: none;
  }

  .logo-dark {
    display: inline;
  }
}

.nav nav a {
  position: relative;
  margin-inline-start: 1.25rem;
  padding-bottom: 0.2rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.nav nav a::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease-in-out;
}

[dir="rtl"] .nav nav a::after {
  transform-origin: left;
}

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

.nav nav a.nav-login {
  color: var(--brand);
}

.nav nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

[dir="rtl"] .nav nav a:hover::after {
  transform-origin: right;
}

/* Selector de idioma (botón + iniciales + menú desplegable) */
.language-picker {
  position: relative;
  margin-inline-start: 1.25rem;
}

.language-picker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  /*padding: 0.3rem 0.4rem;*/
  border: none;
  border-radius: 0.375rem;
  background: none;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.language-picker-toggle svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.language-picker-toggle:hover {
  color: var(--brand);
}

.language-picker-current {
  display: inline-block;
  width: 1.6em;
  text-align: center;
}

.language-picker-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.4rem);
  z-index: 100;
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  min-width: 11rem;
  max-height: 20rem;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(36, 33, 29, 0.15);
}

.language-picker-menu a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.375rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
}

.nav .language-picker-menu a::after {
  content: none;
}

.language-picker-menu a:hover {
  background: var(--surface);
}

.language-picker-menu a.is-current {
  color: var(--brand);
  font-weight: 700;
}

.language-picker-code {
  width: 1.8em;
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 34rem;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  /* Gradiente de marca casi opaco sobre la foto — la foto solo se asoma
     como textura tenue, sin leerse como stock photo. */
  background-image:
    linear-gradient(135deg, rgba(36, 33, 29, 0.92) 0%, rgba(193, 68, 45, 0.9) 65%, rgba(232, 129, 95, 0.88) 100%),
    url('/assets/img/hero-bg.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, fixed;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 2.5rem;
  padding-block: 3rem;
}

.hero-arrow {
  width: 0.7em;
  height: 0.7em;
  color: rgba(255, 255, 255, 0.5);
  vertical-align: middle;
  margin-inline-start: 0.1em;
}

[dir="rtl"] .hero-arrow {
  transform: scaleX(-1);
}

.hero-copy h1 {
  font-size: 2.75rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.15rem;
  max-width: 32rem;
  margin: 0 0 2rem;
}

.cta-group {
  display: flex;
  gap: 1rem;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  max-width: 100%;
  width: 15rem;
  filter: drop-shadow(0 0 38px #fff);
  animation: hero-float 3s ease-in-out infinite alternate;
}

@keyframes hero-float {
  from {
    transform: translateY(0.5rem);
  }

  to {
    transform: translateY(-0.5rem);
  }
}

.hero .btn-outline {
  border-color: #fff;
  color: #fff;
}

.hero .btn-outline:hover {
  background: #fff;
  color: var(--dark);
}

@media (max-width: 768px) {
  .nav {
    justify-content: center;
    text-align: center;
  }

  .nav nav {
    justify-content: center;
    width: 100%;
  }

  .nav nav a {
    margin-inline: 0.6rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    order: -1;
  }

  .lead {
    margin-inline: auto;
  }

  .cta-group {
    justify-content: center;
  }
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--brand-hover);
  border-color: transparent;
  color: #fff;
}

/* Bootstrap's .btn:focus-visible trae su propio anillo azul — se reemplaza
   por uno del color de marca, tanto en .btn-primary como en .btn-outline. */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(193, 68, 45, 0.35);
}

.btn-outline {
  border: 1px solid var(--brand);
  color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand);
  color: #fff;
}

.about {
  padding: 3rem 1.5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.about-image img {
  width: 75%;
  margin: 0 auto;
  border-radius: 0.75rem;
  display: block;
  box-shadow: 0 8px 30px rgba(36, 33, 29, 0.15);
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }
}

.about h2 {
  color: var(--brand);
}

.about-lead {
  font-style: italic;
  color: var(--muted);
  font-size: 1.1rem;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.about-list li {
  position: relative;
  padding-inline-start: 1.75rem;
  margin-bottom: 0.65rem;
}

.about-list li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  color: var(--success);
  font-weight: 700;
}

.about-extra {
  color: var(--muted);
}

.features {
  padding: 3rem 1.5rem;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  text-align: start;
}

.feature {
  display: block;
  padding: 2rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 15px rgba(36, 33, 29, 0.08);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.feature:hover {
  background: var(--brand);
  transform: translateY(-0.5rem);
  box-shadow: 10px 15px 30px rgba(36, 33, 29, 0.18);
}

.feature:hover h3,
.feature:hover p {
  color: #fff;
}

.feature h3 {
  color: var(--brand);
  margin: 0 0 0.5rem;
  transition: color 0.3s ease-in-out;
}

.feature p {
  color: var(--muted);
  margin: 0;
  transition: color 0.3s ease-in-out;
}

.cta-banner {
  background-color: var(--dark);
  background-image:
    linear-gradient(rgba(2, 2, 2, 0.5), rgba(0, 0, 0, 1)),
    url('/assets/img/bg-hospital.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, fixed;
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
}

.cta-banner h2 {
  margin-bottom: 0.5rem;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.news {
  padding: 3rem 1.5rem;
  text-align: center;
}

.news-subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.news-video {
  position: relative;
  max-width: 640px;
  margin: 0 auto 1.5rem;
  padding-top: 36%;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--dark);
  box-shadow: 0 8px 30px rgba(36, 33, 29, 0.15);
}

.news-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.news-more summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 600;
  list-style: none;
}

.news-more summary::-webkit-details-marker {
  display: none;
}

.news-more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 640px;
  margin: 1.5rem auto 0;
}

.news-more-grid img {
  width: 100%;
  border-radius: 0.5rem;
  display: block;
}

@media (max-width: 640px) {
  .news-more-grid {
    grid-template-columns: 1fr;
  }
}

.pricing {
  padding: 3rem 1.5rem;
  text-align: center;
}

.pricing-subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
  max-width: 42rem;
  margin: 0 auto;
  text-align: start;
}

.pricing-image {
  background: #fff;
  border-radius: 0.75rem;
  /*padding: 1.5rem;*/
  box-shadow: 0 8px 30px rgba(36, 33, 29, 0.15);
}

.pricing-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: 0.75rem;
  padding: 0 1rem 1rem 1rem;
}

.pricing-features {
  flex-grow: 1;
}

.pricing-card .btn {
  text-align: center;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-image {
    order: -1;
    max-width: 20rem;
    height: 20rem;
    margin: 0 auto;
  }
}

.pricing-price {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--brand);
}

.pricing-currency {
  font-size: 1.25rem;
  vertical-align: super;
  font-weight: 400;
}

.pricing-period {
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  text-align: start;
}

.pricing-features li {
  position: relative;
  padding-inline-start: 1.75rem;
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  inset-inline-start: 0;
  color: var(--success);
  font-weight: 700;
}

.contact {
  padding: 3rem 1.5rem;
  text-align: center;
}

.contact-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
}

.contact-icon {
  width: 2rem;
  height: 2rem;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.contact-box h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.contact-box a {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}

.contact-box a:hover {
  color: var(--brand);
}

.site-footer {
  background: var(--dark);
  padding: 2.5rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 0.85fr 1.3fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
}

.footer-info img {
  margin-bottom: 0.75rem;
}

.footer-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.footer-links h4,
.footer-newsletter h4 {
  color: #fff;
  margin: 0 0 0.75rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-newsletter p {
  margin: 0 0 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.375rem;
  font: inherit;
}

.newsletter-form button {
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 0.375rem;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.newsletter-form button:hover {
  background: var(--brand-hover);
}

.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.newsletter-status {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.newsletter-status-success {
  color: var(--success);
}

.newsletter-status-error {
  color: var(--accent);
}

.footer-disclaimer {
  font-style: italic;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }
}

.legal {
  max-width: 42rem;
  padding: 3rem 1.5rem 4rem;
}

.legal h1 {
  margin-bottom: 2rem;
}

.legal h3 {
  color: var(--brand);
  margin-top: 2rem;
}

.legal p {
  color: var(--text);
}

.legal-notice {
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-inline-start: 3px solid var(--brand);
  border-radius: 0.375rem;
  color: var(--muted) !important;
  font-style: italic;
  font-size: 0.9rem;
}

.back-to-top {
  position: fixed;
  inset-inline-end: 1.25rem;
  bottom: 1.25rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  z-index: 100;
  transition: background-color 0.15s ease-in-out;
}

.back-to-top:hover {
  background: var(--brand-hover);
}

.back-to-top svg {
  width: 1.25rem;
  height: 1.25rem;
}
