/* ---------- Grandes → Medianos ---------- */
@media (max-width: 1440px){
  .hero-grid{ grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero-stats{ grid-template-columns: repeat(3,1fr); }
  .contenedor_Dos,
  .c_colapse,
  .boxpres_content{ grid-template-columns: repeat(2,1fr); }
}

/* ---------- <= 1280px: reorganización suave ---------- */
@media (max-width: 1280px){
  header nav{ width: 92%; }
  .hero-grid{ grid-template-columns: 1fr; gap: 28px; }
  .contenedor_Dos,
  .c_colapse,
  .boxpres_content{ grid-template-columns: repeat(2,1fr); }
  .contact{ grid-template-columns: 1fr 1fr; }
  .redcontact{ grid-template-columns: 1fr 1fr; }
}

/* ---------- <= 1024px: tablet y laptops pequeñas ---------- */
@media (max-width: 1024px){
  header nav ul li{ width: auto; }
  header nav ul li a{ font-size: 1rem; padding: 10px 8px; }
  .hero-grid{ grid-template-columns: 1fr; }
  .hero-stats{ grid-template-columns: repeat(2,1fr); }
  .contenedor_Dos,
  .c_colapse,
  .boxpres_content{ grid-template-columns: 1fr 1fr; }
  .contact{ grid-template-columns: 1fr; }
  .redcontact{ grid-template-columns: 1fr; }
  .Baner_p{ height: 70vh; }
  .descripcion{ max-width: 96%; transform: skewY(-8deg); }
  .chatbot-box{ width: 340px; height: 480px; right: 16px; bottom: 16px; }
  .boxpres{ height: 860px; }
}

/* ---------- <= 900px: móvil avanzado + off-canvas nav ---------- */
@media (max-width: 1000px){
  /* Menú off-canvas: usar JS para alternar .open en este <ul> */
  header #menu-overlay{
    position: fixed;
    background: rgba(0,0,0,0.5);
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    visibility:hidden;
  }
  header .logo{
    background: #fff;
  }
  #navbar{
    position: fixed;
    top: 0px;
    right: -100%;
    bottom: -100%;
    background: transparent;
    z-index: -1;
    width: 60%;
    height: 100vh;
    display: none;
    transition: 0.5s;
    background: #222222;
  }
  #navbar.active{
    display: flex;
    top: 0px;
    right: 0px;
    bottom: 0px;
    overflow-y: scroll;
    transition: all 0.5s ease;
  }
  header #menu-overlay.letact{
    visibility: visible;
    opacity: 1;
  }
  #navbar ul{
    position: relative;
    width: 100%;
    grid-template-columns: 1fr; 
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    overflow-y: scroll;
    transition: all 0.5s ease;
  }
  #navbar ul li{
    width: 100%;
    text-align: left;
    padding: 12px 15px;
  }
  #navbar ul li a{
    cursor: pointer;
    color: #a1a1a1;
    border-bottom: 1px solid #444;
  }
  #navbar ul li a:hover{
    border-bottom: 1px solid #444;
    border-radius: 0;
  }

  #navbar ul li a .plus, header #navbar ul li ul .su-menu-new a .plusmas{
    position: absolute;
    right: 2%;
    display: inline-block;
  }
  header #navbar ul li ul .su-menu-new a{
    transition: 0.5s;
    color: #fff;
    text-align: left;
  }
  header #navbar ul li ul .su-menu-new a:hover{
    transition: 0.5s;
    color: #03e1f9;
  }
  #navbar ul .navblock  a .plus::after{
    transform: translate(-50%,-50%) rotate(0deg);
    background-color: #e91e63;
  }
  #navbar ul .navblock a{
    color: #e91e63;
    margin-bottom: 5%;
  }
  #navbar ul li ul{
    position: relative;
    margin: auto;
    width: 95%;
    box-sizing: border-box;
    background: #555;
    word-wrap: break-word;
    transform: translateY(0px);
    visibility: visible;
    max-height:0;
    overflow: hidden;
    display: block;
    background: transparent;
    border-bottom: 0;
    box-shadow: 0px 0px 3px 0px #e91e63;
    bottom: 15px;
    overflow-y: scroll;
  }
  #navbar ul .navblock ul li ul{
    border-radius: 0;
    z-index: 1;
  }
  #navbar ul .navblock ul li{
    padding: 0;
  }
  #navbar ul .navblock ul li a{
    text-align: center;
    color: #03a1f1;
  }
  #navbar ul .navblock ul li a:hover{
    color: #ffcdff;
  }
  #navbar ul .haschild .sub-item-menu .su-menu-new .submenMenItem{
    position: relative;
    width: 90%;
    max-height:0;
    background: transparent;
    left: 0;
    box-sizing: border-box;
    display: block;
    box-shadow: 0px 0px 3px 0px #ffdf00;
    border-radius: 10px;
    overflow: hidden;
  }
  #navbar ul .haschild .sub-item-menu .su-menu-new.disflex a{
    color: #ffd700;
  }
  #navbar ul .haschild .sub-item-menu .su-menu-new .submenMenItem li a{
    color: #00ff00;
  }
  #navbar ul .haschild .sub-item-menu .su-menu-new .submenMenItem li a:hover{
    color: #ffcdff;
  }
  #navbar ul .haschild .sub-item-menu .su-menu-new.disflex a .plusmas::after{
    transform: translate(-50%,-50%) rotate(0deg);
    background-color: #e91e63;
  }
  .passAce input{
    color: var(--nav-color);
  }
  .passAce .btn_acces button{
    color: var(--nav-color);
  }
  /* Layouts 1 columna donde conviene */
  .hero,.hero_2,.servicios{
    padding: 5px;
  }
  .hero-grid,
  .contenedor_Dos,
  .c_colapse,
  .boxpres_content{
    width: 100%;
    grid-template-columns: 1fr; 
  }
  .hero-stats{grid-template-columns: 1fr;}
  .baner_cover,
  .baner_cover_1,
  .baner_cover_2{min-height: 56vh; padding: 5px; }
  .card{
    width: 93%;
    margin-top: 20px !important;
  }
  .baner-overlay{
    width: 100%;
  }
  .c_colapse{
    padding: 0px;
  }
  .cardservis{
    width: 100%;
  }
  .boxpres{
    width: min(94%, 380px);
    height: 780px;
    margin: 20px auto;
  }
  .hero-stats {
    width: 100%;
    box-shadow: var(--box-shadow);
    padding: 7px;
    border-radius: 15px;
    display: none !important;
    transition: 0.5s;
  }
  .hero-stats.active {
    display: block !important;
    transition: 0.5s;
  }
  .img-col{
    display: none;
  }
  .hero-stats{
    display: inline-block;
  }
  .hero-grid h1{
    font-size: 1.5rem;
    text-align: center;
  }
  .stat-icon i,.stat-icon span{
    font-size: 1.5rem;
  }
  .stas b{
    text-align: center;
  }
  p,b{
    font-size: var(--btn-font-size);
  }

  .item_sec{
    font-size: .7rem !important;
  }
  .open_responsive{
    display: flex;
  }
  .chatbot-box{
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    z-index: 90000000 !important;
    border-radius: 0;
  }
  .chatbot .chatbox{
    height: 100vh;
  }
  .compare{
    width: 100%;
    overflow-x: scroll;
  }
  .compare table{
    width: 100%;
    padding-bottom: 15px;
  }
  .bximg{
    height: 1000px;
  }
  .redcontact .card-body ul li span{
    font-size: 1rem;
  }
  .redcontact .card-body:last-child{
    padding: 0px !important;
  }
  .redcontact .card-body small{
    display: none;
  }
  .map_vid_laps{
    grid-template-columns: 1fr;
  }
  .mapvid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .testimonios{
    width: 100%;
  }
}

@media (max-width: 768px) {
  .mapbox iframe,
  .videpage video {
    min-height: 280px;
  }
}