@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
}

:root {
  --bg-color: #001f54;
  --second-bg-color: #034078;
  --text-color: #1282a2;
  --main-color: #fefcfb;
}

html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background: var(--main-color);
  color: var(--second-bg-color);
}

/* Estilos del header */
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.logo img {
  max-width: 170px;
  width: calc(15vw + 8px);
  cursor: pointer;
}

.group-links {
  display: flex;
  gap: 3rem;
}

.navbar {
  display: flex;
  align-items: center;
}

.navbar a {
  font-size: 19px;
  line-height: 25px;
  color: var(--main-color);
  margin-left: 3rem;
  transition: .3s;
}

.navbar a:hover {
  color: var(--text-color);
}

.link-with-dropdown {
  position: relative;
}

.link-with-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown {
  position: absolute;
  top: calc(100% + 15px);
  left: 18%;
  width: auto;
  min-width: 330px;
  max-width: 1000px;
  background: var(--main-color); 
  /* border: 1px solid #fff; */
  box-shadow: 0 6px 18px rgba(30,40,50,0.08);
  z-index: 2000;
}

.dropdown ul {
  list-style: none;
}

.dropdown ul li {
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 14px;
  color: var(--second-bg-color);
}

#delegations-dropdown ul li {
  gap: 0.8rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  padding-left: 1.7rem;
}

.dropdown ul li:hover {
  background: var(--text-color);
  color: var(--main-color);
}

.dropdown a {
  color: inherit;
  text-decoration: none;
  display: block;
  margin-left: 0;
}

.dropdown a:hover {
  color: var(--main-color);
}

.btn {
  background-color: var(--main-color);
  color: var(--second-bg-color);
  font-family: "Nunito", Sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 25px;
  border-radius: 10px;
  padding: 5px 25px;
  cursor: pointer;
  transition: all .3s;
}

.btn:hover {
  background-color: var(--text-color);
  color: var(--main-color);
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--main-color);
  display: none;
}

/* Estilos del hero */
.hero {
  min-height: 100vh;
  padding: 40px 100px 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  background-color: var(--bg-color);
}

.hero .text-hero {
  display: flex;
  flex-direction: column;
  gap: 25px;
  color: var(--main-color);
}

.hero .text-hero h6 {
  font-size: 16px;
  font-weight: 600;
}

.hero .text-hero h1 {
  margin-top: -14px;
  font-size: 60px;
  line-height: 1.1em;
  font-weight: 500;
}

.hero .text-hero p {
  line-height: 1.7em;
  font-weight: 500;
}

.form {
  width: 90%;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.form div {
  width: 100%;
  position: relative;
}

.form input {
  width: 100%;
  background-color: var(--main-color);
  color: var(--text-color);
  padding: 15px 20px;
  font-size: 18px;
  border: solid 2px var(--text-color);
  border-radius: 12px;
}

.form input::placeholder {
  color: var(--text-color); 
  opacity: 0.6;
}

.form input:focus { 
  border-color: var(--text-color); 
  outline: 1px solid var(--text-color);
}

.form button {
  background-color: var(--text-color);
  color: var(--main-color);
  padding: 17px 20px;
  font-size: 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: all .3s;
}

.form button:hover {
  outline: 2px solid #1282a2;
  background-color: var(--main-color);
  color: var(--text-color);
}

.message {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.2;
  padding: 8px 10px;
  border-radius: 8px;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.06);
  border: 1px solid rgba(231, 76, 60, 0.18);
  width: 100%;
  box-sizing: border-box;
  transition: opacity .25s ease, transform .25s ease;
  opacity: 0;
  transform: translateY(-4px);
}

.message.show {
  opacity: 1;
  transform: translateY(0);
}

.message.alert-message {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.06);
  border-color: rgba(231, 76, 60, 0.18);
}

.hero .img-hero {
  width: 70%;
}

.hero .img-hero img {
  width: 100%;
  animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2.4rem);
  }
  100% {
    transform: translateY(0);
  }
}



/* Media queries */
@media (max-width: 991px) {
  .header {
    padding: 18px 3%;
  }
}

@media (max-width: 768px) {
  #menu-icon {
    display: block;
    font-size: 32px;
  }

  .logo img {
    width: 140px
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--main-color);
    border-top: .1rem solid rgba(0, 0, 0, .2);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
    
    
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: max-height .36s cubic-bezier(.2,.9,.2,1),
                opacity .24s ease,
                transform .28s ease;
    display: flex;
    flex-direction: column;
  }

  .navbar.active {
    height: auto;
    max-height: 598.31px;
    opacity: 1;
    transform: translateY(0);
    padding: 0;
  }

  .navbar.active a,
  .link-with-dropdown {
    width: 100%;
  }

  .navbar a {
    display: block;
    font-size: 18px;
    color: var(--second-bg-color);
    padding: 15px 20px;
    margin: 0;
  }

  .navbar a:hover {
    background-color: var(--text-color);
    color: var(--main-color);
  }

  .navbar .link-with-dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  /* Hacer que el dropdown quede dentro del flujo (no absoluto) */
  .navbar .link-with-dropdown .dropdown {
    position: static;
    width: 100%;
    background: transparent;
    box-shadow: none;
    z-index: 1;
  }

  #delegations-dropdown ul li {
    padding: 0.1rem 1.7rem;
  }

  /* Asegurar que elementos con atributo hidden sigan ocultos */
  .navbar .link-with-dropdown .dropdown[hidden] {
    display: none !important;
  }

  .hero {
    padding: 120px 20px 50px 20px;
    flex-direction: column;
  }

  .hero .text-hero {
    gap: 15px;
  }

  .hero .text-hero h6 {
    font-size: 14px;
  }

  .hero .text-hero h1 {
    margin-top: -6px;
    font-size: 33px;
    line-height: 1.2em;
  }

  .hero .text-hero p {
    font-size: 16px;
    font-weight: 300;
  }

  .form {
    width: 100%;
  }

  .form input {
    padding: 10px;
    font-size: 16px;
  }

  .form button {
    padding: 12px;
    font-size: 16px;
  }

  .hero .img-hero {
    width: 85%;
  }
}