/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  list-style: none;
}

:root {
  --primary-blue: #5679a3;
  --secondary-teal: #2ba59f;
  --accent-yellow: #d1ae47;
  --accent-purple: #a6487d;
  --text-dark: #282939;
  --text-gray: #666;
  --bg-light: #f7f8f9;
  --bg-lightblue: #c5d6dc;
  --white: #ffffff;
}

body {
  font-family:
    "Work Sans",
    "Roboto",
    -apple-system,
    sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo img {
  height: 50px;
}

.main-nav {
  position: relative;
  left: 80px;
}

.main-nav .ul-main-nav {
  display: flex;
  list-style: none;
  gap: 30px;
  align-items: center;
}

.main-nav a {
  color: var(--text-gray);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

.main-nav a:hover {
  color: var(--secondary-teal);
}

.dropdown {
  position: relative;
}

.arrow {
  font-size: 10px;
  margin-left: 5px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  text-transform: uppercase;
  text-align: left;
  top: 100%;
  left: 0;
  border-top: var(--secondary-teal) solid 4px;
  background: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  padding: 10px 0;
  margin-top: 10px;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: var(--text-dark);
}

.dropdown-menu a:hover {
  background: var(--bg-light);
  color: var(--secondary-teal);
}

.header-buttons {
  display: flex;
  gap: 15px;
}

.btn-outline {
  padding: 10px 25px;
  border: 2px solid var(--secondary-teal);
  background: transparent;
  color: var(--secondary-teal);
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.btn-outline:hover {
  background: var(--secondary-teal);
  color: var(--white);
}

.btn-primary {
  padding: 10px 25px;
  border: none;
  background: var(--secondary-teal);
  color: var(--white);
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  background: #248984;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 165, 159, 0.3);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Hero Slider */
.hero-slider {
  position: relative;
  background: linear-gradient(135deg, #c5d6dc 0%, #92a6b3 100%);
  overflow: hidden;
}

.slider-container {
  position: relative;
  min-height: 500px;
}

.slide {
  display: none;
  position: relative;
  min-height: 500px;
}

.slide.active {
  display: flex;
}

.slide-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.slide-content .container {
  margin-left: 100px;
}

.slide-text {
  max-width: 600px;
}

.slide-subtitle {
  color: var(--primary-blue);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.slide-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.2;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  width: 80%;
}

.plus-icon {
  position: absolute;
  left: 42%;
  color: #ffec42;
  font-size: 150px;
  font-weight: 300;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.9));
}

.slide-description {
  color: var(--text-dark);
  font-size: 16px;
  margin-bottom: 30px;
  max-width: 500px;
}

.btn-yellow {
  padding: 15px 35px;
  background: var(--accent-yellow);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-yellow:hover {
  background: #c19d3a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(209, 174, 71, 0.4);
}

.slide-image {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  overflow: hidden;
  z-index: -1;
}

.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  background: var(--accent-purple);
  width: 14px;
  height: 14px;
}

/* User Cards */
.user-cards {
  padding: 60px 0;
  background: var(--white);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 450px));
  gap: 100px;
  justify-content: center;
}

.user-card {
  background: var(--white);
  padding: 40px 40px;
  border-radius: 30px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border: 2px solid #e0e0e0;
  transition: all 0.3s;
}

.user-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.user-card h2 {
  color: var(--primary-blue);
  font-size: 32px;
  margin-bottom: 30px;
  font-weight: 700;
}

.btn-teal {
  padding: 15px 35px;
  background: var(--secondary-teal);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 20px;
}

.btn-teal:hover {
  background: #248984;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 165, 159, 0.3);
}

.card-link {
  color: var(--secondary-teal);
  text-decoration: underline;
  font-size: 14px;
  display: block;
  transition: color 0.3s;
  line-height: 15px;
}

.card-link:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

/* Health Entities */
.health-entities {
  padding: 60px 0;
  background: var(--white);
}

.section-title {
  font-size: 36px;
  color: var(--primary-blue);
  text-align: center;
  margin-bottom: 50px;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: var(--text-gray);
  font-size: 16px;
  margin-bottom: 40px;
}

.entities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 270px));
  gap: 40px;
  align-items: center;
  justify-items: center;
  justify-content: center;
}

