@media (max-width: 1024px) {

  html,
  body {
    overflow-x: hidden;
  }

  body {
    padding-top: 0;
  }

  nav {
    padding: 0.75rem 1.25rem;
  }

  section {
    padding: 3rem 1.25rem;
  }

  .container {
    max-width: 100%;
    padding-inline: 18px;
  }

  h1 {
    font-size: clamp(2rem, 4vw, 2.4rem);
  }

  h2 {
    font-size: 1.6rem;
  }

  .hero .btn {
    width: 260px;
  }

  .grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
  }

  .grid > * {
    flex: 1 1 320px;
    max-width: 420px;
    min-width: 0;
  }

  .card,
  .project-card {
    width: 100%;
  }

  .nav-logo {
    width: 54px;
  }

  .logo-link h1 {
    font-size: 1.35rem;
  }

  .problema-item {
    gap: 2.2rem;
    margin-bottom: 5rem;
  }

  .problema-texto h3 {
    font-size: 1.6rem;
  }

  .problema-img {
    max-width: 460px;
  }

  .problema-img img {
    height: 300px;
  }
}

@media (max-width: 900px) {

  html,
  body {
    overflow-x: hidden;
  }

  .problema h2 {
    margin-bottom: 3rem;
  }

  .problema-item,
  .problema-item.reverse {
    flex-direction: column;
    gap: 1.7rem;
    margin-bottom: 4rem;
    text-align: center;
  }

  .problema-texto p {
    max-width: 100%;
  }

  .problema-texto h3 {
    font-size: 1.45rem;
  }

  .problema-img {
    max-width: 100%;
  }

  .problema-img img {
    height: 280px;
  }
}

@media (max-width: 825px) {

  html,
  body {
    overflow-x: hidden;
  }

  body {
    padding-top: 0;
  }

  .container {
    max-width: 100%;
    padding-inline: 14px;
  }

  .hamburger {
    display: flex;
    z-index: 3200;
  }

  .navbar {
    z-index: 3000;
  }

  nav {
    padding: 0.8rem 1rem;
  }

  .nav-logo {
    width: 48px;
  }

  .logo-link {
    gap: 0.7rem;
  }

  .logo-link h1 {
    font-size: 1.15rem;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0.9rem;

    width: 255px;
    max-width: calc(100vw - 1.8rem);

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 0.65rem;
    padding: 0.85rem;

    border-radius: 16px;

    transform: translateY(-12px) scale(.97);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: all .28s ease;
  }

  .nav-links.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a,
  .nav-links .btn {
    width: 100%;
    text-align: center;
    font-size: .93rem;
    padding: .75rem .9rem;
    border-radius: 12px;
  }

  .hero {
    min-height: 100vh;
    padding-top: 5.5rem;
  }

  .hero-content {
    text-align: center;
    align-items: center;
  }

  h1 {
    font-size: 1.9rem;
    max-width: 100%;
  }

  h2 {
    font-size: 1.6rem;
  }

  p {
    font-size: .95rem;
    max-width: 100%;
  }

  .hero .btn,
  .btn {
    width: 100%;
    max-width: 320px;
  }

  /* GRID NORMAL */

  .grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
  }

  .grid > * {
    min-width: 0;
  }

  /* SOLO CARRUSELES */

  #beneficios .grid,
  #proyectos .grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;

    gap: 1rem;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;

    padding: 0 4px .6rem;

    -webkit-overflow-scrolling: touch;
  }

  #beneficios .grid::-webkit-scrollbar,
  #proyectos .grid::-webkit-scrollbar {
    display: none;
  }

  #beneficios .card,
  #proyectos .project-card {
    flex: 0 0 calc(100% - 2rem);
    max-width: 340px;

    scroll-snap-align: center;
  }

  .carousel-controls,
  .carousel-dots {
    display: flex;
  }
}

@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden;
  }

  .nav-links {
    width: 245px;
    right: 0.8rem;
  }

  h1 {
    font-size: 1.85rem;
  }

  .problema {
    padding: 3rem 1rem;
  }

  .problema-item {
    margin-bottom: 3.3rem;
  }

  .problema-texto h3 {
    font-size: 1.3rem;
  }

  .problema-texto p {
    font-size: .96rem;
    line-height: 1.7;
  }

  .problema-img img {
    height: 250px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {

  html,
  body {
    overflow-x: hidden;
  }

  section {
    padding: 2.25rem 1rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  p {
    font-size: .92rem;
  }

  .card {
    padding: 1.4rem;
  }

  .nav-links {
    width: 230px;
    max-width: calc(100vw - 1.4rem);
  }

  #beneficios .card,
  #proyectos .project-card {
    flex: 0 0 calc(100% - 1.2rem);
    max-width: 320px;
  }

  .problema-img img {
    height: 220px;
  }
}

@media (max-width: 360px) {

  html,
  body {
    overflow-x: hidden;
  }

  h1 {
    font-size: 1.55rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .nav-links {
    width: 215px;
  }

  #beneficios .card,
  #proyectos .project-card {
    flex: 0 0 calc(100% - 1rem);
    max-width: 300px;
  }

  .problema-img img {
    height: 200px;
  }
}