* {
  margin: 0;
}

body {
  font-family: "Albert Sans", sans-serif;
  ;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  background-color: #4979a8;
}

header.scrolled {
  background-color: #ffffff;
  /* el color que aparece al bajar */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
  width: 300px;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .logo {
    width: 200px;
  }
}

.menu-sup {
  display: flex;
  justify-content: right;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

/* --- Enlaces del menú --- */
.menu-btn-sup {
  color: rgb(255, 255, 255);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1.1rem;
  cursor: pointer;
}

/* --- Color de enlaces cuando se aplica el scroll --- */
header.scrolled .menu-btn-sup {
  color: #000000;
}

.menu-btn-sup:hover {
  color: #ffcc00;
}

/* --- Dropdown --- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  min-width: 160px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.dropdown-content a {
  color: #e0e0e0;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
  transition: background 0.3s, color 0.3s;
}

.dropdown-content a:hover {
  background: rgba(255, 204, 0, 0.2);
  color: #ffcc00;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/*Botón de cambiar idioma*/
.lang-switch {
  display: flex;
  gap: 6px;
  margin-left: 20px;
}

.lang-btn {
  background: transparent;
  border: 1px solid #ffffff;
  color: #ffffff;
  padding: 4px 8px;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
}

header.scrolled .lang-btn {
  border-color: #000;
  color: #000;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lang-btn.active {
  background: #ffcc00;
  color: #000;
  border-color: #ffcc00;
}

/* --- MENÚ HAMBURGUESA PARA MÓVILES --- */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 2rem;
  color: white;
}

header.scrolled .hamburger {
  color: black;
}

@media (max-width: 900px) {

  .menu-sup {
    position: fixed;
    top: 70px;
    right: 0;
    background: #4979a8;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    padding: 20px 0;
    display: none;
    text-align: center;
  }

  header.scrolled .menu-sup {
    background: #ffffff;
  }

  .hamburger {
    display: block;
  }

  .menu-sup.active {
    display: flex;
  }

  .menu-sup.active {
    display: flex;
  }

  /* Dropdown dentro del menú móvil */
  .dropdown-content {
    position: static;
    transform: none;
    width: 100%;
    margin: 0 auto;
    background: #d4d4d4;
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }

  .dropdown-content a {
    color: #222 !important;
    padding: 12px;
    font-weight: 500;
  }

  .menu-btn-sup {
    color: white;
  }

  header.scrolled .menu-btn-sup {
    color: black;
  }
}

/* Video */
.hero-video {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  z-index: 1;
  /* filter: brightness(0.5); opaca el vídeo */
}

/* Texto dentro del vídeo */
.contenido-hero {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
  max-width: 90%;
  width: 100%;
  padding: 0 20px;
}

.contenido-hero h1 {
  font-size: 4rem;
  font-family: "Montserrat", sans-serif;
  margin-bottom: 0.5rem;
  white-space: normal;
}

.contenido-hero p {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

@media (max-width: 600px) {
  .contenido-hero h1 {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .contenido-hero p {
    font-size: 1.1rem;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .contenido-hero h1 {
    font-size: 3rem;
  }

  .contenido-hero p {
    font-size: 1.3rem;
  }
}

/* Sección Quienes Somos */
.quienes-somos {
  background-color: #ffffff;
  padding: 60px 20px;
  border-top: 1px solid #e0e0e0;
}

.contenedor-quienes {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.qs-texto {
  flex: 1 1 500px;
}

.qs-texto h2 {
  font-size: 2rem;
  color: #1a1a1a;
  margin-bottom: 20px;
}

.qs-texto p {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* Carrusel Quienes Somos*/
.carrusel {
  position: relative;
  width: 45%;
  height: 350px;
  border-radius: 12px;
  flex: 1 1 400px;
  overflow: hidden;
}

.slides {
  display: flex;
  width: 170%;
  animation: slide 12s infinite;
}

.slides img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

@keyframes slide {
  0% {
    transform: translateX(0%);
  }

  33% {
    transform: translateX(-100%);
  }

  66% {
    transform: translateX(-200%);
  }

  100% {
    transform: translateX(0%);
  }
}

.texto-sobrepuesto {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 20px;
  border-radius: 10px;
}

/* POPUP PRINCIPAL */
/* Fondo oscuro detrás del popup */
.popup-container {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 650px;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: fadeIn 0.3s ease;
  z-index: 1001;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

#closeBtn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  z-index: 1002;
  pointer-events: auto;
}

#overlay {
  pointer-events: 1002;
}

.popup-content {
  display: flex;
  gap: 20px;
}

.promo-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.formulario {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.formulario input,
.formulario textarea {
  padding: 8px;
  border: 1px solid #aaa;
  border-radius: 6px;
}

.formulario textarea {
  height: 80px;
  resize: none;
}

.btn-enviar {
  background: #4979a8;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* TEXTO + RELOJ */
.texto-reloj {
  flex: 1;
  background: #4979a8;
  color: white;
  padding: 15px;
  border-radius: 8px;
}

.countdown {
  font-size: 2rem;
  margin-top: 10px;
  font-weight: bold;
}

/* BOTÓN MINIMIZADO */
.minimized-btn {
  position: fixed;
  right: 20px;
  bottom: 100px;
  background: linear-gradient(135deg, #4979a8, #365f87);
  color: white;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: float 2.5s ease-in-out infinite;
}

.mini-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-icon {
  font-size: 26px;
}

.mini-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.mini-text strong {
  font-size: 14px;
}

.mini-text span {
  font-size: 13px;
  font-weight: bold;
  opacity: 0.9;
}

.minimized-btn:hover {
  transform: scale(1.05);
}

@keyframes float {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .minimized-btn {
    bottom: 110px;
    right: 16px;
  }
}

.form-status {
  font-size: 14px;
  margin-top: 5px;
  min-height: 18px;
}

.form-status.success {
  color: #2e7d32;
  font-weight: bold;
}

.form-status.error {
  color: #c62828;
  font-weight: bold;
}

.loader {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-enviar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Botón Contacto */
.boton-flotante {
  position: fixed;
  bottom: 25px;
  right: 20px;
  background-color: #4979a8;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 30px;
  z-index: 1000;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.boton-flotante:hover {
  background-color: #00264d;
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .boton-flotante {
    bottom: 17px;
    right: 45px;
    font-size: 30px;
    padding: 10px 16px;
  }
}

/* Footer */
.footer-mejorado {
  background-color: #1d1d1d;
  color: #fff;
  padding: 60px 20px 20px;
  font-size: 0.95rem;
  text-align: left;
}

.footer-contenedor {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col {
  flex: 1 1 220px;
}

.footer-col h3,
.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #f4f4f4;
}

.footer-col p,
.footer-col a {
  color: #ccc;
  text-decoration: none;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a:hover,
.footer-col a:hover {
  color: #0095a8;
}

.iconos-redes a {
  font-size: 1.3rem;
  margin-right: 10px;
  color: #ccc;
  transition: color 0.3s ease;
}

.iconos-redes a:hover {
  color: #00bcd4;
}

.footer-copy {
  text-align: center;
  margin-top: 30px;
  font-size: 0.85rem;
  color: #888;
}