/**
 * RESPONSIVE BOOTSTRAP INTEGRATION
 * Sistema híbrido que coexiste con Bootstrap sin conflictos
 * 
 * @author MrGreen Development Team
 * @version 1.0.0
 * @since 2025-01-08
 */

/* ===== RESET DE CONFLICTOS CON BOOTSTRAP ===== */

/* Asegurar que nuestro sistema tenga prioridad sobre Bootstrap */
.responsive-system {
  /* Reset de estilos de Bootstrap que pueden interferir */
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== SISTEMA DE CONTAINERS HÍBRIDO ===== */

/* Container responsive que coexiste con Bootstrap */
.responsive-container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
}

@media (min-width: 375px) {
  .responsive-container {
    padding: 0 20px !important;
  }
}

@media (min-width: 768px) {
  .responsive-container {
    padding: 0 32px !important;
    max-width: 1400px !important;
  }
}

@media (min-width: 1024px) {
  .responsive-container {
    padding: 0 40px !important;
    max-width: 1600px !important;
  }
}

/* ===== SISTEMA DE GRID HÍBRIDO ===== */

/* Grid responsive que puede coexistir con Bootstrap grid */
.responsive-grid {
  display: grid !important;
  gap: 16px !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
}

@media (min-width: 576px) {
  .responsive-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }
}

@media (min-width: 768px) {
  .responsive-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
  }
}

@media (min-width: 1024px) {
  .responsive-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 28px !important;
  }
}

@media (min-width: 1440px) {
  .responsive-grid {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 32px !important;
  }
}

/* ===== SISTEMA DE BOTONES HÍBRIDO ===== */

/* Botones responsive que coexisten con Bootstrap */
.btn-responsive {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 16px !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-height: 44px !important;
  min-width: 44px !important;
  box-sizing: border-box !important;
}

@media (max-width: 374px) {
  .btn-responsive {
    padding: 6px 12px !important;
    font-size: 12px !important;
    min-height: 40px !important;
    min-width: 40px !important;
    border-radius: 6px !important;
  }
}

@media (min-width: 375px) {
  .btn-responsive {
    padding: 8px 16px !important;
    font-size: 14px !important;
    min-height: 44px !important;
    min-width: 44px !important;
    border-radius: 8px !important;
  }
}

@media (min-width: 768px) {
  .btn-responsive {
    padding: 12px 20px !important;
    font-size: 16px !important;
    min-height: 48px !important;
    min-width: 48px !important;
    border-radius: 10px !important;
  }
}

@media (min-width: 1024px) {
  .btn-responsive {
    padding: 16px 24px !important;
    font-size: 18px !important;
    min-height: 52px !important;
    min-width: 52px !important;
    border-radius: 12px !important;
  }
}

/* Variantes de botones responsive */
.btn-responsive-primary {
  background: #53fc1b !important;
  color: #081902 !important;
}

.btn-responsive-primary:hover {
  background: #4ae317 !important;
  color: #081902 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(83, 252, 27, 0.3) !important;
}

.btn-responsive-secondary {
  background: transparent !important;
  color: #081902 !important;
  border: 1px solid #081902 !important;
}

.btn-responsive-secondary:hover {
  background: #53fc1b !important;
  color: #081902 !important;
  border-color: #53fc1b !important;
}

/* ===== SISTEMA DE FORMULARIOS HÍBRIDO ===== */

/* Formularios responsive que coexisten con Bootstrap */
.form-responsive {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  width: 100% !important;
}

@media (min-width: 768px) {
  .form-responsive {
    gap: 20px !important;
  }
}

.form-control-responsive {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  background: #ffffff !important;
  color: #111827 !important;
  transition: all 0.2s ease !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}

@media (max-width: 374px) {
  .form-control-responsive {
    padding: 8px 12px !important;
    font-size: 12px !important;
    min-height: 40px !important;
    border-radius: 6px !important;
  }
}

@media (min-width: 375px) {
  .form-control-responsive {
    padding: 12px 16px !important;
    font-size: 14px !important;
    min-height: 44px !important;
    border-radius: 8px !important;
  }
}

@media (min-width: 768px) {
  .form-control-responsive {
    padding: 16px 20px !important;
    font-size: 16px !important;
    min-height: 48px !important;
    border-radius: 10px !important;
  }
}

@media (min-width: 1024px) {
  .form-control-responsive {
    padding: 20px 24px !important;
    font-size: 18px !important;
    min-height: 52px !important;
    border-radius: 12px !important;
  }
}