.entities-grid img {
  max-width: 250px;
  height: auto;
  filter: grayscale(0%);
  transition: all 0.3s;
}

.entities-grid img:hover {
  transform: scale(1.05);
}

/* Solutions */
.solutions {
  padding: 80px 0;
  background: var(--bg-light);
}

.solution-item {
  display: flex;
  align-items: center;
  gap: 60px;
  background: var(--white);
  padding: 60px 120px;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  margin-top: 40px;
}

.solution-text h2 {
  color: var(--primary-blue);
  font-size: 28px;
  margin-bottom: 30px;
  font-weight: 700;
  text-align: left;
}

.solution-text p {
  text-align: left;
  width: 80%;
}

.check-list {
  list-style: none;
}

.check-list li {
  padding: 12px 0;
  padding-left: 35px;
  position: relative;
  color: var(--text-dark);
  font-size: 16px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--secondary-teal);
  font-weight: bold;
  font-size: 20px;
}

.solution-image {
  flex-shrink: 0;
}

.solution-image img {
  max-width: 570px;
  border-radius: 15px;
  height: auto;
}

/* Benefits */
.benefits {
  padding: 80px 150px;
  background: var(--white);
}

.benefits-content {
  display: flex;
  gap: 60px;
  margin-top: 40px;
  align-items: flex-start;
}

.benefits-tabs {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.tab-btn {
  padding: 18px 35px;
  background: var(--white);
  border: 2px solid var(--accent-purple);
  color: var(--accent-purple);
  font-weight: 600;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
  min-width: 200px;
}

.tab-btn:hover,
.tab-btn.active {
  background: var(--accent-purple);
  color: var(--white);
}

.benefits-panel {
  flex: 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content p {
  color: var(--primary-blue);
  font-size: 18px;
  line-height: 1.8;
}

.benefits-image {
  flex-shrink: 0;
}

.benefits-image img {
  max-width: 430px;
  height: auto;
  border-radius: 15px;
}

/* Testimonials */
.testimonials {
  padding: 80px 0;
  background: linear-gradient(135deg, #5679a3 0%, #3888a3 100%);
  color: var(--white);
}

.testimonials .section-title,
.testimonials .section-subtitle {
  color: var(--white);
}

.testimonials-slider {
  max-width: 900px;
  margin: 50px auto;
  position: relative;
}

.testimonial-slide {
  display: none;
  text-align: center;
}

.testimonial-slide.active {
  display: block;
}

.testimonial-text {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 40px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.testimonial-author img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--white);
}

.author-name {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 5px;
}

.author-title {
  font-size: 14px;
  opacity: 0.9;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

/* Digitalization */
.digitalization {
  padding: 80px 150px;
  background: var(--white);
}

.digitalization-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
}

.digitalization-text h2 {
  color: var(--primary-blue);
  font-size: 36px;
  margin-bottom: 30px;
  font-weight: 700;
}

.features-list {
  display: flex;
  gap: 40px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--text-dark);
}

.check-icon {
  color: var(--secondary-teal);
  font-weight: bold;
  font-size: 24px;
}

.digitalization-buttons {
  display: flex;
  flex-direction: column;
  width: 25.5rem;
  gap: 15px;
}

/* Help Section */
.help-section {
  padding: 80px 150px;
  background: var(--bg-light);
}

.help-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 50px;
}

.help-text {
  display: flex;
  gap: 30px;
}

.help-text h2 {
  color: var(--primary-blue);
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: 700;
  width: 50%;
}

.help-text p {
  color: var(--text-gray);
  font-size: 16px;
  width: 400px;
}

.help-button {
  width: 400px;
}

/* Group Companies */
.group-companies {
  padding: 80px 0;
  background: var(--white);
}

.group-companies .section-subtitle {
  color: var(--primary-blue);
}

