/*======================= GENERAL ========================*/
html {
  scroll-behavior: smooth;
}

body {
margin: 0;
background: #f5f5f5;
font-family: "Roboto", sans-serif;
color:#0D1F35;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  display: block;
}

/*SUB TITLES*/
h2{
    text-align: center;
    margin: 50px 0px;
}

/*NAV BAR*/
nav {
  background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 100px;
    list-style: none;
    position: sticky;
    top: 0;
    z-index: 1000;

   box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

nav ul {
  margin: 0;
  padding: 5px;
}

.logo img{
  width: 90px;
}

.menu {
  display: flex;
  gap: 20px;
  list-style: none;
}

.menu a {
  position: relative;
  text-decoration: none;
  color:#0D1F35;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: #0D1F35;
  transition: width 0.3s ease;
}

.menu a:hover::after {
  width: 100%;
}

/*======================= GALLERY ========================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  padding: 20px;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  padding: 0 15px;
  padding-bottom: 80px;
}

.gallery-item {
  position: relative;
  width: calc(25% - 20px);
  height: auto;
  margin: 10px;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.gallery-item:hover {
  transform: scale(1.1);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}


.modal-content {
  width: auto;
  height: auto;
  max-width: 90vw;    
  max-height: 85vh;   
  object-fit: contain; 
  display: block;
  margin: auto;
}

@keyframes zoomIn {
  from {transform: scale(0.6);}
  to {transform: scale(1);}
}

.modal.show {
  display: flex;
  opacity: 1;
}


.close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #ffffff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s;
}

.caption {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
  color: #ffffff;
  font-size: 24px;
}

@media screen and (max-width: 768px) {
  .gallery-item {
    width: calc(50% - 20px);
  }
}

@media screen and (max-width: 480px) {
  .gallery-item {
    width: calc(100% - 20px);
  }
}

/*==========RESPONSIVE NAV BAR MOBIL==========*/
/* MENU HAMBURGUESA*/
.hamburger {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/*Phone*/
@media (max-width: 768px) {

  nav {
    padding: 10px 20px;
  }

  .hamburger {
    display: block;
  }

  .menu {
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    background: #f5f5f5;

    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;

    display: none;
  }

  
  .menu.active {
    display: flex;
  }
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  background: #0D5EC1;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

.btn:hover {
  background: #0D1F35;
}


button {
  padding: 12px;
  background: #0A4389;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

button a{
  text-decoration: none;
  color: white;
}

button:hover {
  background: #0D1F35;
}

/*=================== HERO SECTION ================*/
#inicio {
  position: relative;
  height: 100vh;
  overflow: hidden;
}


#inicio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.cont-hero-inf {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  z-index: 2;
  color: white;
  text-align: center;
}

.cont-hero-inf p {
  padding: 20px 0;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(13, 31, 53, 0.5); 
  z-index: 1;
}

.cont-hero-inf h1{
  font-size: 3rem;
  font-weight: 800;
}

.cont-hero-inf p{
  font-size: 1.2rem;
}

/*==================RESPONSIVE MOVIL==============*/
@media (max-width: 768px) {

  #inicio {
    height: auto; 
  }

  #inicio img {
    height: 100vh;
  }

  .cont-hero-inf {
    width: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0 10px;
  }

  .cont-hero-inf h1 {
    font-size: 1.8rem; 
    line-height: 1.3;
  }

  .cont-hero-inf p {
    font-size: 1rem;
    margin-top: 10px;
  }

  .cont-hero-inf button {
    margin-top: 15px;
    width: 100%;
    max-width: 250px;
  }
}

/*==================================== SERVICES SECTION ===============================*/

/*===================TARJETAS=============*/
.container-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1000px;  
    margin: 0 auto;
}

.container .card .icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background: #2c73df;
}

.container .card .icon img {
    width: 100%;
    }

.container .card .icon .fa {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: #fff;
}

.container .card .slide {
    transition: 0.5s;
}

.container .card .slide.slide1 {
    height: 140px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    transition: .7s;
    transform: translateY(60px);
}

.container .card:hover .slide.slide1{
    transform: translateY(0px);
}