.form-control-responsive:focus {
  outline: none !important;
  border-color: #53fc1b !important;
  box-shadow: 0 0 0 3px rgba(83, 252, 27, 0.1) !important;
}

/* ===== SISTEMA DE CARDS HÍBRIDO ===== */

/* Cards responsive que coexisten con Bootstrap */
.card-responsive {
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  overflow: hidden !important;
  transition: all 0.2s ease !important;
  border: 1px solid #e5e7eb !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 374px) {
  .card-responsive {
    border-radius: 8px !important;
    margin: 8px !important;
  }
}

@media (min-width: 375px) {
  .card-responsive {
    border-radius: 10px !important;
    margin: 12px !important;
  }
}

@media (min-width: 768px) {
  .card-responsive {
    border-radius: 12px !important;
    margin: 16px !important;
  }
}

@media (min-width: 1024px) {
  .card-responsive {
    border-radius: 16px !important;
    margin: 20px !important;
  }
}

.card-responsive:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(-2px) !important;
}

/* ===== SISTEMA DE NAVEGACIÓN HÍBRIDO ===== */

/* Navegación responsive que coexiste con Bootstrap */
.navbar-responsive {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1030 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 16px !important;
  min-height: 60px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 374px) {
  .navbar-responsive {
    padding: 8px 12px !important;
    min-height: 56px !important;
  }
}

@media (min-width: 375px) {
  .navbar-responsive {
    padding: 12px 16px !important;
    min-height: 60px !important;
  }
}

@media (min-width: 768px) {
  .navbar-responsive {
    padding: 16px 20px !important;
    min-height: 64px !important;
  }
}

@media (min-width: 1024px) {
  .navbar-responsive {
    padding: 20px 24px !important;
    min-height: 68px !important;
  }
}

/* ===== SISTEMA DE SIDEBAR HÍBRIDO ===== */

/* Sidebar responsive que coexiste con Bootstrap */
.sidebar-responsive {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 280px !important;
  height: 100vh !important;
  background: #ffffff !important;
  border-right: 1px solid #e5e7eb !important;
  transform: translateX(-100%) !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  z-index: 1050 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
}

@media (min-width: 768px) {
  .sidebar-responsive {
    position: sticky !important;
    transform: translateX(0) !important;
    width: 280px !important;
  }
}

@media (min-width: 1024px) {
  .sidebar-responsive {
    width: 320px !important;
  }
}

@media (min-width: 1440px) {
  .sidebar-responsive {
    width: 360px !important;
  }
}

.sidebar-responsive.open {
  transform: translateX(0) !important;
}

/* ===== SISTEMA DE MODALES HÍBRIDO ===== */

