/**
 * Mejoras Visuales y de UX - ECOANZA
 * Estilos adicionales para modernización del sitio
 */

/* ============================================
   1. BARRA DE PROGRESO DE SCROLL
   ============================================ */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  /*background: linear-gradient(90deg, #28a745 0%, #66CC66 100%);*/
  background: #2F8399;
  width: 0%;
  z-index: 10000;
  transition: width 0.1s ease-out;
  box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

/* ============================================
   2. BOTÓN FLOTANTE DE PRESUPUESTO
   ============================================ */
.floating-cta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  animation: floatIn 0.6s ease-out;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(100px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-float {
  background: linear-gradient(135deg, #28a745 0%, #66CC66 100%);
  color: white;
  border: none;
  padding: 18px 30px;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  animation: pulse-float 2s infinite;
  text-decoration: none;
}

.btn-float:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(40, 167, 69, 0.6);
  color: white;
}

.btn-float i {
  font-size: 20px;
}

@keyframes pulse-float {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .floating-cta {
    bottom: 20px;
    right: 20px;
  }

  .btn-float {
    padding: 15px 20px;
    font-size: 14px;
  }

  .btn-float span {
    display: none;
  }

  .btn-float i {
    margin: 0;
  }
}

/* ============================================
   3. HERO SECTION MEJORADO (Minimalista)
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 180px 0 100px 0;
  /* Aumentado padding vertical */
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
  /* Gradiente oscuro solicitado */
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
  /* Z-index mayor que el overlay */
}

/* Tipografía Principal */
.hero-title {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  /* Bold */
  color: #ffffff;
  /* Blanco puro */
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-family: 'Open Sans', sans-serif;
  /* O la que se use en cuerpo */
  font-size: 1.25rem;
  color: #ffffff;
  opacity: 0.9;
  /* 90% opacidad */
  margin-bottom: 30px;
  font-weight: 400;
  /*max-width: 800px;*/
  margin-left: auto;
  margin-right: auto;
}

/* Puntos Clave Minimalistas */
.hero-features {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.feature-simple {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
}

.feature-simple i {
  font-size: 1.1rem;
  /* Intentamos simular lineal/fino si solo tenemos solid */
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1);
  /* Sutil hack si necesario, pero mejor color puro */
  color: #ffffff;
}

.feature-separator {
  color: rgba(255, 255, 255, 0.5);
  font-weight: 300;
}

/* Botón de Acción Principal (CTA) */
.btn-hero-primary {
  display: inline-block;
  background-color: #004D84;
  /* Azul corporativo vibrante */
  color: #ffffff;
  font-weight: 600;
  padding: 15px 40px;
  border-radius: 8px;
  /* Redondeado 8px */
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 77, 132, 0.3);
}

.btn-hero-primary:hover {
  background-color: #003a63;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 77, 132, 0.4);
}

/* Badges Trust (Glassmorphism) */
.hero-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 50px;
  flex-wrap: wrap;
}

.badge-item {
  background: rgba(255, 255, 255, 0.1);
  /* Semi-transparente */
  backdrop-filter: blur(8px);
  /* Desenfoque */
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 24px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  /* Borde fino blanco */
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.badge-item i {
  font-size: 1.2rem;
  color: #ffffff;
  /* Iconos blancos para minimalismo, o mantener dorado si se prefiere contraste */
}

.badge-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  border-color: #ffffff;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-features {
    flex-direction: column;
    gap: 10px;
  }

  .feature-separator {
    display: none !important;
  }

  .hero-badges {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .badge-item {
    width: 100%;
    justify-content: center;
    max-width: 300px;
  }
}

/* ============================================
   4. ESTADÍSTICAS MEJORADAS
   ============================================ */
.stats-item {
  background: white;
  padding: 35px 25px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border-top: 4px solid transparent;
}

.stats-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #004D84, #28a745);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease;
}

.stats-item:hover::before {
  transform: scaleX(1);
}

.stats-item:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stats-item .purecounter {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #004D84, #28a745);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 10px;
}

.stats-item p {
  font-size: 1.1rem;
  color: #666;
  font-weight: 600;
  margin: 0;
}

/* Iconos para estadísticas */
.stats-item::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(0, 77, 132, 0.05), rgba(40, 167, 69, 0.05));
  border-radius: 50%;
  transition: all 0.4s;
}

.stats-item:hover::after {
  transform: scale(1.5);
  opacity: 0.5;
}

/* ============================================
   5. SERVICIOS - TARJETAS INTERACTIVAS
   ============================================ */
.service-item {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 77, 132, 0.05), rgba(40, 167, 69, 0.05));
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
}

.service-item:hover::before {
  opacity: 1;
}

.service-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.service-item .icon {
  transition: all 0.4s;
}

