/**
 * AGORA TRANSPORTE — CSS Compatibility Fixes
 * Asegura que el CSS nuevo no rompa elementos Bootstrap/viejos
 */

/* ========================================================
   RESET DE CONFLICTOS - Bootstrap Compatibility
   ======================================================== */

/* Asegurar que Bootstrap buttons no sean roto */
.btn {
  position: relative;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  text-align: center;
  z-index: auto;
}

/* Asegurar que links normales no tengan effects raros */
.main-menu a,
.footer a,
.mobile-menu a,
.text-link {
  position: static !important;
}

.main-menu a::after,
.footer a::after,
.mobile-menu a::after,
.text-link::after {
  display: none !important;
}

/* Asegurar que formulario no sea roto */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  position: relative !important;
  padding: 4px 8px !important;
  border: 1px solid #ccc !important;
  border-radius: 3px !important;
  font-size: 11px !important;
  background: white !important;
  min-height: 24px !important;
  height: 24px !important;
  line-height: 1.2 !important;
  max-width: 100% !important;
}

textarea,
textarea.form-control {
  min-height: 140px !important;
  height: auto !important;
  resize: vertical !important;
}

.form-group {
  margin-bottom: 8px !important;
}

.form-group label {
  display: block !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  margin-bottom: 2px !important;
  padding: 0 !important;
}

.form-control:focus,
.form-select:focus {
  border-color: #fe475b !important;
  box-shadow: 0 0 0 1px rgba(254, 71, 91, 0.15) !important;
  outline: none !important;
}

input[type="text"]::after,
input[type="email"]::after,
select::after,
textarea::after {
  display: none !important;
}

.btn.btn-primary {
  padding: 8px 16px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  height: auto !important;
  min-height: 28px !important;
}

/* Asegurar que iconos de formulario funcionen */
.form-group,
.form-item {
  position: relative;
  display: block;
}

.form-icon {
  position: absolute;
  pointer-events: none;
}

/* Asegurar que grid sistem de Bootstrap siga funcionando */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -12px;
  margin-left: -12px;
}

.row.cardIconStyleCircle {
  justify-content: center;
  margin: 0 auto;
}

.col,
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-auto {
  padding-right: 12px;
  padding-left: 12px;
}

/* Asegurar que Media queries de Bootstrap funcionen */
@media (max-width: 767px) {
  .d-none { display: none !important; }
  .d-block { display: block !important; }
  .d-flex { display: flex !important; }
}

@media (min-width: 768px) and (max-width: 991px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
}

/* Asegurar que elementos flotantes (floating elements) funcionen */
.float-left { float: left !important; }
.float-right { float: right !important; }
.float-end { float: right !important; }

/* Asegurar que Swiper funcione correctamente */
.swiper-container,
.swiper-slide,
.swiper-wrapper {
  position: relative;
}

.swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: auto;
}

.swiper-button-prev,
.swiper-button-next {
  position: absolute !important;
  top: 50% !important;
  z-index: 100 !important;
  width: 40px !important;
  height: 40px !important;
  margin-top: -20px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 50% !important;
  color: white !important;
  font-size: 20px !important;
  transition: all 0.3s ease !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: rgba(255, 71, 91, 0.4) !important;
}

.swiper-button-prev {
  left: 16px !important;
}

.swiper-button-next {
  right: 16px !important;
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 18px !important;
  content: '›' !important;
  color: white !important;
}

.swiper-button-prev::after {
  content: '‹' !important;
}

.swiper-pagination {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 6px;
}

/* Mejorar visibilidad de selección de texto */
::selection {
  background-color: #fe475b !important;
  color: white !important;
}

::-moz-selection {
  background-color: #fe475b !important;
  color: white !important;
}

