html {
  scroll-padding-top: 146px; /* Adjust this value to match your navbar height */
}

body, html {
  height: 100%;
  margin: 0;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  color: #777;
  scroll-behavior: smooth;
}

.bgimg-1, .bgimg-2, .bgimg-3 {
  position: relative;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.bgimg-1 {
  background-image: url("../background1.jpg");
  min-height: 100%;
}

.bgimg-2 {
  background-image: url("../background2.jpg");
  min-height: 70%;
}

.bgimg-3 {
  background-image: url("../background3.jpg");
  min-height: 70%;
}

.header {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: center;
  color: #ffffff;
  font-size: xx-large;
}

.caption {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  text-align: center;
  color: #ffffff;
}

.caption span.border {
  background-color: #111;
  color: #fff;
  padding: 18px;
  font-size: 25px;
  /*letter-spacing: 10px;*/
}

h2 {
  text-transform: uppercase;
  font: 35px "Lato", sans-serif;
  font-weight: bolder;
  color: #ffffff;
}

h3 {
  letter-spacing: 5px;
  text-transform: uppercase;
  font: 20px "Lato", sans-serif;
  color: #ffffff;
}

.scroll-container {
  overflow: hidden; /* Hide the scrollbars */
  position: relative;
}

.scroll-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto; /* Keep the scrolling functionality */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
  pointer-events: none; /* Prevent interaction with the pseudo-element */
}

.scroll-container::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, and Edge */
}

.scroll-container {
  -ms-overflow-style: none; /* For Internet Explorer and Edge */
  scrollbar-width: none; /* For Firefox */
}


div.scroll-container {
  /*background-color: #333;*/
  overflow: auto;
  white-space: nowrap;
  padding: 10px;
  
}

div.scroll-container img {
  padding: 10px;
  max-height: 150px;
  transition: transform 0.3s ease;
}

.grid-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.grid-item {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding-left: 20px;
  padding-right: 20px;
  align-items: center;
}

#proyectos {
  color: #777;
  background-color:white;
  text-align:center;
  text-align: justify;
}

.scroll-container {
  overflow: hidden;
  position: relative;
  display: flex;
  gap: 10px;
  padding: 10px;
}

.scroll-container img {
  max-height: 150px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.image-wrapper {
  position: relative;
  text-align: center;
}

.image-caption {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 5px;
}

.container input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 16px;
  resize: vertical;
}

input[type=submit] {
  background-color: #008cff;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

input[type=submit]:hover {
  background-color: #8fc5ff;
}

.container {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 20px;
  position: relative;
}

.container label {
  color: black;
  float: left;
}

/* Container for the autocomplete items */
.autocomplete {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Autocomplete items container */
.autocomplete-items {
  position: absolute;
  border: 1px solid #d4d4d4;
  border-top: none;
  z-index: 1000; /* Increased z-index */
  top: calc(100% - 1px); /* Align perfectly with input */
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Optional: adds depth */
}

/* Individual autocomplete item */
.autocomplete-items div {
  padding: 10px;
  cursor: pointer;
  background-color: #fff;
  border-bottom: 1px solid #d4d4d4;
  text-align: left;
  color: black;
}

/* Hover state */
.autocomplete-items div:hover {
  background-color: #e9e9e9; 
}

/* Active suggestion */
.autocomplete-active {
  background-color: #008cff !important; 
  color: #ffffff !important; 
}

.autocomplete-items div:hover,
.autocomplete-active {
  background-color: #008cff !important;
  color: #ffffff !important;
}

/* Add this to ensure proper stacking */
.container {
  position: relative;
}

/* Add to landing.css */
input[type="text"]#ciudad {
  /* Disable WebKit/Blink browsers' autocomplete UI */
  -webkit-appearance: none;
  /* For Firefox */
  -moz-appearance: none;
}

.rotate-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* ensures square grid */
  overflow: hidden;
}

.gallery-item img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease-in-out;
}

.fadein {
  position:absolute;
  top:0px;
  left:50%;
  margin:auto;
}
.fadein img {
  position:absolute;
  left:-65px;
  top:0;
  -webkit-animation-name: fade;
  -webkit-animation-iteration-count: infinite;
  -webkit-animation-duration: 6s;
  animation-name: fade;
  animation-iteration-count: infinite;
  animation-duration: 6s;
}

@-webkit-keyframes fade {
  0% {opacity: 0;}
  20% {opacity: 1;}
  33% {opacity: 1;}
  53% {opacity: 0;}
  100% {opacity: 0;}
}
@keyframes fade {
  0% {opacity: 0;}
  20% {opacity: 1;}
  33% {opacity: 1;}
  53% {opacity: 0;}
  100% {opacity: 0;}
}

#f1 {
  background-color: lightblue;
}
#f2 {
  -webkit-animation-delay: -4s;
  background-color: yellow;
}
#f3 {
  -webkit-animation-delay: -2s;
  background-color: lightgreen;
}


/* -----------------------------codigo para hacer la pagina responsiva de escritorio---------------------------- */
@media screen and (min-width: 1051px) {

  .header {
    top: 40%;
  }

  .grid-container {
    flex-direction: row;
  }

  .grid-item {
    max-width: 30vw;
    padding-left: 20px;
    padding-right: 20px;
  }

  .grid-item img {
    padding: 10px;
    max-height: 200px;
    max-width: 435px;
  }

  #proyectos {
  padding:50px 80px;
  }

  .formulario-container {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
  }

  .formulario {
    display: flex;
    flex-direction: column;
    max-width: 30vw;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
    align-items: center;
  }

  .container form {
    max-width: 35vw;
  }

  video {
    width: 640px;
    height: 360px;
  }

}

/* -----------------------------codigo para hacer la pagina responsiva de celular---------------------------- */
@media screen and (max-width: 1050px) {

  .header {
    top: 30%;
  }

  h1 {
    font: size 1.5em;
  }

  h2 {
    font-size:7.5vw;
  }

  .bgimg-1, .bgimg-2, .bgimg-3 {
    background-attachment: scroll;
  }

  .grid-container {
    flex-direction: column;
  }

  .grid-item {
    padding-left: 5px;
    padding-right: 5px;
  }

  .grid-item img {
    padding: 10px;
    max-width: 70vw;
  }

  #proyectos {
    padding:50px 10px;
  }

  .formulario-container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
  }
  
  .formulario {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding-bottom: 25px;
  }

  .container form {
    max-width: 90vw;
  }

  /*.rotate-container {
    display: none;
  }*/

  video {
    width: 320px;
    height: 180px;
  }
}