/* --- PORTADA --- */
.portada {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(-45deg, #0d47a1, #b71c1c, #1565c0, #c62828);
  background-size: 400% 400%;
  animation: gradientMove 10s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.portada-titulo {
  font-size: 5.5rem;
  font-weight: 700;
  margin-bottom: 4rem;
  text-shadow: 0 0 25px rgba(0,0,0,0.3);
  letter-spacing: 1.5px;
  animation: fadeInUp 2s ease;
}

/* Aplicar el estilo verde del header */
.portada .c-red,
.portada .co2-red {
    color: #4be708 !important;
}

.portada .logo-text {
  color: white;
  animation: fadeInGlow 3s ease-in-out infinite alternate;
  text-shadow:
    0 0 12px rgba(0, 255, 80, 0.6),
    0 0 25px rgba(0, 255, 120, 0.4),
    0 0 40px rgba(0, 255, 100, 0.25);
  transition: all 0.3s ease;
}

.portada .animate-logo {
    animation: fadeInGlow 3s ease-in-out infinite alternate;
    text-shadow:
      0 0 12px rgba(0, 255, 80, 0.6),
      0 0 25px rgba(0, 255, 120, 0.4),
      0 0 40px rgba(0, 255, 100, 0.25);
    transition: all 0.3s ease;
}

@keyframes fadeInGlow {
  0% {
    opacity: 0.85;
    transform: scale(1);
    text-shadow:
      0 0 8px rgba(0, 255, 100, 0.35),
      0 0 15px rgba(0, 255, 80, 0.25),
      0 0 30px rgba(0, 255, 120, 0.15);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
    text-shadow:
      0 0 18px rgba(0, 255, 100, 0.9),
      0 0 35px rgba(0, 255, 120, 0.6),
      0 0 60px rgba(0, 255, 80, 0.4);
  }
  100% {
    opacity: 0.9;
    transform: scale(1);
    text-shadow:
      0 0 10px rgba(0, 255, 80, 0.5),
      0 0 25px rgba(0, 255, 120, 0.35),
      0 0 45px rgba(0, 255, 100, 0.25);
  }
}

.banderas {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
}

.bandera {
  width: 60px;
  height: 40px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bandera:hover {
  transform: scale(1.12);
  box-shadow: 0 0 20px rgba(255,255,255,0.6);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   TRANSICIÓN DE SALIDA
========================= */

.portada.exit {
  animation: fadeOutZoom 1s ease forwards;
}

@keyframes fadeOutZoom {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* -----------------------------
   Responsive: breakpoints
   ----------------------------- */

/* Large tablets / small desktops */
@media (max-width: 1024px) {
  .portada-titulo {
    font-size: 4rem;
    margin-bottom: 3rem;
  }
  .banderas { gap: 1.8rem; }
  .bandera { width: 50px; height: 34px; }
}

/* Tablets and large phones */
@media (max-width: 768px) {
  .portada {
    padding: 1rem 1.25rem;
  }
  .portada-titulo {
    font-size: 3rem;
    margin-bottom: 2.4rem;
    letter-spacing: 1px;
  }
  .logo-text { transform-origin: center; }
  .banderas { gap: 1.2rem; }
  .bandera { width: 46px; height: 32px; }
}

/* Mobile phones */
@media (max-width: 480px) {
  .portada-titulo {
    font-size: 2.2rem;
    margin-bottom: 1.4rem;
    line-height: 1.05;
    letter-spacing: 0.6px;
    text-shadow: 0 0 18px rgba(0,0,0,0.25);
  }
  .portada {
    background-size: 300% 300%;
  }
  .banderas {
    gap: 0.9rem;
    margin-top: 1rem;
  }
  .bandera {
    width: 40px;
    height: 28px;
    border-radius: 6px;
  }
  .logo-text { font-size: 1.05em; }
}

