/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background: #000000;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

/* Header */
.header {
  width: 100%;
  padding: 15px 200px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0; left: 0;
  z-index: 1001;
}

.menu-btn {
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1003;
  position: relative;
}

.menu-btn span {
  height: 3px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center; /* clave para que rote desde el centro */
  position: absolute;
  left: 0;
}

/* Estado normal (hamburguesa) */
.menu-btn span:nth-child(1) {
  top: 0;
}
.menu-btn span:nth-child(2) {
  top: 9px; /* centro */
}
.menu-btn span:nth-child(3) {
  bottom: 0;
}

/* Estado activo (X completa) */
.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 9px; /* mueve al centro */
}

.menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: auto; 
  top: 9px; /* mueve al centro */
}


/* Sidebar (solo móvil) */
/* Sidebar (solo móvil) */
.sidebar {
  position: fixed;
  top: 0; left: -260px;
  width: 260px;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sidebar.active { left: 0; }

/* Logo */
.sidebar-logo {
  text-align: center;
  margin-bottom: 30px;
}
.sidebar-logo img {
  width: 140px;
  height: auto;
}

/* Menú */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar ul li {
  margin-bottom: 18px;
}
.sidebar ul li a {
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  transition: 0.3s;
}
.sidebar ul li a:hover {
  color: #ff0000;
}

/* Footer redes y ubicación */
.sidebar-footer {
  text-align: center;
}
.sidebar-footer p {
  color: #fff;
  margin-bottom: 10px;
  font-size: 14px;
}
.sidebar-social {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.sidebar-social a img {
  width: 28px;
  height: 28px;
  filter: brightness(1) invert(0);
  transition: transform 0.3s ease, filter 0.3s ease;
}
.sidebar-social a img:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px #ffffff);
}


/* Overlay con blur */
.overlay {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.4); /* un poco más claro que antes */
  backdrop-filter: blur(8px);   /* efecto blur */
  -webkit-backdrop-filter: blur(8px); /* compatibilidad Safari */
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 1000;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Nav Desktop */
.nav-desktop {
  display: none;
}
.nav-desktop ul {
  display: flex;
  gap: 20px;
  list-style: none;
}
.nav-desktop ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  transition: 0.3s;
}
.nav-desktop ul li a:hover {
  color: #ff0000;
}
/* Preloader */
    #preloader {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: #000000; /* color de fondo */
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 9999;
      transition: opacity 0.8s ease, visibility 0.8s ease;
    }
    #preloader.hidden {
      opacity: 0;
      visibility: hidden;
    }
    #preloader img {
      width: 120px;
      animation: zoomIn 1.5s infinite alternate ease-in-out;
    }
    @keyframes zoomIn {
      from { transform: scale(0.9); opacity: 0.8; }
      to { transform: scale(1.1); opacity: 1; }
    }
/* Fondo oscuro */
  .popup {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.4s ease;
  z-index: 10000;
}
.popup.active {
  opacity: 1;
  visibility: visible;
}

/* Caja del popup */
.popup-content {
  background: #fff;
  padding: 5px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: popIn 0.5s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}
@keyframes popIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Poster */
.popup-poster {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Botón cerrar (mejorado) */
.popup-close {
  position: absolute;
  top: 1px; 
  right: 1px;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  font-weight: bold;
  background: rgba(0,0,0,0.05);
  border-radius: 50%;
  cursor: pointer;
  color: #ffffff;
  transition: 0.3s ease;
}
.popup-close:hover {
  background: rgba(0,0,0,0.15);
  color: #ff0000;
  transform: rotate(90deg);
}

/* Botón contáctame */
.popup-btn {
  display: inline-block;
  margin-top: 5px;
  padding: 10px 20px;
  background: #d32525;
  color: #fff;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s;
}
.popup-btn:hover {
  background: #be1e1e;
  transform: scale(1.05);
}

/* Contenido */
/* ===== INICIO JHV ===== */
#inicio {
  padding-top: 120px; /* al menos igual o mayor que la altura del header */
}
.inicio {
  width: 100%;
  height: 100vh;
  background: url("../img/Poster\ Inicio.png") no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.inicio::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55); /* overlay oscuro */
  z-index: 1;
}

.inicio-contenido {
  position: relative;
  z-index: 2;
  max-width: 850px;
  padding: 20px;
  animation: fadeUp 1.5s ease;
}

.inicio h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.inicio h1 span {
  color: #ffffff; /* amarillo positivo/valores */
}

.intro-text {
  font-size: 1.2rem;
  margin-bottom: 30px;
  line-height: 1.8;
  color: #e5e7eb;
}

.btn-inicio {
  display: inline-block;
  padding: 12px 30px;
  background: #fa1515;
  color: #ffffff;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}
.btn-inicio:hover {
  background: #ea0808;
  transform: scale(1.05);
}

/* Animación */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .inicio h1 {
    font-size: 2rem;
  }
  .intro-text {
    font-size: 1rem;
  }
}
/* SECCIÓN DE PROYECTOS*/
/* ===== SECCIÓN PROYECTOS ===== */
.proyectos-section {
  background: #000000;
  color: #fff;
  padding: 90px 20px;
  text-align: center;
}

