/* ==============================
   VARIABLES
============================== */
:root {
  --primary-color: #403EF9;
  --secondary-color: #24135F;
  --accent-color: #7FFDEF;
  --light-color: #f8f9fa;
  --dark-color: #333;
  --gray-color: #6c757d;
  --titanium-color: #888B8D;
  --light-titanium: #D9D9D6;
  --gradient-blue: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* ==============================
   BASE
============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  overflow-x: hidden;
}

img {
  border: none !important;
  outline: none !important;
  max-width: 100%;
  height: auto;
}

section {
  padding: 30px 0;
  position: relative;
  z-index: 10;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  margin-bottom: 30px;
}

.section-title h2 {
  font-family: 'Ubuntu', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.section-title p {
  font-size: 1.2rem;
  color: var(--gray-color);
  max-width: 700px;
  margin: 0 auto;
}

.nav-header {
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  z-index: 1000;
  background-color: transparent
}

.nav-header .logo img {
  height: 50px;
  width: auto;
}

.language-switcher {
  position: fixed; /* CAMBIO */
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-weight: bold;
  z-index: 1001;
}

.language-switcher a {
  color: white;
  text-decoration: none;
  margin: 0 5px;
  font-weight: bold;
}

.language-switcher a:hover {
  text-decoration: underline;
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
  z-index: 1002;
}

.nav-links ul {
  display: flex;
  flex-direction: row;
  list-style: none;
  gap: 25px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  position: static;
}

.nav-links ul li a {
  color: white !important;
  text-decoration: none !important;
  font-weight: 500;
  transition: opacity 0.3s;
}

.nav-links ul li a:hover {
  opacity: 0.8;
}

@media (min-width: 769px) {
  .nav-header {
    position: absolute;        /* ✅ Clave para que esté sobre el vídeo */
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;   /* ✅ Elimina fondo blanco o azul */
    z-index: 3;
    padding: 20px 40px;
  }

  .nav-links ul {
    display: flex;
    flex-direction: row;
    position: static;          /* ✅ Para que no flote en desktop */
    background: transparent;
  }

  .mobile-menu-btn {
    display: none !important;
  }

  .language-switcher {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
  }
}

main {
  padding-top: 120px;
}

/* ==============================
   HERO CONTENT
============================== */
.header-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  padding: 0 20px;
  width: 90%;
  max-width: 1000px;
  z-index: 2;
}

.header-content h1 {
  font-family: 'Ubuntu', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 30px;
  line-height: 1.1;
}

.header-content p {
  font-size: 1.4rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto 40px;
}

/* ==============================
   BUTTONS
============================== */
.btn {
  display: inline-block;
  background-color: #fff;
  color: var(--primary-color);
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  margin: 10px;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-outline:hover {
  background-color: #fff;
  color: var(--primary-color);
}

.btn-submit {
  background-color: var(--accent-color);
  color: var(--secondary-color);
  width: 100%;
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  font-family: 'Ubuntu', sans-serif;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-submit:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 95, 163, 0.3);
}

/* ==============================
   COMPONENTS
============================== */
.mission-grid,
.advantages-grid,
.sdg-grid {
  display: grid;
  gap: 30px;
}

.mission-grid { grid-template-columns: repeat(2, 1fr); }
.advantages-grid { grid-template-columns: repeat(3, 1fr); }
.sdg-grid { grid-template-columns: repeat(3, 1fr); }

.mission-card,
.advantage-card,
.sdg-card,
.solution-info,
.contact-form {
  background-color: #fff;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.mission-card:hover,
.advantage-card:hover {
  transform: translateY(-10px);
}

.advantage-card:hover {
  background: var(--gradient-blue);
  color: #fff;
}

.advantage-card:hover h3,
.advantage-card:hover .advantage-icon {
  color: #fff;
}

.advantage-icon,
.mission-icon,
.sdg-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.solution {
  padding: 30px 0 !important; /* sobrescribe cualquier valor anterior */
}

.solution-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 50px;
}

.stat-item {
  text-align: center;
  padding: 30px;
  background-color: var(--light-titanium);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1rem;
  color: var(--gray-color);
}

.problem-detail {
  display: flex;
  align-items: center;
  gap: 50px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 0;
}

.problem-text { flex: 1; max-width: 50%; }
.problem-image { flex: 1; text-align: center; }

.contact {
  background: var(--gradient-blue);
  color: #fff;
}

.contact .section-title h2,
.contact .section-title p {
  color: #fff;
}

.contact-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  align-items: center;
}

.contact-info { padding-right: 30px; }
.contact-info p {
  margin-bottom: 40px;
  font-size: 1.5rem;
  opacity: 0.9;
}

