/*
Theme Name: Escribo sobre el cielo
Theme URI: https://escribocielo.localhost
Author: Antigravity / Fischer
Description: Custom WordPress theme for Escribo sobre el cielo based on static layouts.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: escribocielo
*/

@font-face {
  font-family: 'Helvetica Neue';
  src: url('fonts/helvetica-neue-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Helvetica Neue';
  src: url('fonts/helvetica-neue-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

:root {
  /* Valores por defecto (Versión 1) */
  --bg-color: #fea460;
  --halo-color: #6cc4bf;
}

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

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  height: 100vh;
  overflow-y: hidden; /* Quitar scroll de index y contenido en escritorio */
  overflow-x: hidden;
  padding-right: 0; /* No se necesita padding si no hay scroll en las páginas principales */
  background: var(--bg-color);
  position: relative;
  font-family: 'Helvetica Neue', sans-serif;
  color: #1d1d1b; /* Texto blanco para resaltar sobre el fondo oscuro */
}

/* Estilos específicos para el body del iframe */
.iframe-body {
  overflow-y: auto; /* Habilitar scroll para el iframe */
  padding-right: 20px; /* Margen para el scroll del iframe */
  background: transparent !important; /* Permitir que se vea el fondo */
  height: auto;
}

a {
  color: #1d1d1b;
  text-decoration: none;
}

strong {
  font-weight: 700;
}

p {
  margin-bottom: 1.5rem;
  /* line-height: 1.2rem; */
}

/* Fondo de pantalla */
.fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/fondo.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1; /* Se coloca por encima de todos los demás elementos */
}

/* Halo celeste */
.halo {
  position: absolute;
  top: -20%;
  right: -100%;
  width: 100%;
  height: 140%;
  z-index: 0; /* Se asegura que esté por debajo del fondo */

  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--halo-color) 50%,
    transparent 100%
  );

  filter: blur(80px);

  /* Loop infinito */
  animation: moverHalo 15s linear infinite;
}

@keyframes moverHalo {
  /* Empieza fuera de la derecha */
  0% {
    transform: translateX(0%);
  }
  /* Sale completamente por la izquierda */
  100% {
    transform: translateX(-250%);
  }
}

/* Estructura Header, Content y Footer */
.main-header, .main-footer {
  position: absolute;
  width: 100%;
  z-index: 10; /* Por encima de .fondo */
  display: flex;
}

.main-header {
  top: 0;
  justify-content: space-between;
  padding: 30px 4%;
  font-weight: 700;
}

.main-footer {
  bottom: 0;
  justify-content: space-between;
  padding: 30px 4%;
  font-weight: 700;
  overflow: hidden; /* Mantiene el halo replicado dentro de los límites del footer */
  background: var(--bg-color);
}

/* Replicamos el efecto halo específicamente para el fondo del footer */
/* Esto permite que el resplandor pase "por delante" de las montañas de fondo */
.main-footer::before {
  content: "";
  position: absolute;
  top: -200%; /* Margen vertical para que el desenfoque no se corte */
  right: -100%;
  width: 100%;
  height: 500%;
  z-index: -1; /* Se coloca detrás del texto del footer pero sobre la capa .fondo */
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--halo-color) 50%,
    transparent 100%
  );
  filter: blur(80px);
  animation: moverHalo 15s linear infinite; /* Sincronización perfecta con el halo principal */
  pointer-events: none;
}

/* Columnas */
.header-col, .footer-col {
  flex: 1;
}

.header-col:last-child, .footer-col:last-child {
  text-align: right;
}

.footer-col:nth-child(2) {
  text-align: center;
}

/* Estilos para Elementos Flotantes */
.floating-item {
  position: absolute;
  z-index: 5; /* Por encima del fondo y halo, pero debajo del header/footer */
  display: flex;
  justify-content: center;
  align-items: center;
  animation: floatAnimation 6s ease-in-out infinite;
}

.floating-item img {
  width: 100%;
  height: auto;
  display: block;
}

.floating-item button, .floating-item a.duo-button {
  width: 100%;
  padding: 4% 2%;
  cursor: pointer;
  background: var(--bg-color);
  border: 0;
  color: #1d1d1b;
  font-family: 'Helvetica Neue', sans-serif;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
  display: inline-block;
}

.floating-item button:hover, .floating-item a.duo-button:hover {
  transform: scale(1.05);
  font-weight: 700;
}

