/* Variables y configuración base */
:root {
  --primary-color: #258cfb;
  --primary-dark: #1a6cbd;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --border-radius: 0.5rem;
  --transition-speed: 0.3s;
}

/* Estilos generales */
html {
  font-size: 14px;
}

body {
  margin-bottom: 60px;
  color: var(--text-color);
}

/* Estilos del Carousel */
#heroCarousel {
  margin-bottom: 3rem;
}

.carousel-item {
  position: relative;
  height: min(70vh, 400px); /* Limita altura máxima a 600px */
  min-height: 400px; /* Asegura altura mínima */
}

.carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  max-height: 400px; /* Consistente con altura máxima del carousel */
}

.carousel-caption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  text-align: left;
  padding: 4rem 0;
}

.carousel-indicators {
  margin-bottom: 2rem;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 6px;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}

/* Cards y elementos interactivos */
.hover-card {
  transition: all var(--transition-speed) ease;
  border-radius: var(--border-radius);
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Feature icons */
.feature-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: var(--light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  transition: all var(--transition-speed) ease;
}

.hover-card:hover .feature-icon {
  background: var(--primary-color);
}

.hover-card:hover .feature-icon img {
  filter: brightness(0) invert(1);
}

/* Process Section */
.process-section {
  position: relative;
}

.process-number {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto;
}

.process-step {
  position: relative;
  padding: 1rem;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(rgba(37, 140, 251, 0.85), rgba(0, 0, 0, 0.7)),
              url('../images/cta-background.jpg') no-repeat center center;
  background-size: cover;
  border-radius: var(--border-radius);
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
  margin: 3rem 0;
}

.cta-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
      rgba(37, 140, 251, 0.9) 0%, 
      rgba(0, 48, 135, 0.8) 100%);
  opacity: 0.3;
}

.cta-section h2 {
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-section .lead {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
  border-radius: var(--border-radius);
  padding: 0.5rem 1.5rem;
  transition: all var(--transition-speed) ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-light {
  background-color: white;
  color: var(--primary-color);
}

.btn-light:hover {
  background-color: #f8f9fa;
  color: var(--primary-dark);
}

/* Section Titles */
.section-title {
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

/* Cards */
.card {
  border: none;
  transition: all var(--transition-speed) ease;
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Timeline connector for process steps */
@media (min-width: 768px) {
  html {
      font-size: 16px;
  }

  .process-section .row::before {
      content: '';
      position: absolute;
      top: 50px;
      left: 50%;
      transform: translateX(-50%);
      width: 75%;
      height: 2px;
      background: var(--primary-color);
      z-index: -1;
  }
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .carousel-item {
      height: 80vh;
  }

  .carousel-caption {
      padding: 2rem 0;
  }

  .carousel-caption h1 {
      font-size: 2rem;
  }

  .carousel-caption p {
      font-size: 1rem;
  }

  .process-section .row::before {
      display: none;
  }

  .process-step {
      margin-bottom: 2rem;
  }

  .cta-section {
      padding: 4rem 1rem;
  }
}

/* Accessibility */
:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:focus, 
.btn:active:focus {
  box-shadow: 0 0 0 0.2rem rgba(37, 140, 251, 0.25);
}

/* Animations */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.icon {
  width: 100%;
  height: 100%;
  color: var(--primary-color);
}

.hover-card:hover .icon {
  color: white;
}