
/* === Responsive Fixes (non-destructive to colors) === */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Make images and media scale without cropping */
img, video, iframe, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility: prevent cropping for background images when applied to .no-crop */
.no-crop {
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Flexible containers */
.container, .wrapper, .content, main, section, header, footer {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(12px, 2vw, 24px);
  padding-right: clamp(12px, 2vw, 24px);
}

/* Grids stack on small screens */
.row, .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2vw, 24px);
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Navigation: hamburger on small screens */
.resp-nav {
  position: relative;
}
.resp-nav .hamburger {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  padding: .25rem .5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.resp-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 16px);
  align-items: center;
}
/* Collapse on small screens */
@media (max-width: 768px) {
  .resp-nav .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-top: .5rem;
  }
  .resp-nav.open .nav-links { display: flex; }
  .resp-nav .hamburger { display: inline-flex; }
}
@media (min-width: 769px) {
  .resp-nav .hamburger { display: none; }
  .resp-nav .nav-links { display: flex !important; }
}

/* Ensure tables scroll on small screens */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; }


/* === Corrección menú hamburguesa que se cortaba === */
@media (max-width: 768px) {
  .resp-nav {
    position: relative;
  }
  .resp-nav .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    background-color: inherit; /* mantiene color original */
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 999;
  }
  .resp-nav.open .nav-links {
    display: flex;
  }
}
