/* ============================================================
   MINERAS+ | ESTILOS GLOBALES RESPONSIVOS Y ADAPTABLES
   ============================================================ */

/* Reset de Box-Sizing para prevenir desbordamientos laterales */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Evita el desplazamiento horizontal no deseado en celulares */
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* 1. IMÁGENES Y MULTIMEDIA RESPONSIVAS */
img, video, iframe, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 2. CONTENEDORES ADAPTABLES */
.responsive-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;  /* 16px en celular */
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .responsive-container {
    padding-left: 1.5rem; /* 24px en tablet */
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .responsive-container {
    padding-left: 2rem;  /* 32px en desktop */
    padding-right: 2rem;
  }
}

/* 3. GRIDS Y TARJETAS REUTILIZABLES AUTOMÁTICAS */
/* Cambia automáticamente de 1 columna en celular a 2 o 3 en pantalla grande */
.grid-responsive-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-responsive-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .grid-responsive-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}

/* 4. MODALES ADAPTABLES A PANTALLAS PEQUEÑAS */
.responsive-modal-content {
  width: 95%;
  max-width: 36rem; /* 576px */
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  border-radius: 1.5rem;
}

/* 5. MENÚS Y PESTAÑAS HORIZONTALES PARA MÓVIL */
/* Transforma sidebars verticales en barras deslizables horizontalmente en celulares */
.mobile-scroll-tabs {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  gap: 0.5rem;
  padding-bottom: 0.5rem;
}

.mobile-scroll-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

@media (min-width: 1024px) {
  .mobile-scroll-tabs {
    flex-direction: column;
    overflow-x: visible;
    padding-bottom: 0;
  }
}

/* 6. FORMULARIOS E INPUTS FLUIDOS */
input, select, textarea, button {
  font-family: inherit;
  font-size: 100%;
}

/* Ajuste de tamaño de fuente táctil para evitar zoom automático en iOS */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}