/* ================== RESET ================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* ================= PRELOADER ================= */
.preloader {
  position: fixed;
  top:0; left:0;
  width:100%;
  height:100vh;
  background: linear-gradient(130deg, #00c6ff, #0072ff, #00c6ff);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  z-index:2000;
}

.loading-bar {
  position: fixed;
  top: 0; left: 0;
  height: 5px;
  width: 0;
  background: #fff;
  z-index:2100;
  transition: width 0.3s linear;
}

.preloader-images img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  transition: opacity 0.3s;
}

.preloader-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.preloader-logo img {
  width: 80px;
  height: auto;
}

.loading-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  animation: blink 1.5s infinite; /* más lento */
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* ================== BODY NO SÉ QUE HACER ================== */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: #292929;

  /* Gradiente blanco con transparencias para animación sutil */
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.9) 0%,   /* casi blanco */
    rgba(255,255,255,0.95) 20%,
    rgba(255,255,255,0.95) 80%,
    rgba(255,255,255,0.9) 100%
  );
  background-size: 200% 100%;
  animation: subtleMovement 30s ease-in-out infinite;
}

@keyframes subtleMovement {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 0%;
  }
}
/* ================== NAVBAR ================== */
.navbar-wrapper {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.15);
  border-bottom: 5px solid rgba(255, 255, 255, 0.568);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  padding: 0.5rem 1rem;
  border-radius: 0 0 150px 150px; /*CON ESTO CAMBIO LOS BORDES*/
}

.navbar {
  max-width: 1200px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.navbar .logo {
  width: 100px;
  transition: transform 0.3s;
}

.navbar .logo:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 0 10px #FFD700);
}

.navbar-links {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.navbar-links a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: 20px;
  transition: all 0.3s;
}

.navbar-links a:hover {
  background: rgba(0, 0, 0, 0.052);
  transform: scale(1.2);
  color: #0091ff;
}

/* ================== BOTÓN DENUNCIA ================== */

.navbar-links .btn-denuncia {
  background: linear-gradient(20deg, #2e0000, #fb5656);
  padding: 0.6rem 1rem;
  border-radius: 30px;
  font-weight: 600;
  transition: transform 0.3s, box-shadow 0.3s;
}

.navbar-links .btn-denuncia:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255,0,0,0.6);
}

