/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background: #fefefe;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  max-width: 1200px;
  margin: auto;
}

.hero img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ENCABEZADO */
header {
  background: #c65603;
  color: white;
  padding: 1rem 2rem;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  cursor: default;
   display: flex;
  justify-content: center;
  align-items: center;
}

.logo img{
  width: 120px;
}

/* MENÚ PRINCIPAL */
.main-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  padding: 0;
  margin: 0;
}

.main-menu > li {
  position: relative;
}

.main-menu a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0;
  display: inline-block;
  transition: color 0.3s ease;
}

.main-menu a:hover {
  color: #f9a825;
  text-shadow: 0 0 5px #f9a825;
  cursor: pointer;
}

/* SUBMENÚ */
.menu-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  flex-direction: column;
  background-color: #333;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  width: 180px;
  z-index: 1000;
  transition: max-height 0.35s ease, opacity 0.35s ease;
}

.menu-submenu.active {
  display: flex;
  max-height: 500px;
  opacity: 1;
}

.menu-submenu li {
  border-bottom: 1px solid #444;
}

.menu-submenu li:last-child {
  border-bottom: none;
}

.menu-submenu li a {
  color: #ddd;
  padding: 0.7rem 1rem;
  display: block;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.menu-submenu li a:hover {
  background-color: #f9a825;
  color: #222;
}

.lang-switch a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid white;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.lang-switch a:hover {
  background-color: #f9a825;
  color: #222;
}

main {
  flex-grow: 1;
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: #222;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #444;
}

p {
  text-align: justify;
}

.sub-menu ul,
.sub-menu ul li a {
  display: none;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.project-item {
  background: white;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.project-item p {
  margin-bottom: 0.8rem;
}

/* CARRUSEL */
.carousel {
  position: relative;
  max-width: 100%;
  margin-top: 1rem;
  border-radius: 10px;
  overflow: hidden;
}

.carousel-slides {
  position: relative;
  width: 100%;
  /*max-width: 1900px;*/
  margin: auto;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.carousel-slides .slide {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.carousel-slides .slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

.carousel .carousel-slides .slide img,
.carousel .carousel-slides .slide iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.carousel .prev,
.carousel .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(41, 41, 41, 0.6);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.2rem 0.8rem;
  cursor: pointer;
  border-radius: 50%;
  user-select: none;
  transition: background-color 0.3s ease;
  z-index: 100;
}

.prev:hover,
.next:hover {
  background-color: #f9a825;
  color: #222;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

footer {
  background: #c65603;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
}

footer .mail {
  color: #cfefdc;
  text-decoration: none;
  font-size: 1.2rem;
}

footer .mail:hover {
  color: #d2bcc6;
}

form {
  width: 500 px:;

}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 1001;
}


@media (max-width: 1368px) {
  .main-menu {
    flex-direction: column;
    gap: 1rem;
  }

  .menu-submenu {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    border-radius: 0;
    background: #c65603;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.35s ease;
    display: none;
  }

  .menu-submenu.active {
    display: flex;
    max-height: 1000px;
    opacity: 1;
  }

  .menu-submenu li a {
    color: #222;
    background: #c65603;
  }

  .top-bar {
    flex-direction: column;
    gap: 1rem;
  }

  .projects-list {
    grid-template-columns: 1fr;
  }

  .carousel-slides {
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }

  .carousel .carousel-slides .slide img,
  .carousel .carousel-slides .slide iframe {
    max-width: 100%;
    max-height: 100%;
  }
    .menu-toggle {
    display: block;
    position: absolute;
    top: 1rem;
    left: 1rem;
  }

  .main-menu-container {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #222;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1000;
    padding-top: 4rem;
  }

  .main-menu-container.open {
    left: 0;
  }

  .main-menu {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .main-menu a {
    color: white;
    font-size: 1.2rem;
  }
}

/* Estilo general del formulario */
.contact-form {
  max-width: 1000px;
  margin: 40px auto;
  background: #c65603;
  /*background-color: #ffffff;*/
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Encabezado del formulario */
.contact-form h2 {
  font-size: 35px;
  margin-bottom: 20px;
  color: #ffffff;
  text-align: center;
}

/* Etiquetas */
.contact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #ffffff;
}

/* Campos de entrada y textarea */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #1e90ff;
  box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.2);
  outline: none;
}

/* Botón */
.contact-form button {
  display: block;
  width: 100%;
  padding: 14px;
  background: #1e90ff;
  color: #fff;
  font-size: 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.contact-form button:hover {
  background: #1c86ee;
  transform: scale(1.02);
}

/* Responsive */
@media (max-width: 600px) {
  .contact-form {
    padding: 20px;
  }
}


@media (min-width: 1600px) {
  .carousel-slides {
    /*max-width: 2200px;*/
    aspect-ratio: 16 / 9;
  }

  .carousel .carousel-slides .slide img,
  .carousel .carousel-slides .slide iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}
.mensaje-exito, .mensaje-error {
    position: relative;
    padding: 1rem 3rem 1rem 1rem;
    margin: 1rem auto;
    border-radius: 8px;
    font-weight: bold;
    max-width: 600px;
    text-align: center;
    animation: fadeOut 5s ease-in-out forwards;
    animation-delay: 2s;
    opacity: 1;
}

.mensaje-exito {
    background-color: #e6ffed;
    color: #1a7f37;
    border: 1px solid #a2f5bf;
}

.mensaje-error {
    background-color: #ffe6e6;
    color: #cc0000;
    border: 1px solid #ffb3b3;
}

.cerrar {
    position: absolute;
    top: 8px;
    right: 12px;
    color: #555;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cerrar:hover {
    color: #000;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
        height: 0;
        margin: 0;
        padding: 0;
    }
}
