:root {
  --primary: #AC965A;
  --primary-transparent: rgba(172,150,90,0.5);
  --secondary: #202C56;
  --secondary-dark: #151C38;
  --tertiary: #6A7EC8;
  --background: #f5f5f5;
  --background-secondary: #EEE9DD;
  --text-navbar: #DDD;
  --text-widget: #FFF;
  --text-body: #444;
  --text-footer: #aaa;
}

body {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  background: var(--background);
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

h1, h2, h3 {
  line-height: normal;
}

.content-padding-horizontal {
  padding-left: calc((100vw - 1100px)/2);
  padding-right: calc((100vw - 1100px)/2);
}

/* HEADER */

.header {
  width: 100%;
  height: 100px;
  display: flex;
  background-color: white;
}

.header-logo {
  width: 20%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-title {
  width: 80%;
  background-color: var(--primary);
  text-align: center;
}

.logo-img {
  display: block;
  max-width: 266px;
  width: 100%;
  max-height: 100px;
}

.header h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0px;
  text-align: center;
  text-transform: uppercase;
  font-size: 22px;
  font-weight: 600;
  font-style: normal;
  color: white;
}

.header-hamburger {
  display: none;
}

/* HAMBURGER */
.hamburger {
  display: none;
  position: absolute;
  flex-direction: column;
  gap: 5px;
  top: 30px;
  right: 20px;
  cursor: pointer;
  z-index: 2000;
  background-color: var(--secondary);
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);*/
}

.hamburger.open {
  background-color: transparent;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* ANIMACIÓN HAMBURGER A "X" */
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -5px);
}

/* OVERLAY DEL MENÚ LATERAL */
.overlay {
  display: none;
  position: fixed;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: rgba(0,0,0,0.7);
}

.fade-in {
  animation-name: fade-in;
  animation-duration: 0.3s;
  animation-fill-mode: forwards;
}

@keyframes fade-in {
  from {opacity: 0}
  to {opacity: 1}
}

.fade-out {
  animation-name: fade-out;
  animation-duration: 0.3s;
  animation-fill-mode: forwards;
}

@keyframes fade-out {
  from {opacity: 1}
  to {opacity: 0}
}

/* NAVBAR */
.navbar {
  background-color: var(--secondary);
  padding: 0 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
  position: relative;
  z-index: 1000;
}

/* NAV LINKS desktop */
.nav-links {
  list-style: none;
  display: flex;
  gap: 34px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
  height: fit-content;
}

.nav-links li a {
  box-sizing: border-box;
  color: var(--text-navbar);
  text-transform: uppercase;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: .2px;
  padding: 10px 0;
  transition: color 0.3s ease;
  border-bottom: 2px solid transparent;
}

