/* =========================================================
  ECISA - MOBILE CSS
  Archivo de estilos responsive para tablets y celulares.
========================================================= */

@media (max-width: 1120px) {
  .container {
    width: min(100% - 42px, var(--container));
  }

  .header-inner {
    gap: 22px;
  }

  .main-nav {
    gap: 18px;
  }

  .main-nav a {
    font-size: 13px;
  }

  .header-cta {
    min-width: 190px;
  }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    gap: 32px;
  }
}

@media (max-width: 960px) {
  body.nav-open {
    overflow: hidden;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    height: 78px;
  }

  .brand-title {
    font-size: 36px;
  }

  .brand small {
    font-size: 8px;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    cursor: pointer;
  }

  .nav-toggle span {
    width: 21px;
    height: 2px;
    display: block;
    margin-inline: auto;
    border-radius: 99px;
    background: #fff;
    transition: transform .25s ease, opacity .25s ease;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .main-nav {
    position: fixed;
    inset: 78px 0 auto 0;
    display: grid;
    gap: 0;
    padding: 20px;
    background: linear-gradient(180deg, var(--navy-950), var(--navy-800));
    border-top: 1px solid rgba(255,255,255,.12);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s ease, opacity .25s ease, visibility .25s ease;
    margin: 0;
  }

  body.nav-open .main-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav a {
    padding: 15px 4px;
    border-bottom: 1px solid rgba(255,255,255,.10);
  }

  .main-nav a::after {
    display: none;
  }

  .nav-dropdown {
    display: grid;
    align-items: stretch;
  }

  .nav-dropdown-toggle {
    justify-content: flex-start;
  }

  .nav-dropdown-menu {
    position: static;
    display: grid;
    min-width: 0;
    padding: 0 0 8px 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .nav-dropdown-menu a {
    padding: 10px 14px;
    color: rgba(255,255,255,.82);
    font-size: 13px;
    font-weight: 700;
    border-bottom: 0;
    border-left: 1px solid rgba(255,255,255,.16);
    border-radius: 0;
    white-space: normal;
  }

  .nav-dropdown-menu a:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
  }

  .header-cta {
    display: none;
  }

  .hero {
    padding: 40px 0 22px;
  }

  .hero.section-soft {
    background:
      linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.90) 52%, rgba(255,255,255,.56) 76%, rgba(255,255,255,.24) 100%),
      linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.82) 100%),
      url(../img/hero/hero-image.webp) right top / auto 100% no-repeat,
      linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 36px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 8vw, 54px);
    max-width: 780px;
    text-shadow: none;
  }

  .hero-copy p {
    max-width: 720px;
    color: #233956;
    text-shadow: none;
  }

  .hero-media {
    height: 440px;
  }

  .metrics-card {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-item:nth-child(2) {
    border-right: 0;
  }

  .metric-item:nth-child(1),
  .metric-item:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .why-grid,
  .sectors-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .sectors-row {
    border: 0;
    gap: 12px;
    background: transparent;
  }

  .sector-item {
    min-height: 62px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .cta-inner,
  .cta-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-inner {
    padding: 30px 0;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .contact-modal {
    padding: 12px;
  }

  .contact-modal-dialog {
    max-height: calc(100vh - 24px);
    padding: 26px 20px 22px;
  }

  .contact-modal .ambiental-form {
    grid-template-columns: 1fr;
  }

  .contact-modal .ambiental-form label,
  .contact-modal .ambiental-form button {
    grid-column: 1;
  }
  .container {
    width: min(100% - 28px, var(--container));
  }

  .hero-copy h1 {
    font-size: 37px;
    letter-spacing: -1.4px;
    max-width: 420px;
  }

  .hero-copy p {
    font-size: 16px;
    max-width: 410px;
  }

  .hero.section-soft {
    background:
      linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.90) 58%, rgba(255,255,255,.68) 100%),
      linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.88) 54%, rgba(255,255,255,.46) 100%),
      url(../img/hero/hero-image.webp) right top / auto 100% no-repeat,
      linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding-bottom: 28px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-media {
    height: 405px;
  }

  .photo-main {
    left: 0;
    width: 62%;
  }

  .photo-top,
  .photo-middle,
  .photo-bottom {
    width: 47%;
  }

  .metrics-card {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
  }

  .metrics-card::-webkit-scrollbar {
    display: none;
  }

  .service-grid,
  .why-grid,
  .sectors-row {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 18px;
  }

  .service-grid::-webkit-scrollbar,
  .why-grid::-webkit-scrollbar,
  .sectors-row::-webkit-scrollbar {
    display: none;
  }

  .metric-item,
  .metric-item:nth-child(1),
  .metric-item:nth-child(2),
  .metric-item.last {
    flex: 0 0 100%;
    width: 100%;
    min-height: 150px;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    border-right: 0;
    border-bottom: 0;
  }

  .service-card,
  .why-card,
  .sector-item {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .service-card {
    min-height: 255px;
    padding: 32px 24px 28px;
    text-align: center;
  }

  .service-card .line-icon {
    justify-content: center;
  }

  .service-card p {
    padding-right: 0;
  }

  .service-card a {
    position: relative;
    right: auto;
    bottom: auto;
    display: inline-flex;
    justify-content: center;
    margin: 18px auto 0;
  }

  .sector-item {
    min-height: 104px;
    padding: 28px 22px;
  }

  .clients-carousel__track {
    grid-auto-columns: 176px;
    grid-template-rows: repeat(2, 100px);
    gap: 14px;
  }

  .client-logo-card {
    height: 100px;
    padding: 14px 18px;
  }

  .client-logo-card img {
    max-width: 136px;
    max-height: 60px;
  }

  .section-heading span,
  .section-heading h2 {
    font-size: 12px;
    letter-spacing: .19em;
  }

  .why-card {
    align-items: center;
    justify-content: center;
  }

  .cta-copy {
    align-items: center;
    gap: 18px;
    text-align: center;
  }

  .cta-inner,
  .cta-actions {
    align-items: center;
    text-align: center;
  }

  .cta-actions {
    width: 100%;
  }

  .cta-icon {
    width: 56px;
    height: 56px;
    font-size: 26px;
  }

  .cta-copy h2 {
    font-size: 28px;
    text-align: left;
  }
  .cta-copy p {
    font-size: 12px;
    text-align: left;
  }

  .cta-contact {
    flex-direction: column;
    align-items: center;
    gap: 9px;
    width: 100%;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
  }

  .cta-contact i {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 28px;
  }

  .footer-brand,
  .footer-col {
    align-items: center;
  }

  .footer-brand p {
    margin-inline: auto;
  }

  .socials {
    justify-content: center;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 0;
  }
}

@media (max-width: 430px) {
	.site-header a.brand img{
		    width: 100px;
	}
	
  .hero.section-soft {
    background:
      linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.90) 58%, rgba(255,255,255,.70) 100%),
      linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.88) 54%, rgba(255,255,255,.48) 100%),
      url(../img/hero/hero-image.webp) right top / auto 100% no-repeat,
      linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding-bottom: 24px;
  }
	
  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-media {
    height: 350px;
  }

  .photo-placeholder figcaption {
    font-size: 13px;
  }

  .photo-placeholder small {
    display: none;
  }

  .metric-item {
    padding: 24px 20px;
  }

  .cta-actions .btn{
        width: 100%;
        padding: 20px 20px;
        font-size: 16px;
    }
  .site-footer a.brand img{
	 margin: 0 auto;
  }
}