.proyectos-section .container {
  padding: 15px 200px; /* Respeta tu parámetro */
}

.titulo-seccion {
  font-size: 2.5rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #ffffff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitulo-seccion {
  font-size: 1.2rem;
  color: #cbd5e1;
  margin-bottom: 50px;
}

/* Galería en grid */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.galeria-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.galeria-item:hover {
  transform: translateY(-6px);
}

.galeria-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 1024px) {
  .proyectos-section .container {
    padding: 15px 100px;
  }
  .galeria-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .proyectos-section .container {
    padding: 15px 40px;
  }
  .galeria-grid {
    grid-template-columns: 1fr;
  }
}

/* SECCIÓN DE SERVICIOS*/
/* ===== Sección Servicios ===== */
.servicios-section {
  padding: 85px 20px;
  background: 
    linear-gradient(90deg, #ff0000d7, #ff0000f3),
    url('../img/Fondo2.jpg') repeat;
  background-blend-mode: overlay;
  background-size: cover;
  text-align: center;
}



.servicios-section .container {
  max-width: 1200px;
  margin: auto;
}

.titulo-seccion {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ffffff;
}

.subtitulo-seccion {
  font-size: 1.1rem;
  color: #ffffff;
  margin-bottom: 50px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.servicio-card {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 30px 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.servicio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.servicio-card img {
  width: 70px;
  margin-bottom: 20px;
}

.servicio-card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #e63946;
}

.servicio-card p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
}
/*SECCIÓN DE SOBRE MÍ*/
/* ===== Sección Sobre mí ===== */
/* Aseguramos que sea rojo y forzamos prioridad */
.titulo-seccion-h3 {
  color: #e63946 !important;
  font-size: 28px;
  font-weight: bold;
}

.sobre-section {
  padding: 85px 20px;
  background: url(../img/Fondo.jpg) #f8f9fa;
}

.sobre-contenido {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  gap: 40px;
}

.sobre-img {
  flex: 1 1 300px;
  text-align: center;
}

.sobre-img img {
  width: 100%;
  max-width: 350px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.sobre-texto {
  flex: 1 1 500px;
}

.sobre-texto h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: #000000;
}

.sobre-texto .subtitulo-seccion {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 20px;
}

.sobre-texto p {
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 15px;
}

.sobre-lista {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.sobre-lista li {
  font-size: 1rem;
  color: #333;
  margin-bottom: 10px;
}

.sobre-lista li::before {
  content: "✔";
  color: #e63946;
  margin-right: 8px;
}

.btn-sobre {
  display: inline-block;
  padding: 12px 25px;
  background: #e63946;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.3s ease;
}

.btn-sobre:hover {
  background: #b92d37;
}

/*SECCIÓN DE CONTACTO*/
/* ===== SECCIÓN CONTACTO ===== */

.contacto {
  /* Imagen de fondo con degradado superpuesto */
  background:url("../img/Bg\ Contacto.webp") no-repeat center center/cover;
  padding: 90px 20px;
  color: #000000;
  text-align: center;
  position: relative;
}


.contacto-container {
  max-width: 1200px;
  margin: auto;
  z-index: 2;
  position: relative;
}

.contacto-title {
  font-size: 2.8rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #ff0000, #f16363);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contacto-subtitle {
  font-size: 1.2rem;
  color: #000000;
  margin-bottom: 50px;
}

/* Layout */
.contacto-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: flex-start;
}

/* Tarjetas Glassmorphism */
.card-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(15px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  text-align: left;
  transition: transform 0.3s ease;
}
.card-glass:hover {
  transform: translateY(-5px);
}

/* Información */
.contacto-info h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #000000;
}

.contacto-info p {
  margin: 12px 0;
  font-size: 1rem;
  color: #000000;
}

.contacto-info a {
  color: #ff000d;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}
.contacto-info a:hover {
  color: #fa6060;
  text-decoration: underline;
}

/* Formulario */
.contacto-form h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #f83838;
}

/* Inputs flotantes */
.input-group {
  position: relative;
  margin-bottom: 25px;
}
.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-bottom: 2px solid #64748b;
  background: transparent;
  color: #000000;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}
.input-group label {
  position: absolute;
  left: 0;
  top: 12px;
  color: #000000;
  font-size: 1rem;
  pointer-events: none;
  transition: 0.3s;
}
.input-group input:focus,
.input-group textarea:focus {
  border-color: #f83838;
}
.input-group input:focus ~ label,
.input-group input:valid ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:valid ~ label {
  top: -10px;
  font-size: 0.85rem;
  color: #f83838;
}