.nav-links li span {
  box-sizing: border-box;
  color: var(--text-navbar);
  text-transform: uppercase;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  letter-spacing: .2px;
  padding: 10px 0;
  transition: color 0.3s ease;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.nav-links li a:hover {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.nav-links li span:hover {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* SUBMENU */
.submenu {
  display: none;
  position: absolute;
  top: 28px;
  left: 0;
  padding: 0px;
  list-style: none;
  background-color: var(--secondary-dark);
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Asegura que el contenedor del submenu mantenga su posición relativa */
.has-submenu {
  position: relative;
  cursor: pointer !important; 
}

.submenu-header {
  cursor: pointer;
}

/* Hace que el submenu no se oculte mientras se mantiene el hover en .has-submenu o en .submenu */
/* Ya no aplica, se maneja con javascript*/
/*@media screen and (min-width: 1000px) {
  .has-submenu:hover .submenu,
  .has-submenu .submenu:hover {
    display: block;
  }
}*/

.submenu li a {
  padding: 15px;
  display: block;
  color: var(--text-navbar);
  text-transform: uppercase;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  font-style: normal;
  transition: color 0.3s ease;
}

.submenu li a:hover {
  /*background-color: #f3f3f3;*/
  color: var(--primary);
}

/* Flecha de submenús */
.arrow {
  margin-left: 5px;
  cursor: pointer;
}

/* PANEL DE CONTENIDO */
.contenido {
  padding-top: 35px;
  padding-bottom: 35px;
  line-height: 20px;
  font-weight: 400;
  font-style: normal;
  color: var(--text-body);
  font-size: 15px;
}

.seccion2 {
  background-color: var(--background-secondary);
}

/* WIDGETS */

.widget {
  margin: 25px 0px;
}

.widget p {
  text-align: justify;
}

.widget-title {
  margin: 0px 0px 10px 0px;
  background: var(--primary);
  text-align: center;
  color: var(--text-widget);
  padding: 10px 5px;
  text-transform: uppercase;

  line-height: 24px;
  font-weight: 600;
  font-style: normal;
  font-size: 18px;
}

.widget-columnas {
  display: flex;
  gap: 50px;
}

.seccion2 .widget .widget-title {
  background: var(--tertiary);
  border-radius: 10px;
}

.link-boton {
  text-decoration: none;
  background-color: var(--secondary);
  color: var(--text-navbar);
  font-weight: bold;
  font-size: 20px;
  padding: 10px 30px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.link-boton:hover {
  background-color: var(--primary);
}

.boton-widget {
  text-align: center;
  padding: 70px 0px;
}

.mensaje-bienvenida {
  text-align: center;
  padding-bottom: 20px;
}

/* FOOTER */
.footer {
  padding-top: 50px;
  padding-bottom: 50px;
  background-color: var(--secondary);
  color: var(--text-footer);
  text-align: center;
  font-size: 14px;
  flex-grow: 1
}

.footer-note {
  font-size: 12px;
}

.footer hr {
  border-color: var(--primary-transparent);
  margin: 20px 0px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 0px;
  list-style: none;
}

.social-links li a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  width: 50px;
  height: 50px;
  border: solid 1px var(--primary-transparent);
  text-decoration: none;
  color: var(--primary);
  font-size: 20px;
  transition: border 0.3s ease;
}

.social-links li a:hover {
  border: solid 1px var(--primary);
}

.contacto-linea {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 5px 0px;
}

.contacto .fa, .contacto .fab {
  color: var(--primary);
  margin-right: 5px;
}

.contacto-linea a {
  text-decoration: none;
  color: var(--text-footer);
}

.aviso-privacidad a {
  font-size: 16px;
  text-decoration: none;
  color: var(--text-footer);
  text-transform: uppercase;
}

.aviso-privacidad a:hover {
  color: var(--primary);
}

/* DISEÑO RESPONSIVO */

@media screen and (max-width: 1200px) {
  .slideshow-bg {
    height: 400px;
  }

  .content-padding-horizontal {
    padding-left: 5%;
    padding-right: 5%;
  }

}

@media screen and (max-width: 1110px) {
  /* MENÚ HAMBURGUESA */

  .header-title{
    display: none;
  }

  .header-hamburger {
    width: 50%;
    display: flex;
    position: relative;
    padding-right: 20px;
  }

  .header-logo {
    width: 50%;
    justify-content: left;
  }
  .logo-img img {
    max-width: none;
    max-height: none;
    
    height: 100%;
  }
  .logo-img {
    max-width: none;
    max-height: none;
    width: auto;
    height: 100%;
  }

  .hamburger {
    display: flex;
    transition: right 0.3s ease;
  }

  .hamburger.open {
    right: 310px;
    position: fixed;
  }

  .overlay.show {
    display: block;
  }

  .navbar {
    height: 10px;
  }

  .nav-links {
    /*display: none;*/
    height: 100vh;
    width: 0px;
    flex-direction: column;
    position: fixed;
    top: 0px;
    right: 0px;
    gap: 0px;
    background-color: var(--secondary);
    text-align: left;
    /*box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);*/
    z-index: 1500;
    transition: width 0.3s ease;
  }

  .nav-links.show {
    display: flex;
    width: 300px;
  }

  .nav-links li {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .nav-links li a {
    box-sizing: border-box;
    color: var(--text-navbar);
    width: 100%;
    padding: 15px;
    text-wrap: nowrap; /* HACE QUE NO SE PONGA LA PALABRA EN VARIAS LÍNEAS AL ABRIR Y CERRAR EL MENU. QUITAR EN CASO DE QUE EL TEXTO DEL LINK SEA LARGO */
  }

  .nav-links li span {
    box-sizing: border-box;
    color: var(--text-navbar);
    width: 100%;
    padding: 15px;
    text-wrap: nowrap; /* HACE QUE NO SE PONGA LA PALABRA EN VARIAS LÍNEAS AL ABRIR Y CERRAR EL MENU. QUITAR EN CASO DE QUE EL TEXTO DEL LINK SEA LARGO */
  }

  .nav-links li a:hover {
    color: var(--primary); /* Color dorado al hacer hover */
  }

  .nav-links li span:hover {
    color: var(--primary); /* Color dorado al hacer hover */
  }

  .submenu {
    display: grid;
    background-color: var(--secondary-dark);
    position: static;
    padding: 0px;
    height: 0px;
    overflow: hidden;
    transition: height 0.3s ease-in-out;
  }

  .submenu li a {
    height: 50px;
    padding: 15px;
    text-wrap: nowrap;  /* HACE QUE NO SE PONGA LA PALABRA EN VARIAS LÍNEAS AL ABRIR Y CERRAR EL MENU. QUITAR EN CASO DE QUE EL TEXTO DEL LINK SEA LARGO */
  }

  .submenu li a:hover {
    color: var(--primary);
  }
}

@media screen and (max-width: 800px) {
  h1 {
    font-size: 25px;
  }
  h2 {
    font-size: 20px;
  }

  .header {
    height: 75px;
  }

  .hamburger {
    top: 20px;
  }

  .widget-columnas {
    flex-direction: column;
    gap: 0px;
  }

  .slideshow-bg {
    height: 300px;
  }

  .mensaje-bienvenida h1 {
    margin: 0px;
  }
  .mensaje-bienvenida h2 {
    margin: 20px 0px 0px 0px;
  }
  
}

@media screen and (max-width: 500px) {
  h1 {
    font-size: 20px;
  }
  h2 {
    font-size: 15px;
  }
  .slideshow-bg {
    height: 200px;
  }
  .footer {
    padding-top: 35px;
    padding-bottom: 35px;
  }
  .social-links li a {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .mensaje-bienvenida {
    margin: 0px;
    padding-bottom: 10px;
  }
  .mensaje-bienvenida h1 {
    margin: 0px;
  }
  
  .mensaje-bienvenida h2 {
    margin: 20px 0px 0px 0px;
  }
  
}

@media screen and (max-width: 380px) {
  .header {
    height: 50px;
  }
  .hamburger {
    top: 5px;
    right: 10px;
  }
  .link-boton {
    font-size: 16px;
  }
  .nav-links.show {
    width: 80%;
  }
  .hamburger.open {
    right: 85%;
  }
}