/* Modales responsive que coexisten con Bootstrap */
.modal-responsive {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1055 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

@media (max-width: 374px) {
  .modal-responsive {
    padding: 8px !important;
  }
}

@media (min-width: 768px) {
  .modal-responsive {
    padding: 20px !important;
  }
}

.modal-content-responsive {
  background: #ffffff !important;
  border-radius: 12px !important;
  width: 100% !important;
  max-width: 500px !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
}

@media (max-width: 374px) {
  .modal-content-responsive {
    border-radius: 8px !important;
    max-width: 100% !important;
  }
}

@media (min-width: 768px) {
  .modal-content-responsive {
    border-radius: 16px !important;
    max-width: 600px !important;
  }
}

@media (min-width: 1024px) {
  .modal-content-responsive {
    max-width: 700px !important;
  }
}

/* ===== UTILIDADES HÍBRIDAS ===== */

/* Utilidades que coexisten con Bootstrap */
.d-flex-responsive {
  display: flex !important;
}

.flex-column-responsive {
  flex-direction: column !important;
}

.align-items-center-responsive {
  align-items: center !important;
}

.justify-content-center-responsive {
  justify-content: center !important;
}

.justify-content-between-responsive {
  justify-content: space-between !important;
}

.text-center-responsive {
  text-align: center !important;
}

.text-left-responsive {
  text-align: left !important;
}

.text-right-responsive {
  text-align: right !important;
}

/* ===== SISTEMA DE ESPACIADO HÍBRIDO ===== */

/* Espaciado que coexiste con Bootstrap */
.m-0-responsive { margin: 0 !important; }
.m-1-responsive { margin: 4px !important; }
.m-2-responsive { margin: 8px !important; }
.m-3-responsive { margin: 12px !important; }
.m-4-responsive { margin: 16px !important; }
.m-5-responsive { margin: 20px !important; }

.p-0-responsive { padding: 0 !important; }
.p-1-responsive { padding: 4px !important; }
.p-2-responsive { padding: 8px !important; }
.p-3-responsive { padding: 12px !important; }
.p-4-responsive { padding: 16px !important; }
.p-5-responsive { padding: 20px !important; }

/* ===== SISTEMA DE VISIBILIDAD HÍBRIDO ===== */

/* Visibilidad que coexiste con Bootstrap */
.d-none-responsive {
  display: none !important;
}

.d-block-responsive {
  display: block !important;
}

.d-flex-responsive {
  display: flex !important;
}

.d-grid-responsive {
  display: grid !important;
}

/* Responsive visibility */
@media (max-width: 767px) {
  .d-mobile-none-responsive {
    display: none !important;
  }
  
  .d-mobile-block-responsive {
    display: block !important;
  }
  
  .d-mobile-flex-responsive {
    display: flex !important;
  }
}

@media (min-width: 768px) {
  .d-desktop-none-responsive {
    display: none !important;
  }
  
  .d-desktop-block-responsive {
    display: block !important;
  }
  
  .d-desktop-flex-responsive {
    display: flex !important;
  }
}

/* ===== SISTEMA DE TIPOGRAFÍA HÍBRIDO ===== */

/* Tipografía que coexiste con Bootstrap */
.text-responsive-xs {
  font-size: 10px !important;
}

.text-responsive-sm {
  font-size: 12px !important;
}

.text-responsive-base {
  font-size: 14px !important;
}

.text-responsive-lg {
  font-size: 16px !important;
}

.text-responsive-xl {
  font-size: 18px !important;
}

.text-responsive-2xl {
  font-size: 20px !important;
}

.text-responsive-3xl {
  font-size: 24px !important;
}

.text-responsive-4xl {
  font-size: 28px !important;
}

.text-responsive-5xl {
  font-size: 32px !important;
}

/* Responsive typography */
@media (max-width: 374px) {
  .text-responsive-xs { font-size: 9px !important; }
  .text-responsive-sm { font-size: 10px !important; }
  .text-responsive-base { font-size: 12px !important; }
  .text-responsive-lg { font-size: 14px !important; }
  .text-responsive-xl { font-size: 16px !important; }
  .text-responsive-2xl { font-size: 18px !important; }
  .text-responsive-3xl { font-size: 20px !important; }
  .text-responsive-4xl { font-size: 22px !important; }
  .text-responsive-5xl { font-size: 24px !important; }
}

@media (min-width: 768px) {
  .text-responsive-xs { font-size: 11px !important; }
  .text-responsive-sm { font-size: 13px !important; }
  .text-responsive-base { font-size: 15px !important; }
  .text-responsive-lg { font-size: 17px !important; }
  .text-responsive-xl { font-size: 19px !important; }
  .text-responsive-2xl { font-size: 21px !important; }
  .text-responsive-3xl { font-size: 25px !important; }
  .text-responsive-4xl { font-size: 30px !important; }
  .text-responsive-5xl { font-size: 34px !important; }
}

@media (min-width: 1024px) {
  .text-responsive-xs { font-size: 12px !important; }
  .text-responsive-sm { font-size: 14px !important; }
  .text-responsive-base { font-size: 16px !important; }
  .text-responsive-lg { font-size: 18px !important; }
  .text-responsive-xl { font-size: 20px !important; }
  .text-responsive-2xl { font-size: 22px !important; }
  .text-responsive-3xl { font-size: 26px !important; }
  .text-responsive-4xl { font-size: 32px !important; }
  .text-responsive-5xl { font-size: 36px !important; }
}

/* ===== SISTEMA DE COLORES HÍBRIDO ===== */

/* Colores que coexisten con Bootstrap */
.text-primary-responsive {
  color: #53fc1b !important;
}

.text-secondary-responsive {
  color: #6b7280 !important;
}

.text-success-responsive {
  color: #10b981 !important;
}

.text-danger-responsive {
  color: #ef4444 !important;
}

.text-warning-responsive {
  color: #f59e0b !important;
}

.text-info-responsive {
  color: #3b82f6 !important;
}

.bg-primary-responsive {
  background-color: #53fc1b !important;
}

.bg-secondary-responsive {
  background-color: #6b7280 !important;
}

.bg-success-responsive {
  background-color: #10b981 !important;
}

.bg-danger-responsive {
  background-color: #ef4444 !important;
}

.bg-warning-responsive {
  background-color: #f59e0b !important;
}

.bg-info-responsive {
  background-color: #3b82f6 !important;
}

/* ===== SISTEMA DE BORDES HÍBRIDO ===== */

/* Bordes que coexisten con Bootstrap */
.border-responsive {
  border: 1px solid #e5e7eb !important;
}

.border-primary-responsive {
  border: 1px solid #53fc1b !important;
}

.border-secondary-responsive {
  border: 1px solid #6b7280 !important;
}

.border-success-responsive {
  border: 1px solid #10b981 !important;
}

.border-danger-responsive {
  border: 1px solid #ef4444 !important;
}

.border-warning-responsive {
  border: 1px solid #f59e0b !important;
}

.border-info-responsive {
  border: 1px solid #3b82f6 !important;
}

.rounded-responsive {
  border-radius: 8px !important;
}

.rounded-sm-responsive {
  border-radius: 4px !important;
}

.rounded-lg-responsive {
  border-radius: 12px !important;
}

.rounded-xl-responsive {
  border-radius: 16px !important;
}

.rounded-full-responsive {
  border-radius: 9999px !important;
}

/* ===== SISTEMA DE SOMBRAS HÍBRIDO ===== */

/* Sombras que coexisten con Bootstrap */
.shadow-sm-responsive {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.shadow-responsive {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg-responsive {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) !important;
}

.shadow-xl-responsive {
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1) !important;
}

/* ===== SISTEMA DE TRANSICIONES HÍBRIDO ===== */

/* Transiciones que coexisten con Bootstrap */
.transition-responsive {
  transition: all 0.2s ease !important;
}

.transition-fast-responsive {
  transition: all 0.15s ease !important;
}

.transition-slow-responsive {
  transition: all 0.3s ease !important;
}

/* ===== SISTEMA DE HOVER HÍBRIDO ===== */

/* Hover que coexiste con Bootstrap */
.hover-scale-responsive:hover {
  transform: scale(1.05) !important;
}

.hover-scale-sm-responsive:hover {
  transform: scale(1.02) !important;
}

.hover-scale-lg-responsive:hover {
  transform: scale(1.1) !important;
}

.hover-lift-responsive:hover {
  transform: translateY(-2px) !important;
}

.hover-lift-sm-responsive:hover {
  transform: translateY(-1px) !important;
}

.hover-lift-lg-responsive:hover {
  transform: translateY(-4px) !important;
}

/* ===== SISTEMA DE FOCUS HÍBRIDO ===== */

/* Focus que coexiste con Bootstrap */
.focus-primary-responsive:focus {
  outline: none !important;
  border-color: #53fc1b !important;
  box-shadow: 0 0 0 3px rgba(83, 252, 27, 0.1) !important;
}

.focus-secondary-responsive:focus {
  outline: none !important;
  border-color: #6b7280 !important;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1) !important;
}

/* ===== SISTEMA DE RESPONSIVE UTILITIES HÍBRIDO ===== */

/* Utilidades responsive que coexisten con Bootstrap */
@media (max-width: 374px) {
  .xs-hidden-responsive {
    display: none !important;
  }
  
  .xs-visible-responsive {
    display: block !important;
  }
}

@media (min-width: 375px) and (max-width: 413px) {
  .sm-hidden-responsive {
    display: none !important;
  }
  
  .sm-visible-responsive {
    display: block !important;
  }
}

@media (min-width: 414px) and (max-width: 767px) {
  .md-hidden-responsive {
    display: none !important;
  }
  
  .md-visible-responsive {
    display: block !important;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .lg-hidden-responsive {
    display: none !important;
  }
  
  .lg-visible-responsive {
    display: block !important;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .xl-hidden-responsive {
    display: none !important;
  }
  
  .xl-visible-responsive {
    display: block !important;
  }
}

@media (min-width: 1200px) {
  .xxl-hidden-responsive {
    display: none !important;
  }
  
  .xxl-visible-responsive {
    display: block !important;
  }
}

/* ===== SISTEMA DE PERFORMANCE HÍBRIDO ===== */

/* Performance que coexiste con Bootstrap */
.will-change-transform-responsive {
  will-change: transform !important;
}

.will-change-opacity-responsive {
  will-change: opacity !important;
}

.will-change-scroll-responsive {
  will-change: scroll-position !important;
}

/* ===== SISTEMA DE ACCESIBILIDAD HÍBRIDO ===== */

/* Accesibilidad que coexiste con Bootstrap */
.sr-only-responsive {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.focus-visible-responsive:focus {
  outline: 2px solid #53fc1b !important;
  outline-offset: 2px !important;
}

/* ===== SISTEMA DE PRINT HÍBRIDO ===== */

/* Print que coexiste con Bootstrap */
@media print {
  .no-print-responsive {
    display: none !important;
  }
  
  .print-only-responsive {
    display: block !important;
  }
  
  .responsive-system * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
}