/* Botón */
.btn-enviar {
  background: linear-gradient(90deg, #f16363, #f87e38);
  border: none;
  color: #fff;
  font-weight: bold;
  padding: 14px 28px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  width: 100%;
  transition: all 0.3s ease;
}
.btn-enviar:hover {
  background: linear-gradient(90deg, #f83838, #f16363);
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .contacto-content {
    grid-template-columns: 1fr;
  }
}

/* Footer */
/* ====== FOOTER ====== */
.footer {
  padding: 20px;
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 14px;
  position: relative;
}

.footer p {
  margin-bottom: 10px;
}

.footer .social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.footer .social-icons a img {
  width: 28px;
  height: 28px;
  filter: brightness(1) invert(0); /* pone iconos blancos si son negros */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.footer .social-icons a img:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px #ffffff);
}
/* ====== FOOTER ====== */
.footer {
  padding: 20px;
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 14px;
  position: relative;
}

.footer p {
  margin-bottom: 10px;
}

.footer .social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.footer .social-icons a img {
  width: 28px;
  height: 28px;
  filter: brightness(1) invert(0); /* pone iconos blancos si son negros */
  transition: transform 0.3s ease, filter 0.3s ease;
}

.footer .social-icons a img:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px #ffffff);
}

/* ===== POPUP MODAL (nuevo) ===== */
/* ===== MODAL AVISO ===== */
/* ===== Estilo elegante para enlace ===== */
#openModal {
  font-size: 12px;
  font-weight: 600;
  color: #e81a1a;
  text-decoration: none;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

#openModal::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: 0;
  background: #e81a1a;
  transition: width 0.3s ease;
}

#openModal:hover {
  color: #ffffff;
}

#openModal:hover::after {
  width: 100%;
}

.modal-aviso {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 9999;
  overflow-y: auto;
}

.modal-aviso-content {
  background: linear-gradient(135deg, #ffffff, #ffffff);
  color: #000000;
  margin: 5% auto;
  padding: 30px 40px;
  border-radius: 14px;
  width: 70%;
  max-width: 1920px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  animation: fadeIn 0.3s ease;
  line-height: 1.7;
  text-align: left;
}

.modal-aviso-content h2 {
  margin-bottom: 20px;
  font-size: 26px;
  border-bottom: 2px solid #64748b;
  padding-bottom: 10px;
  color: #000000; /* celeste tecnológico */
}

.modal-aviso-content h3 {
  margin-top: 20px;
  color: #fa1515; /* amarillo brillante */
  font-size: 18px;
}

.modal-aviso-content ul {
  margin: 10px 0 20px 20px;
  list-style: disc;
}

.modal-aviso-content a {
  color: #f83838;
  text-decoration: none;
}
.modal-aviso-content a:hover {
  text-decoration: underline;
}

.modal-actions {
  text-align: center;
  margin-top: 25px;
}

.btn-close {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn-close:hover {
  background: #dc2626;
}

/* Animación */
@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.95);}
  to {opacity: 1; transform: scale(1);}
}

/* Responsive */
@media (max-width: 768px) {
  .modal-aviso-content {
    width: 90%;
    padding: 20px;
  }
}


/* ===== RESPONSIVE ===== */
@media (min-width: 769px) {
  .menu-btn { display: none; }       /* Esconde hamburguesa */
  .sidebar { display: none; }        /* Esconde sidebar */
  .overlay { display: none; }        /* Esconde overlay */
  .nav-desktop { display: block; }   /* Muestra nav en escritorio */
}
/* Para móviles y tablets */
@media (max-width: 768px) {
  .header {
    padding: 15px 20px; /* más compacto en móviles */
  }
}

.toast-mensaje {
  position: fixed;
  top: 25px;
  right: 25px;
  width: min(390px, calc(100% - 30px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  background: rgba(18, 22, 30, 0.96);
  color: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(15px);
  z-index: 99999;

  opacity: 0;
  visibility: hidden;
  transform: translateX(120%);
  transition:
    opacity 0.4s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.4s;
}

.toast-mensaje.mostrar {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.toast-mensaje.ocultar {
  opacity: 0;
  transform: translateX(120%);
}

.toast-icono {
  flex: 0 0 45px;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #17d784, #08a860);
  box-shadow: 0 8px 20px rgba(23, 215, 132, 0.25);
}

.toast-icono svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast-contenido {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.toast-contenido strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.toast-contenido span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  line-height: 1.45;
}

.toast-cerrar {
  align-self: flex-start;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.toast-cerrar:hover {
  color: #ffffff;
}

.toast-progreso {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 3px;
  border-radius: 3px;
  background: #17d784;
  transform-origin: left;
}

.toast-mensaje.mostrar .toast-progreso {
  animation: toastProgreso 5s linear forwards;
}

.toast-mensaje.error .toast-icono {
  background: linear-gradient(135deg, #ff5f6d, #e63246);
}

.toast-mensaje.error .toast-progreso {
  background: #ff5f6d;
}

@keyframes toastProgreso {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@media (max-width: 600px) {
  .toast-mensaje {
    top: 15px;
    right: 15px;
    left: 15px;
    width: auto;
  }
}