.container .card .slide.slide2 {
    height: 140px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    transition: .8s;
    transform: translateY(-63px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.container .card:hover .slide.slide2{
    transform: translateY(20px);
}


.container .card .slide.slide2 .content li {
    list-style: none;
    position: relative;
    padding-left: 15px;
    color: #414141;
}

.container .card .slide.slide2 .content li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: #0D1F35; 
}

/*===============RESPOSIVE MOBIL===============*/
@media (max-width: 768px) {

 
  .container-cards {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .container .card {
    display: flex;
    flex-direction: column;
  }

  
  .container .card .slide {
    transform: translateY(0) !important;
  }

 
  .container .card .slide.slide1 {
    height: 180px;
  }

  .container .card .icon {
    position: relative;
    height: 100%;
  }

  .container .card .icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  
  .container .card .slide.slide2 {
    height: auto;
    padding: 15px;
    box-shadow: none;
  }


  .container .card .slide.slide2 .content li {
    font-size: 14px;
  }

}


/*=================== TOOLS AND MACHINES SECTION =============*/
.machines {
  margin-top: 50px;
}

.table-machines {
    background-color: #E4E4E4;
    width: 100%;
    max-width: 600px;  
    padding: 40px;
    display: flex;
    border-radius: 10px;
    justify-content: space-between;
    margin: 0 auto;
}

.cont-machines li{
  list-style: none;
}

.cont-machines ul {
  display: flex;
  flex-direction: column;
  gap: 10px; 
}


/*===============RESPOSIVE MOBIL===============*/
@media (max-width: 768px) {
.table-machines {
  flex-direction: column;
  width: 320px;
}
}


/*=================== CARRUSEL LOGOS SECTION =============*/
.carousel > * {
  flex: 0 0 100%;
}

.carousel:hover .group {
  animation-play-state: paused;
}
.carousel {
  display: flex;
  overflow: hidden;
  width: 100%;
}

  .logo-company {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

  .group {
    display: flex;
    gap: 20px;
    padding-right: 20px;
    animation: scrolling 40s linear infinite;
  }

  .group .logo-company img{
    width: 200px;
  }

@keyframes scrolling {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/*===============RESPOSIVE MOBIL===============*/
@media (max-width: 768px) {

  .carousel {
    display: block;
    overflow: visible;
  }

  .group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;

    animation: none; 
    padding: 0;
  }

  .logo-company {
    padding: 10px;
  }

  .logo-company img {
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
    display: block;
  }

    .carousel .group:last-child {
    display: none;
  }

}

/*=================== US SECTION =============*/

/* SECCIÓN */
#nosotros {
  background: url("../img/nosotros.webp") center/cover no-repeat;
  margin-top: 50px;
}

.cont-us h2{
  margin: 0;
}

/* CONTENT */
.cont-us {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  height: 500px;
}

.cont-text-us {
  background: rgba(255, 255, 255, 0.83);
  max-width: 500px;
  padding: 30px;

  border-radius: 0 20px 20px 0;

  position: absolute;  
  top: 50%;            
  left: 0;             
  transform: translateY(-50%); 
}

/* TEXT */
.cont-text-us p {
  margin-bottom: 15px;
  color: #0D1F35;
}



/*===============RESPOSIVE MOBIL===============*/
@media (max-width: 768px) {

  #nosotros {
    background: none; 
  }

  .cont-us {
    display: flex;
    flex-direction: column; 
    height: auto;
    padding: 0 20px;
  }

  .cont-us::before {
    content: "";
    width: 100%;
    height: 250px;
    background: url("../img/nosotros.webp") center/cover no-repeat;
    border-radius: 10px;
    margin-bottom: 20px;
  }

  .cont-text-us {
    position: static; 
    transform: none;
    max-width: 100%;
    border-radius: 10px; 
    padding: 20px;
  }

 
  .cont-text-us p {
    font-size: 14px;
    line-height: 1.5;
  }
}

/*=================== GALLERY SECTION =============*/
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery .img-gallery {
  text-align: center;
}

.gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 1;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.gallery img:hover {
  opacity: 0.6;
}

.img-gallery a {
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
  color: black;
  position: relative;
}

.img-gallery a:hover::after {
  width: 100%;
}

.img-gallery p {
  margin-top: 10px;
  color: #0D1F35;
  font-weight: 500;
}


/*===============RESPOSIVE MOBIL===============*/
@media (max-width: 768px) {

  .gallery {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  
  .gallery img {
    height: 220px;
  }

 
  .img-gallery {
    position: relative;
    overflow: hidden;
  }

  .img-gallery::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(200, 200, 200, 0.4);
    opacity: 0;
    transition: 0.3s;
    z-index: 1;
  }

  .img-gallery:active::before {
    opacity: 1;
  }

  .img-gallery a {
    position: relative;
    z-index: 2;
    display: block;
    margin-top: 10px;
    text-align: center;
  }

  .img-gallery a::after {
    display: none;
  }
}


/*================== FORMULLARY SECTION =============*/

.contacto {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: auto;
}

.formulario {
  background: white;
  padding: 50px;
  border-radius: 12px;
  width: 420px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.formulario h3 {
  text-align: center;
  margin-bottom: 20px;
}

.grupo {
  position: relative;
  margin-bottom: 20px;
}

.grupo input,
.grupo textarea {
  width: 100%;
  padding: 10px;
  border: none;
  border-bottom: 2px solid #ccc;
  outline: none;
  font-size: 14px;
  background: transparent;
}

.grupo label {
  position: absolute;
  top: 10px;
  left: 0;
  color: #999;
  font-size: 14px;
  transition: 0.3s;
  pointer-events: none;
}

/* Animación */
.grupo input:focus + label,
.grupo input:valid + label,
.grupo textarea:focus + label,
.grupo textarea:valid + label {
  top: -12px;
  font-size: 12px;
  color: #2c73df;
}

/*===============RESPOSIVE MOBIL===============*/
@media (max-width: 768px) {
.contact-section {
  flex-direction: column;
  padding: 20px;
}

.formulario{
  width: 320px;
}
}


/*================== CONTACT SECTION =============*/
.contact-section {
    display: flex;
    gap: 50px;
    padding-bottom: 50px;

    max-width: 1200px;
    margin: 0 auto;

    align-items: flex-start;
    justify-content: center;
}

.date{
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-section p{
    margin-top: 0px;
}

.contact-dates {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/*===============RESPOSIVE MOBIL===============*/
@media (max-width: 768px) {
  .contact-dates {
    display: none;
  }
}

/*==================FOOTER=============*/
footer{
     background: #E4E4E4;
     padding: 20px 60px;
}

.cont-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    color: #0D1F35;
}

.copyright {
    margin: 0;
    color: #0D1F35;
    text-align: center;
}

.cont-footer .footer-img img{
  width: 200px;
}

.copyright {
  margin-top: 20px;
  font-size: 0.8rem;
}

/*=================== RESPONSIVE ===================*/
@media (max-width: 600px) {

  footer {
    padding: 20px;
  }

  .cont-footer {
    grid-template-columns: 1fr;
  }
 
  .cont-footer .footer-img img {
    width: 150px;
    margin: 0 auto;
  }

}