:root {
  --primary: #008cd5;
  --secondary: #ffc03c;
  --accent1: #ff9f37;
  --accent2: #ff854f;
  --dark-text: #3d3a3a;
  --light-text: #6b645f;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--dark-text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

.rounded-corners {
  border-radius: 12px !important;
}

/* Navbar */
.navbar {
  transition: all 0.3s ease;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-link {
  color: var(--dark-text);
  font-weight: 500;
  margin: 0 10px;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link.active:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary);
  border-radius: 3px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #005a8c 100%);
  color: white;
  padding: 120px 0 50px 0;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-weight: 700;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

.hero .btn {
  border-radius: 50px;
  padding: 12px 30px;
  font-weight: 500;
}

.hero .btn-primary {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: var(--dark-text);
}

.hero .btn-outline-light {
  margin-left: 15px;
}

/* Shapes */
.shape {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -100px;
}

.shape-2 {
  width: 200px;
  height: 200px;
  bottom: -50px;
  left: -50px;
}

/* Services */
.services {
  padding: 80px 0;
}

.section-title h2 {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 15px;
}

.section-title p {
  color: var(--light-text);
  max-width: 700px;
  margin: 0 auto;
}

.service-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  margin-bottom: 30px;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-card .card-img-top {
  height: 180px;
  object-fit: cover;
}

.service-card .card-body {
  padding: 30px;
}

.service-card .card-title {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 15px;
}

.service-card .card-text {
  color: #5a5a5a;
  margin-bottom: 20px;
}

.service-card .btn {
  border-radius: 50px;
  padding: 8px 20px;
  font-weight: 500;
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: var(--dark-text);
}

/* Estilos para modales de servicios */
.modal-xl {
  max-width: 1200px;
}

.modal-content {
  border: none;
  border-radius: 15px !important;
  overflow: hidden;
}

.modal-header {
  border-bottom: none;
  padding: 25px;
  background: linear-gradient(135deg, var(--primary) 0%, #005a8c 100%);
  color: white;
  position: relative;
}

.modal-icon {
  width: 60px;
  height: 60px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  color: var(--primary);
  font-size: 1.8rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.modal-title {
  font-weight: 700;
  margin-bottom: 5px;
  color: white;
}

.modal-subtitle {
  opacity: 0.9;
  font-size: 1rem;
  margin-bottom: 0;
}

.modal-body {
  padding: 30px;
}

.service-description {
  padding: 20px;
  margin-bottom: 30px;
  background-color: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid var(--primary);
}

.section-title {
  text-align: center;
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.section-title i {
  margin-right: 10px;
  font-size: 1.2em;
}

/* Actividades */
.activities-list {
  padding-right: 30px;
}

.activity-item {
  display: flex;
  margin-bottom: 25px;
  padding: 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #eee;
}

.activity-item:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
  border-color: var(--primary);
}

.activity-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-right: 15px;
  flex-shrink: 0;
}

.activity-content h4 {
  color: var(--dark-text);
  margin-bottom: 5px;
  font-weight: 600;
}

.activity-content p {
  color: var(--light-text);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Imagen de actividad */
.activity-image-container {
  position: relative;
  height: 100%;
}

.activity-image-wrapper {
  position: sticky;
  top: 20px;
}

.activity-image {
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.5s ease;
  border: 3px solid white;
}

.image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 10px 15px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  display: flex;
  align-items: center;
}

.image-caption i {
  margin-right: 10px;
  color: var(--secondary);
}

/* Caso de éxito */

/* Modal footer */
.modal-footer {
  border-top: none;
  background-color: #f8f9fa;
  padding: 20px 30px;
}



/* Methodology Section */
.methodology {
  padding: 80px 0;
  background-color: #f9f9f9;
}

.pdca-cycle {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 0 auto;
}

/* Posicionamiento de los pasos */
.pdca-step:nth-child(1) { /* Planificar */
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary);
}

.pdca-step:nth-child(2) { /* Hacer */
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  background-color: var(--accent1);
}

.pdca-step:nth-child(3) { /* Verificar */
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent2);
}

.pdca-step:nth-child(4) { /* Actuar */
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  background-color: var(--secondary);
}

/* Estilos para las líneas SVG */
.pdca-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.pdca-line {
  fill: none;
  stroke: var(--light-text);
  stroke-width: 4;
  stroke-dasharray: 10, 10;
  stroke-linecap: round;
  will-change: stroke-dasharray, stroke;
  backface-visibility: hidden;
}

.line-1 {
  animation: dash 2s linear infinite;
}

.line-2 {
  animation: dash 2s linear infinite 0.5s;
}

.line-3 {
  animation: dash 2s linear infinite 1s;
}

.line-4 {
  animation: dash 2s linear infinite 1.5s;
}

/* Efecto hover para los pasos */
.pdca-step:hover {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 3;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Efecto scroll */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary); /* Usa tu color primario (#008cd5) */
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #0069a3; /* Color más oscuro al pasar el mouse */
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 767.98px) {
  .step-tooltip {
      display: none; /* Ocultar tooltips en móviles */
  }
  
  .details-content {
      max-width: 90%;
      padding: 20px;
  }

  .hero {
      padding: 60px 0;
      text-align: center;
  }
  
  .hero h1 {
      font-size: 2rem;
  }
  
  .hero p {
      font-size: 1rem;
  }
  
  .hero .btn {
      display: block;
      width: 100%;
      max-width: 250px;
      margin: 0 auto 15px;
  }
  
  .hero .btn-outline-light {
      margin-left: auto;
  }
  
  .pdca-cycle {
      max-width: 300px;
      height: 300px;
      margin-bottom: 50px;
  }
 
  .pdca-step {
      width: 90px;
      height: 90px;
      font-size: 0.9rem;
  }

  .navbar-collapse {
    background: white;
    padding: 20px;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  .scroll-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}

/* Methodology - Mejoras */
.pdca-step {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  z-index: 2;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pdca-step i {
  font-size: 2rem;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.pdca-step span {
  font-size: 1rem;
}

/* Tooltip */
.step-tooltip {
  position: absolute;
  bottom: -40px;
  background: var(--dark-text);
  color: white;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: normal;
  width: max-content;
  max-width: 150px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10;
}

/* .pdca-step:hover .step-tooltip {
  opacity: 1;
  visibility: visible;
  bottom: -50px;
} */

/* Resaltado secuencial */

/* Detalles del paso */
.step-details {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 5;
}

.details-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  max-width: 80%;
  text-align: center;
  position: relative;
}

.details-close {
  margin-top: 15px;
}

/* Animación de líneas más llamativa */
@keyframes dash {
  0% {
      stroke-dashoffset: 0;
      stroke: var(--light-text);
  }
  50% {
      stroke: var(--primary);
  }
  100% {
      stroke-dashoffset: -40;
      stroke: var(--light-text);
  }
}

/* Efectos adicionales */

.pdca-step:hover {
  transform: translate(-50%, -50%) scale(1.1) !important;
  z-index: 11;
}

.pdca-step:hover i {
  transform: scale(1.2);
}

/* Contact */
.contact {
  padding: 80px 0;
}

.contact-info {
  margin-bottom: 30px;
}

.contact-info h3 {
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 15px;
}

.contact-info i {
  color: var(--secondary);
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.map-container {
  height: 400px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
footer {
  background-color: var(--dark-text);
  color: white;
  padding: 50px 0 20px;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-links h4 {
  color: var(--secondary);
  margin-bottom: 20px;
  font-weight: 700;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--secondary);
  color: var(--dark-text);
}

.copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 30px;
  text-align: center;
  color: #ccc;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 991.98px) {
  .hero {
      padding: 120px 0 50px 0;
  }
  
  .hero h1 {
      font-size: 2.5rem;
  }
  
  .pdca-step {
      width: 100px;
      height: 100px;
      font-size: 0.9rem;
  }
}

/* Accessibility */

:focus {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}