.group-companies .section-title {
  margin-bottom: 10px;
}

.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
  gap: 40px;
  margin-top: 50px;
  justify-content: center;
}

.company-card {
  background: var(--bg-light);
  padding: 40px 30px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.3s;
  text-align: left;
}

.company-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.company-card img {
  max-width: 200px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 25px;
}

.company-card p {
  color: var(--text-gray);
  font-size: 16px;
  margin-bottom: 25px;
  line-height: 1.7;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #5679a3 0%, #2ba59f 100%);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr 1.5fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-brand img {
  height: 50px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.footer-column h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 12px;
}

.footer-column a {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.footer-column a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-purple);
  color: var(--white);
  border: none;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-blue);
  transform: translateY(-3px);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Add smooth transitions */
* {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

button,
a {
  transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .slide-title {
    font-size: 36px;
  }

  .solution-item {
    flex-direction: column;
    text-align: center;
  }

  .benefits-content {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px 0;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    padding: 0;
  }

  .main-nav a {
    display: block;
    padding: 15px 20px;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding-left: 20px;
  }

  .header-buttons {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .slide-title {
    font-size: 28px;
  }

  .slide-image {
    display: none;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .digitalization-content,
  .help-content {
    flex-direction: column;
    text-align: center;
  }

  .features-list {
    flex-direction: column;
    gap: 20px;
  }

  .companies-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Responsi de rapidez */

/* --- AJUSTES RESPONSIVE --- */

/* 1. Ajustes para Tablets y pantallas medianas (menos de 1024px) */
@media (max-width: 1024px) {
  .header-content {
    gap: 10px;
    padding: 0 15px;
  }

  .main-nav {
    left: 0; /* Eliminamos el desplazamiento lateral */
  }

  .main-nav .ul-main-nav {
    gap: 15px;
  }

  .solution-item {
    padding: 40px;
    flex-direction: column; /* Apilamos imagen y texto */
    text-align: center;
  }

  .solution-text p {
    width: 100%;
    text-align: center;
  }

  .solution-image img {
    max-width: 100%;
  }
}

/* 2. Ajustes para Móviles (menos de 768px) */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex; /* Mostramos el botón de hamburguesa */
  }

  .main-nav,
  .header-buttons {
    display: none; /* Ocultamos el menú normal (deberías usar JS para mostrarlo) */
  }

  .slide-content .container {
    margin-left: 0;
    padding: 0 20px;
  }

  .slide-title {
    font-size: 32px;
    width: 100%;
  }

  .plus-icon {
    display: none; /* Quitamos el icono gigante que rompe el layout */
  }

  .cards-grid {
    grid-template-columns: 1fr; /* Una sola columna */
    gap: 30px;
  }

  .user-card {
    min-width: unset;
    width: 100%;
  }

/* responsive rapidez */
  .scroll-top {
    left: 70%;
  }

  .solution-image img {
    display: none;
  }

  .help-text {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .benefits-image {
    display: none;
  }
}

/* 3. Ajustes Críticos para pantallas menores de 500px */
@media (max-width: 500px) {
  .header {
    padding: 10px 0;
  }

  .logo img {
    height: 40px;
  }

  .slide-title {
    font-size: 28px;
  }

  .slide-description {
    font-size: 14px;
  }

  .user-card {
    padding: 30px 20px;
  }

  .user-card h2 {
    font-size: 24px;
  }

  .section-title {
    font-size: 26px;
  }

  /* Evitar que las imágenes de entidades se salgan */
  .entities-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
  }

  .entities-grid img {
    max-width: 130px;
  }

  /* Ajuste de botones para que no se corten */
  .btn-yellow,
  .btn-teal {
    width: 95%;
    padding: 12px 20px;
  }

  /* responsive rapidez */
  .scroll-top {
    left: 70%;
  }

  .solution-image img {
    display: none;
  }

  .help-text {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .benefits-image {
    display: none;
  }

  .digitalization-buttons {
    width: 24rem;
  }
}