/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

a {
  text-decoration: none;
  color: white;
}

li, ul {
  list-style: none;
}

/* Header base */
header {
  background-color: #1c1c1c;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: nowrap;
}

/* Logo */
header img {
  max-width: 200px;
  height: auto;
  z-index: 1100;
}

/* Navbar */
.nav-bar {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
}

.nav-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: left 0.4s ease;
}

.nav-link {
  transition: color 0.3s ease;
}
.nav-link:hover {
  color: dodgerblue;
}

.hamburger {
  display: none;
  cursor: pointer;
  z-index: 1100;
  background: none;
  border: none;
}
.bar {
  display: block;
  height: 3px;
  width: 25px;
  margin: 5px auto;
  background-color: white;
  transition: 0.3s ease;
  border-radius: 2px;
}

/* ANIMACIÓN HAMBURGER */
.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(50vh - 30px);
   flex-direction: column;
    background-color: #1c1c1c;
    text-align: center;
    padding-top: 40px;
    transition: left 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-item {
     margin: 16px 0;
  }
}

/* HERO */
.hero {
  background: url('https://digital-xen.com/proyectos/igei/new/uploads/proyectos/IGEI-104-IF01-2024.2.png')no-repeat center/cover;
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 44, 84, 0.7);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cta-button {
  display: inline-block;
  margin-top: 1rem;
  background-color: #f3ca24;
  color: #002c54;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}

.cta-button:hover {
  background-color: #e5ba10;
}

/* SECCIONES */
.section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: auto;
}

.section h2 {
  font-size: 2rem;
  color: #002c54;
  margin-bottom: 1.5rem;
  text-align: center;
}
.section h1 {
  font-size: 3rem;
  color: #c7922b;
  margin-bottom: 1.5rem;
  text-align: center;
}
/* QUIENES SOMOS */
.info-cards {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.info-card {
  background: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  flex: 1;
  min-width: 250px;
}

/* SERVICIOS */
.servicios-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.servicio-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.servicio-card:hover {
  transform: translateY(-5px);
}

.servicio-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.servicio-card h3 {
  color: #002c54;
  margin: 1rem;
}

.servicio-card p {
  margin: 0 1rem 1rem;
}

.lista-servicios {
  margin-top: 2rem;
  padding-left: 1.2rem;
}

.lista-servicios li {
  margin-bottom: 0.5rem;
  list-style: disc;
  color: #444;
}

/* PROYECTOS */
.carrusel {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.socio img {
  max-height: 80px;
  object-fit: contain;
  background: white;
  padding: 0.5rem;
  border-radius: 6px;
}

.carrusel-proyectos-wrapper {
  position: relative;
  overflow: hidden;
}

.carrusel-proyectos {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
}

.proyecto {
  flex: 0 0 300px;
  scroll-snap-align: start;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.proyecto img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.overlay {
  padding: 1rem;
  background-color: white;
}

.carrusel-controles {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.carrusel-controles button {
  background: #002c54;
  color: white;
  border: none;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  border-radius: 5px;
  cursor: pointer;
}

.carrusel-controles button:hover {
  background-color: #014377;
}

.section.contacto {
  padding: 50px 20px;
  background-color: #f9f9f9;
}

.contacto-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  align-items: flex-start;
}

.contacto-info {
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-box {
  background: #c7922b;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  text-align: center;
}

.info-box img {
  width: 40px;
  margin-bottom: 10px;
}

.info-box h3 {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 5px;
}

.info-box p {
  font-size: 14px;
  color: #ffffff;
}

.contacto-mapa-form {
  flex: 2 1 500px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.formulario-contacto {
  background:#306b49;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.formulario-contacto input,
.formulario-contacto textarea {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

.formulario-contacto button {
  margin-top: 15px;
  padding: 12px;
  background: #3b6eb5;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: fit-content;
}

.formulario-contacto button:hover {
  background: #2f5da4;
}


/* FOOTER */
footer {
  background-color: #002c54;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

footer img {
  max-width: 150px;
  margin-bottom: 1rem;
}

/* BOTÓN WHATSAPP */
#whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  width: 60px;
  height: 60px;
}

#whatsapp-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #f3ca24;
  color: #1c1c1c;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  z-index: 999;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#backToTop:hover {
  background-color: #d8b317;
  transform: scale(1.1);
}