.service-item:hover .icon {
  transform: scale(1.1) rotate(5deg);
}

.service-item h3 {
  transition: color 0.3s;
}

.service-item:hover h3 {
  color: #28a745;
}

/* ============================================
   6. TESTIMONIOS MEJORADOS
   ============================================ */
.testimonial-item {
  background: white;
  padding: 35px;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s;
  position: relative;
  border-left: 4px solid #28a745;
}

.testimonial-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.testimonial-item .quote-icon-left {
  font-size: 2.5rem;
  color: #28a745;
  opacity: 0.2;
  position: absolute;
  top: 20px;
  left: 20px;
}

.testimonial-item p {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
  font-style: italic;
}

.testimonial-item h3 {
  color: #004D84;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 5px;
}

.testimonial-item h4 {
  color: #666;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Rating stars */
.testimonial-item h3[style*="color:#FFD700"] {
  margin-top: 15px;
  font-size: 1.2rem;
}



/* ============================================
   8. FORMULARIO DE CONTACTO MEJORADO
   ============================================ */
.php-email-form {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.php-email-form .form-group {
  margin-bottom: 25px;
}

.php-email-form input,
.php-email-form textarea {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 15px 20px;
  transition: all 0.3s;
  font-size: 15px;
}

.php-email-form input:focus,
.php-email-form textarea:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
  outline: none;
}

.php-email-form button[type="submit"] {
  background: linear-gradient(135deg, #28a745, #66CC66);
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.php-email-form button[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

/* ============================================
   9. ANIMACIONES GENERALES
   ============================================ */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   10. MEJORAS RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .hero-badges {
    gap: 15px;
  }

  .badge-item {
    padding: 12px 20px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .stats-item .purecounter {
    font-size: 2.5rem;
  }

  .php-email-form {
    padding: 25px;
  }
}

/* ============================================
   11. SMOOTH SCROLL MEJORADO
   ============================================ */
html {
  scroll-behavior: smooth;
}

/* ============================================
   12. LOADING SPINNER
   ============================================ */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #28a745;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ============================================
   13. COOKIE CONSENT & MODALS
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 900px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: slideUpCookie 0.5s ease-out;
}

.cookie-banner.hidden {
  display: none;
}

@keyframes slideUpCookie {
  from {
    transform: translate(-50%, 100px);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.cookie-content h3 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 10px;
  color: #004D84;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.5;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-cookie {
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-family: 'Poppins', sans-serif;
}

.btn-accept {
  background: linear-gradient(135deg, #28a745, #66CC66);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40, 167, 69, 0.4);
}

.btn-reject {
  background: #f8f9fa;
  color: #555;
  border: 1px solid #ddd;
}

.btn-reject:hover {
  background: #e9ecef;
  color: #333;
}

.btn-outline {
  background: transparent;
  border: 1px solid #004D84;
  color: #004D84;
}

.btn-outline:hover {
  background: rgba(0, 77, 132, 0.05);
}

.cookie-links {
  font-size: 0.85rem;
  margin-top: 10px;
  text-align: right;
  color: #666;
}

.cookie-links a {
  color: #004D84;
  text-decoration: none;
  border-bottom: 1px dashed #004D84;
  transition: color 0.3s;
  cursor: pointer;
}

.cookie-links a:hover {
  color: #28a745;
  border-color: #28a745;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 99999 !important;
  display: flex;
  align-items: flex-start;
  padding-top: 50px;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  /* Added visibility hidden to be safe */
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* Force pointer and z-index for modal triggers */
[data-modal] {
  cursor: pointer !important;
  position: relative;
  z-index: 5;
}

/* Specific fix for footer links to ensure they are clickable */
.footer-links a[data-modal] {
  display: inline-block;
  /* Ensure it takes space */
}


.modal-content {
  background: white;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 20px 30px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
}

.modal-header h3 {
  margin: 0;
  color: #004D84;
  font-size: 1.3rem;
  font-weight: 700;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #888;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: #dc3545;
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  line-height: 1.6;
  color: #555;
  font-size: 0.95rem;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: #fff;
}

/* Cookie Switch/Toggle */
.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.cookie-option:last-child {
  border-bottom: none;
}

.option-info h4 {
  margin: 0 0 5px;
  font-size: 1rem;
  color: #333;
}

.option-info p {
  margin: 0;
  font-size: 0.85rem;
  color: #777;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #28a745;
}

input:focus+.slider {
  box-shadow: 0 0 1px #28a745;
}

input:checked+.slider:before {
  transform: translateX(24px);
}

input:disabled+.slider {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 20px;
  }

  .cookie-buttons {
    flex-direction: column;
  }

  .btn-cookie {
    width: 100%;
  }

  .modal-content {
    width: 95%;
    max-height: 80vh;
  }
}