.dropdown-menu {
  display: none;
  position: absolute;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* Swiper Banner Buttons */
.box-pagination-button {
  top: 22% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  z-index: 25 !important;
}

.box-pagination-button .swiper-pagination,
.box-pagination-button .swiper-pagination-banner {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  margin-left: 12px !important;
  display: inline-block !important;
  text-align: left !important;
}

.swiper-button-next-banner,
.swiper-button-prev-banner {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  z-index: 100 !important;
  width: 40px !important;
  height: 40px !important;
  margin-top: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 50% !important;
  color: white !important;
  border: none !important;
  transition: all 0.3s ease !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.swiper-button-prev-banner {
  margin-right: 10px !important;
}

.swiper-button-next-banner {
  margin-right: 0 !important;
}

.swiper-button-next-banner:hover,
.swiper-button-prev-banner:hover {
  background: rgba(254, 71, 91, 0.4) !important;
}

.swiper-button-next-banner::after,
.swiper-button-prev-banner::after {
  font-size: 18px !important;
  color: white !important;
  font-weight: bold !important;
}

/* Service cards: ensure images remain visible even if WOW reveal is not initialized */
.swiper-group-4-service .cardService.wow,
.swiper-group-4-service .cardService .cardImage,
.swiper-group-4-service .cardService .cardImage img {
  visibility: visible !important;
  opacity: 1 !important;
}

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fe475b 0%, #e63b4f 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(254, 71, 91, 0.35);
  transition: all 0.3s ease;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8) translateY(20px);
}

.whatsapp-float.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(254, 71, 91, 0.45);
}

.whatsapp-float svg {
  width: 24px;
  height: 24px;
  color: white;
}

.whatsapp-float .wpp-label {
  display: none;
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 44px;
    height: 44px;
    bottom: 16px;
    right: 16px;
  }
  
  .whatsapp-float svg {
    width: 22px;
    height: 22px;
  }
}

/* Asegurar que preloader no se vea roto */
#preloader-active {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Asegurar que header mobile burger funcione */
.burger-icon {
  position: relative;
  width: 20px;
  height: 14px;
  cursor: pointer;
}

.burger-icon span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: 0.3s;
}

/* Asegurar que textos no sean hidden o mal displayed */
.text-14,
.text-16,
.text-20-medium,
.heading-44-medium {
  position: static !important;
  display: block;
}

/* Asegurar que WOW animations funcionen */
.wow {
  visibility: visible;
}

/* Asegurar que utilidades Bootstrap funcionen */
.mb-0 { margin-bottom: 0 !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-30 { margin-bottom: 30px !important; }
.mb-40 { margin-bottom: 40px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-10 { margin-top: 10px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-30 { margin-top: 30px !important; }
.mt-40 { margin-top: 40px !important; }

.pt-60 { padding-top: 60px !important; }
.pt-120 { padding-top: 120px !important; }
.pb-60 { padding-bottom: 60px !important; }
.pb-120 { padding-bottom: 120px !important; }

.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }

/* Asegurar que Z-index no sea roto */
.header { z-index: 999 !important; }
.mobile-menu { z-index: 998 !important; }
.modal { z-index: 1050 !important; }

/* Asegurar que position no sea roto */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* ========================================================
   SELECTS ESPECÍFICOS QUE SÍ PUEDEN LLEVART EFECTOS
   ======================================================== */

/* Solo aplicar efectos a elementos específicos, no globals */
.btn-whatsapp::after,
.btn-primary::after,
.btn-cotizar-outline::after {
  display: none; /* Estos botones no necesitan este efecto */
}

.nav-main-menu .main-menu li a {
  position: relative;
}

.nav-main-menu .main-menu li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #fe475b;
  transition: width 0.3s ease;
}

.nav-main-menu .main-menu li a:hover::before,
.nav-main-menu .main-menu li a.active::before {
  width: 100%;
}

/* Solo aplicar hover effects a cards específicas */
.cardFleet:hover,
.cardService:hover,
.card-service:hover {
  /* Estos ya tienen sus propios hover definidos en agora-premium.css */
}