.contact-detail {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.contact-icon i {
  font-size: 1rem;
  color: #fff;
}

.contact-text h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.contact-text p {
  margin: 0;
  opacity: 0.8;
}


/* ==============================
   FOOTER (LIMPIO Y FUNCIONAL)
============================== */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 60px 20px;
  font-size: 0.9rem;
  position: relative;
  z-index: 5;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-logo img {
  height: 40px;
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-links ul li a:hover {
  opacity: 0.7;
}

.footer-contact p {
  margin-bottom: 10px;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ==============================
   CONTACT FORM FIXES
============================== */
.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  width: 100%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  background: #f9f9f9;
  color: #403EF9 !important; 
  opacity: 1 !important;
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-control {
  padding: 15px;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  width: 100%;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  background: #f9f9f9;
}

/* Botón envío formulario */
.btn-submit {
  background-color: var(--accent-color);
  color: var(--secondary-color);
  font-weight: bold;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-submit:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ==============================
   VIDEO OVERLAY FIX (Z-INDEX)
============================== */
.video-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

.header-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.video-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  width: 100%;              /* ✅ en lugar de 130% */
  max-width: 900px;         /* Puedes aumentar si quieres que sea más grande */
  margin: 0 auto 10px auto; /* Menos espacio inferior */
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.header-content {
  position: absolute;
  z-index: 2;
  color: white;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0 20px;
  width: 100%;
  max-width: 1000px;
}

.header-content h1 {
  font-family: 'Ubuntu', sans-serif;
  font-size: 3.5rem;
  margin-bottom: 30px;
  font-weight: 700;
  line-height: 1.1;
}

.header-content p {
  font-size: 1.4rem;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* Restore footer columns on larger screens */
@media (min-width: 769px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}



input::placeholder,
textarea::placeholder {
  color: #24135F !important;
  opacity: 1;
}

input,
textarea {
  color: #24135F !important;
}

.form-label {
  color: #24135F; /* Azul corporativo oscuro */
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

/* ==============================
   LEGAL MODAL
============================== */
.legal-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
}

.legal-modal-content {
  background-color: #fff;
  color: #24135F;
  margin: 5% auto;
  padding: 30px;
  border-radius: 10px;
  max-width: 800px;
  width: 90%;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.legal-modal-content h2, .legal-modal-content h3 {
  color: #24135F;
  margin-top: 20px;
}

.legal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.legal-close:hover {
  color: #000;
}

.lang-link {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.lang-link.active {
  text-decoration: underline;
  color: white
}


/* ==============================
   RESPONSIVE
============================== */

@media (min-width: 769px) {
  .nav-links ul {
    display: flex !important;
    flex-direction: row;
    position: static;
    background: transparent;
    padding: 0;
    border-radius: 0;
    gap: 25px;
  }

  .mobile-menu-btn {
    display: none !important;
  }
}


@media (max-width: 992px) {
  .mission-grid,
  .advantages-grid,
  .sdg-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .mission-grid {
    grid-template-columns: 1fr;
  }

  .header-content h1 {
    font-size: 1.8rem;
  }

  .header-content p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  /* HEADER & NAV */
  .nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: black;
    z-index: 999;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
  }

  .nav-header .logo img {
    height: 45px;
  }

  .mobile-menu-btn {
    display: block;
    color: white;
    font-size: 28px;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 6;
  }

  .nav-links ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    right: 20px;
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 10px;
    z-index: 10;
  }

  .nav-links ul.active {
    display: flex;
  }

  .language-switcher {
 position: relative;
  top: auto;
  left: auto;
  transform: none;
  align-self: center;
  margin-top: 10px;
  font-size: 0.9rem;
  z-index: 1000;
  }

  /* HEADER CONTENT */
  .header-content {
    margin-top: 100px;
  }

  .header-content h1 {
    font-size: 2.2rem;
  }

  .header-content p {
    font-size: 1.2rem;
  }

  /* SECCIONES EN COLUMNA ÚNICA */
  .mission-grid,
  .advantages-grid,
  .sdg-grid,
  .stats-container,
  .solution-details,
  .contact-content,
  .problem-detail,
  .footer-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    text-align: center !important;
    width: 100% !important;
  }

  .contact-info {
    padding-right: 0;
  }

  /* FOOTER */
  footer {
    text-align: center;
    padding: 40px 20px;
  }

  .footer-logo {
    text-align: center;
  }

  .footer-logo img {
    height: 40px;
    width: auto;
    display: block;
    margin: 0 auto 20px;
  }

  .footer-links,
  .footer-contact {
    width: 100%;
    text-align: center;
  }

  .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: center;
  }

  .footer-links ul li {
    margin-bottom: 10px;
  }

  .footer-links ul li a {
    color: white;
    text-decoration: none;
  }

  .footer-contact p {
    margin-bottom: 10px;
  }
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: var(--secondary-color); /* azul corporativo oscuro */
  color: white;
  padding: 15px 20px;
  font-size: 0.95rem;
  display: none;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-banner p {
  margin: 0;
  flex: 1;
}

.cookie-banner a {
  color: var(--accent-color); /* turquesa brillante */
  text-decoration: underline;
  margin-left: 5px;
}

.cookie-banner button {
  background-color: var(--accent-color);
  color: var(--secondary-color);
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  font-family: 'Ubuntu', sans-serif;
  cursor: pointer;
  margin-top: 10px;
}

@media (min-width: 600px) {
  .cookie-banner {
    flex-wrap: nowrap;
  }

  .cookie-banner button {
    margin-top: 0;
    margin-left: 20px;
  }
}