.btn-denuncia {
  background: linear-gradient(100deg,#d46868,#fb5656);
  color:#ffbcbc !important;
  padding:0.8rem 1.8rem;
  border-radius:30px;
  font-weight:600;
  transition: transform 0.4s;
  display:inline-block;
  animation:pulse 2s infinite alternate;
  text-decoration:none;
}

.btn-denuncia:hover { 
  transform: scale(1.05);
  color: #000 !important; /* texto negro en hover */
}

/* ================== HERO ================== */
.hero {
  padding: 0 2rem 12rem; /* padding-top = 0 */
  height: 100vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: none;
  margin: 0; /* elimina margen */
  background: linear-gradient(130deg, #00c6ff, #0072ff, #00c6ff);
  background-size: 300% 300%; 
  animation: gradientFlow 2s ease-in-out infinite;
  color: #fff;
  border-radius: 0px;
  position: relative;
  overflow: hidden;
  padding-top: 15rem; /* Ajusta según necesites */
  height: 100vh;
  padding: 2rem;
}

/* Animación de gradiente */
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Difuminado rectangular en todos los bordes */
.hero::after {
  content: "";
  position: absolute;
  inset: -50px 0 0 0; /* mueve el fondo 50px hacia arriba */
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: 
    linear-gradient(to top, rgb(0, 140, 255), rgb(255, 255, 255) 20%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.57), rgba(255,255,255,0) 20%),
    linear-gradient(to left, rgba(255, 255, 255, 0.536), rgba(255,255,255,0) 20%),
    linear-gradient(to right, rgba(0, 145, 255, 0), rgba(255,255,255,0) 20%);
  background-repeat: no-repeat;
  background-size: 100% 20%, 100% 20%, 20% 100%, 20% 100%;
  background-position: top, bottom, left, right;
}

.hero-text {
  position: relative; /* necesario para que z-index funcione */
  z-index: 2;         /* más alto que ::after */
  flex: 1;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(15px);
  padding: 1rem;
  border-radius: 20px;
  animation: slideRight 1.5s ease-out;
  text-align: center;
  opacity: 0; 
  transform: translateX(-50px); /* sale desde la izquierda */
  transition: all 1.5s ease-out;
  margin-top: 20px;
}

.hero-text h1::after { 
  content: "|"; 
  animation: blink 0.7s infinite; 
  margin-left: 5px; 
  display:inline-block; 
  width:1ch; 
}
.hero-text p { font-size: 1.2rem; color: #f0f0f0; }

.highlight {
  color: #FFD700; /* amarillo dorado */
  font-weight: bold; /* opcional */
}

.hero-image {
  flex: 1;
  display: flex;

  animation: slideLeft 1.5s ease-out;
  margin-top: 2rem;
  position: relative;   /* necesario para que z-index funcione */
  z-index: 2;           /* más alto que el ::after del .hero */
  opacity: 0; 
  transform: translateX(50px); /* sale desde la derecha */
  transition: all 1.5s ease-out;
}

/*Suavidad de movimientos laterales*/
.hero-image img {
  width: 120%;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  transition: transform 0.5s;
  position: relative;   /* opcional, para asegurar el stacking */
  z-index: 3;
}

/* Clases que activan animación */
.hero-text.animate-right {
  opacity: 1;
  transform: translateX(0);
}

.hero-image.animate-left {
  opacity: 1;
  transform: translateX(0);
}

/* ================== SECCIONES ================== */
section {
  background: rgba(255, 255, 255, 0.2); /* blanco muy transparente */
  backdrop-filter: blur(15px);          /* desenfoque del fondo */
  -webkit-backdrop-filter: blur(15px);  /* soporte Safari */
  max-width: 1200px;
  margin: 6rem auto;
  padding: 4rem 2rem;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1); /* sombra suave para profundidad */
  border: 1px solid rgba(255, 255, 255, 0); /* borde sutil */
}

section h2 { 
  text-align: center; 
  font-size: 2rem; 
  margin-bottom: 2rem; 
  color: #217fe4; 
}

section h2 a {
  text-decoration: none;
  color: #217fe4;
  transition: color 0.3s, transform 0.2s;
}

section h2 a:hover {
  color: #ffcd03;
  transform: scale(1.05);
}

/* ================== CARDS ================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  gap: 2rem;
}

.card {
  background: linear-gradient(135deg, rgba(240,240,240,0.2), rgba(255,255,255,0.2));
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.3);
  border: 4px solid;
  border-image: linear-gradient(90deg,#FFD700,#FFC107) 1;
  transition: transform 0.3s, background 0.5s;
}

.card:hover { 
  background: linear-gradient(135deg,#FFD70020,#FFC10720); 
  transform: translateY(-10px) scale(1.03); 
}

.card img { width: 100%; border-radius: 15px; margin-bottom: 1rem; }

/* ================== ANIMACIONES ================== */
@keyframes slideRight { from { opacity:0; transform:translateX(-50px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideLeft  { from { opacity:0; transform:translateX(50px); }  to { opacity:1; transform:translateX(0); } }
@keyframes pulse      { 0%,100%{transform:scale(1);}50%{transform:scale(1.05);} }
@keyframes blink      { 0%,50%,100%{opacity:1;}25%,75%{opacity:0;} }
@keyframes vibrate    {0%{transform:translateX(0);}25%{transform:translateX(-2px);}50%{transform:translateX(2px);}75%{transform:translateX(-2px);}100%{transform:translateX(0);}}

/* ================== FOOTER ================== */
footer {
  width: 100%;
  left: 0;
  z-index: 1000;
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.15);
  border-top: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
  padding: 0.7rem 1rem;
}

/* Texto centrado */
.footer-text {
  text-align: center;
  flex: 1;
  font-weight: 600;
  color: #292929;
  font-size: 0.95rem;
}

/* Links dentro del texto */
.footer-link {
  color: #292929;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-link:hover {
  color: #0072ff; /* azul corporativo */
  transform: scale(1.05);
}

/* Logo normal */
.footer-logo {
  height: 25px;
  width: auto;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.footer-logo:hover {
  transform: translateY(-50%) scale(1.1);
  opacity: 0.85;
}

/* 📱 En móvil empieza oculto */
@media (max-width: 768px) {
  .footer-logo {
    display: none; /* oculto al inicio */
  }

  .footer-logo.show {
    display: block; /* visible cuando llegamos al fondo */
    height: 15px;   /* más pequeño en móvil */
    right: 0.5rem;
  }
}

/* ================== SCROLL REVEAL ================== */
.reveal { opacity:0; transform:translateY(50px); transition: all 0.8s ease; }
.reveal.active { opacity:1; transform:translateY(0); }

/* Tip del día */
#tip-del-dia {
  position:relative; z-index:1;
  background: linear-gradient(135deg,#ffcd03,#fff38bc0);
  border-radius:30px; text-align:center;
  padding:1rem; font-size:1.2rem; color:#333;
  box-shadow:0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15); /* color translúcido */
  border-radius: 2px;
  backdrop-filter: blur(5px); /* efecto vidrio */
}

/* Movil */
@media(max-width:768px){
  .hamburger { display: flex; }
  .navbar-links { 
    display: none; 
    flex-direction: column; 
    gap: 1rem; 
    width: 100%;
    margin-top: 1rem; /* separa links de la línea logo/hamburguesa */
  }
  .navbar.active .navbar-links { display: flex; }
}

/* Links desktop */
.navbar-links { display: flex; gap: 1.5rem; }
.navbar-links a {
  text-decoration: none;
  color: #020202;
  font-weight: 600;
  font-size: 1rem; /* ajusta este valor al tamaño que quieras */
}

/* Barra móvil (desplegable) */
.mobile-navbar {
  display: none;
  flex-direction: column;
  justify-content: center;   /* centra verticalmente */
  align-items: center;       /* centra horizontalmente */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70vh;
  background: linear-gradient(145deg, rgba(15, 15, 15, 0.95), rgba(35, 35, 35, 0.92));
  backdrop-filter: blur(6px); /* efecto vidrio oscuro */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  z-index: 1500;
  border-radius: 0 0 30px 30px; /* esquinas inferiores redondeadas */
  animation: fadeInNav 0.4s ease forwards;
}


.mobile-navbar a {
  width: 100%;
  text-align: center; /* centra el texto dentro del enlace */
  padding: 0.5rem 0;
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
}


.logo-link-mobile {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Botón hamburguesa flotante */
.mobile-hamburger {
  display: none;
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 2000;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

/* Solo móvil */
@media(max-width:768px){
  .navbar { display: none; } /* oculta navbar desktop */
  .mobile-hamburger { display: flex; }
}

/* Logo dentro del menú móvil */
.mobile-navbar .logo {
  width: 80px;          /* tamaño más pequeño */
  margin: 0 auto 1rem;  /* centrado y espacio debajo */
  display: block;
}

/* Flip card */
.flip-container{perspective:1000px;}
.flip-card{
  width:100%; max-width:500px; height:auto;
  transform-style:preserve-3d; transition:transform 0.8s ease;
  cursor:pointer; position:relative;
}

.flip-card-back{
  position:absolute; top:0; left:0; width:100%; height:100%;
  backface-visibility:hidden;
  border-radius:20px;
  display:flex; justify-content:center; align-items:center;
  transform:rotateY(180deg);
  background:#fff;
}

.flip-card.flipped{transform:rotateY(180deg);}

/* Cursor animado */
#animated-cursor{position:absolute;bottom:10px;right:10px;width:50px;height:50px;pointer-events:none;animation:clickAnimation 1.2s infinite;}
#animated-cursor img{width:100%;display:block;transform-origin:center top;}
@keyframes clickAnimation{0%,100%{transform:translateY(0) scale(1);}30%{transform:translateY(4px) scale(0.9);}50%{transform:translateY(2px) scale(0.95);}70%{transform:translateY(0) scale(1);}}

.flip-card-front {
  position: relative; /* muy importante */
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flip-card-front img {
  position: relative; /* asegura que esté sobre el contenedor */
  width: 120%;
  height: 120%;
  object-fit: cover;
  border-radius: 20px;
  z-index: 1;
}

#animated-cursor {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  pointer-events: none;
  z-index: 2; /* encima de la imagen */
  animation: clickAnimation 1.2s infinite;
}
/* SEPARADORES */
.section-divider-primero {
  border: none;                
  height: 80px;                 
  margin: 4rem 0;              
  border-radius: 2px;          
  background: linear-gradient(
    to right, 
    rgba(255, 255, 255, 0.3),  /* inicio blanco semitransparente */
    #00c6ff,                    /* azul claro */
    #0072ff,                    /* azul medio */
    #00c6ff,                    /* azul claro */
    rgba(255, 255, 255, 0.3)   /* fin blanco semitransparente */
  );                            
}

.section-divider-segundo {
  border: 0;
  height: 100px;
  margin: 1rem 0;
  position: relative;
  background: linear-gradient(to right, rgba(0,198,255,0), #00c6ff, #0072ff, #00c6ff, rgba(0,198,255,0));
}

/* Esto añade el patrón animado encima de la línea */
.section-divider-segundo::after {
  content: attr(data-title);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  color: #ffffff;
  animation: arrowMove 3s linear infinite;
  text-align: center;
  white-space: pre-line; /* respeta saltos de línea */
}

/* Animación de vaivén horizontal */
@keyframes arrowMove {
  0%   { transform: translate(-50%, -50%) translateX(-10px); }
  50%  { transform: translate(-50%, -50%) translateX(10px); }
  100% { transform: translate(-50%, -50%) translateX(-10px); }
}

/* Testimonios en cursiva */
.divider-testimonio::after {
  font-style: italic;      /* ← pone el texto en cursiva */
  white-space: pre-line;   /* conserva saltos de línea */
  text-align: center;
  color: #ffffff;
  animation: arrowMove 3s linear infinite;
}


/*PARPADEO DEL CARGANDO*/
@keyframes blink {
  0%, 49% { color: #ffffff; }
  50%, 100% { color: #00b3ff; } /* alterna color */
}


/*MÓVIL/*
/*FUERZO A JUNTAR IMAGEN Y TEXTO INICIAL */
@media(max-width:768px){
  .hero {
    flex-direction: column !important;   /* apilar verticalmente */
    align-items: center !important;      /* centrar horizontalmente */
    justify-content: flex-start !important; /* que estén pegados arriba */
    gap: 0 !important;                   /* quitar espacio entre ellos */
    padding: 2rem 1rem !important;       /* padding ajustado */
    height: auto !important;             /* que se adapte al contenido */
  }

  .hero-text, .hero-image {
    flex: none !important;               /* eliminar flex:1 */
    width: 100% !important;              /* ocupar todo el ancho disponible */
    max-width: 500px !important;         /* limitar tamaño */
    margin: 0 !important;                /* eliminar margen extra */
  }

  .hero-text { margin-bottom: 0 !important; }   /* pegado a la imagen */
  .hero-image { margin-top: 0 !important; }     /* pegado al texto */

  .hero-image img {
    width: 100% !important;               /* que la imagen se adapte */
    height: auto !important;              /* mantener proporción */
    display: block !important;
  }
}


/* Animación apertura */
.mobile-navbar.open {
  display: flex;
  animation: slideDown 0.4s ease-out forwards;
}

/* Animación cierre */
.mobile-navbar.close {
  animation: slideUp 0.4s ease-in forwards;
}

/* Slide desde arriba al abrir */
@keyframes slideDown {
  0%   { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Slide hacia arriba al cerrar */
@keyframes slideUp {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0; }
}


/*ESTO VUELVE INVISIBLE LA BARRA EN MÓVIL*/
@media (max-width: 768px) {
  /* Elimina el fondo y bordes del contenedor en móvil */
  .navbar-wrapper {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    padding: 0.5rem 0; /* solo un poco para la hamburguesa */
    height: auto !important;
  }

  /* Oculta la navbar de escritorio */
  .navbar {
    display: none !important;
  }

  /* La hamburguesa se queda visible */
  .mobile-hamburger {
    display: flex !important;
  }
}


/*ANIMACIÓN INTRO*/
.hero {
  opacity: 0;
  transform: scale(1.2);
  animation: 
    heroEntrance 1.5s ease-out 2s forwards,  /* retraso de 4s */
    gradientFlow 4s ease-in-out infinite 2.5s; /* empieza justo después de la entrada */
}

/* Animación de entrada */
@keyframes heroEntrance {
  0% {
    opacity: 0;
    transform: scale(1.2) rotate(-3deg);
    filter: brightness(0.5) blur(8px);
    clip-path: inset(0 100% 0 0);
  }
  30% {
    opacity: 0.6;
    transform: scale(1.05) rotate(1deg);
    filter: brightness(1.2) blur(4px);
    clip-path: inset(0 50% 0 0);
  }
  60% {
    opacity: 0.9;
    transform: scale(1.02) rotate(-1deg);
    filter: brightness(1.1) blur(2px);
    clip-path: inset(0 20% 0 0);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: brightness(1) blur(0);
    clip-path: inset(0 0 0 0);
  }
}

/* Animación de gradiente */
@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}



/* ONLINE USERS */
  .online-users {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: bold;
  margin-right: 15px;
}

.online-number {
  color: red;
  font-size: 1.1rem;
}


.btn-publicar {
  background: linear-gradient(135deg,#FFC107,#FF9800);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.2s, filter 0.2s;
}

.btn-publicar:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}



/* 📱 Testimonios responsive en móvil */
@media (max-width: 768px) {
  .divider-testimonio::after {
    display: block;         /* se comporta como bloque */
    width: 100%;            /* ocupa todo el ancho */
    font-size: 0.95rem;     /* texto más pequeño */
    line-height: 1.4;       /* más espacio entre líneas */
    padding: 0 1rem;        /* margen lateral */
    word-wrap: break-word;  /* evita que se salga el texto */
    white-space: normal;    /* forzar saltos de línea */
  }

  .section-divider-segundo {
    height: auto;           /* se adapta al contenido */
    padding: 3.5rem 0;      /* más espacio arriba y abajo */
  }
}