/* Posiciones y Tamaños en Porcentajes */
.item-1 { top: 34%; left: 6%; width: 14.5%; animation-delay: 0s; }
.item-2 { top: 31%; left: 70%; width: 14.5%; animation-delay: 1s; }
.item-3 { top: 59%; left: 27%; width: 14.5%; animation-delay: 2s; }
.item-4 { top: 64%; left: 77%; width: 14.5%; animation-delay: 1.5s; }
.item-5 { top: 41%; left: 45%; width: 14.5%; animation-delay: 0.5s; }

/* Animación de flotado */
@keyframes floatAnimation {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2%);
  }
}

/* Estilos para el contenedor central con iframe en contenido.html */
.content-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  max-width: 800px;
  height: 70%;
  max-height: 800px;
  background-color: #fea460;
  z-index: 7; /* Por encima de los elementos flotantes, debajo del menú */
  display: flex;
  padding: 30px; /* Margen interno de 20px para el contenido */
}

.content-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Estilos para el scrollbar de color negro */
* {
  scrollbar-width: thin;
  scrollbar-color: #000 transparent;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: #000;
  border-radius: 10px;
}

/* Estilos para el Menú Móvil */
.menu-toggle {
  display: none;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, var(--bg-color), var(--halo-color));
  z-index: 100;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.mobile-logo {
  display: none; /* Ocultar por defecto en desktop */
  position: absolute;
  top: 30px;
  left: 4%;
  max-width: 70px;
}

.mobile-menu a {
  font-size: 1rem;
  font-weight: 700;
  color: #1d1d1b;
  line-height: 2rem;
}

/* Ajuste para que los botones mantengan legibilidad en pantallas pequeñas */
@media (max-width: 768px) {
  body {
    overflow-y: auto; /* Permite scroll vertical para ver todos los botones */
  }

  .fondo {
    background-image: url('images/fondo-movil.png');
    top: 50px;
  }

  .floating-item {
    position: relative !important;
    width: 80% !important;
    left: 10% !important;
    top: auto !important;
    margin: 15px 0 !important;
  }

  .item-1 {
    margin-top: 110px !important; /* Espacio para que no choque con el botón de MENÚ */
    margin-bottom: 40px !important;
  }

  .floating-item img {
    width: 67%;
  }

  .floating-item button, .floating-item a.duo-button {
    width: 70%;
    font-size: 18px; /* Aumentado para mejor legibilidad */
    padding: 15px 10px;
    line-height: 1.4;
  }

  /* Ocultar enlaces originales del header y footer */
  .header-col, .footer-col, .main-footer {
    display: none;
  }

  .menu-toggle {
    display: block;
    position: fixed;
    top: 54px;
    right: 4%;
    z-index: 110;
    background: none;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    color: #1d1d1b;
  }

  .mobile-menu.active {
    display: flex;
  }

  body:has(.mobile-menu.active) {
    overflow: hidden;
  }

  .mobile-logo {
    display: block; /* Mostrar en móvil */
  }

  /* Estilos específicos para contenido.html en móvil */
  .page-contenido {
    overflow-y: hidden; /* Evita el scroll del body cuando el content-container es full screen */
  }

  .page-contenido .fondo,
  .page-contenido .halo,
  .page-contenido .floating-item:not(.item-1) { 
    display: none;
  }

  .page-contenido .item-1 {
    display: none !important;
    position: fixed !important;
    top: 20px !important;
    left: 4% !important;
    width: 60px !important;
    z-index: 111;
    margin: 0 !important;
    animation: none !important;
  }

  .page-contenido .content-container {
    position: fixed; /* Asegura que cubra toda la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none; /* Elimina la transformación de centrado */
    margin-top: 100px;
    /* El padding de 30px se mantiene para el margen interno del iframe */
  }
}

/* Close button for the content modal */
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  font-weight: bold;
  color: #1d1d1b;
  text-decoration: none;
  cursor: pointer;
  z-index: 15;
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
}

.modal-close:hover {
  color: #000;
  transform: scale(1.2);
}

/* Remove default WordPress menu list bullets and spacing */
.main-header li, 
.main-footer li, 
.mobile-menu li {
  list-style: none !important;
  list-style-type: none !important;
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
}

.main-header ul,
.main-footer ul,
.mobile-menu ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}


