/* ===============================
   KRAKEM PREMIUM DESIGN SYSTEM
   =============================== */

:root {
  --color-bg: #0b0f14;
  --color-bg-soft: #10151c;
  --color-panel: #151b23;
  --color-text: #e9eef5;
  --color-muted: #9aa4b2;
  --color-primary: #00aaff;
  --color-accent: #ff2d2d;

  --radius-soft: 12px;
  --radius-round: 20px;

  --blur-glass: blur(10px);

  --shadow-soft: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 18px rgba(0,170,255,0.25);

  --transition: 0.3s ease;
}

:root {
  --electric-blue: #00e5ff;  /* azul eléctrico */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}



.header {
  background: #0a2540;
  color: white;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
}

/* ===== SLIDER PROFESIONAL ===== */

.slider {
  position: relative;
  height: 55vh;              /* 👈 mejor proporción */
  min-height: 420px;
  overflow: hidden;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.8s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Overlay oscuro elegante */
.slider-overlay {
  position: absolute;
  inset: 0;
 background: linear-gradient(
  to right,
  rgba(10,37,64,0.75),
  rgba(10,37,64,0.35)
);


  display: flex;
  align-items: center;
}

/* Contenido alineado */
.slider-content {
  max-width: 1000px;
  padding: 0 40px;
  margin: auto;
  color: white;
}

.slider-content h1 {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.2;
}

.slider-content p {
  font-size: 18px;
  max-width: 600px;
  opacity: 0.95;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .slider {
    height: 45vh;
  }

  .slider-content h1 {
    font-size: 28px;
  }

  .slider-content p {
    font-size: 15px;
  }
}

.section {
  padding: 60px 20px;
  max-width: 1000px;
  margin: auto;
  text-align: center;
}

.services-home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card i {
  font-size: 36px;
  color: #0a2540;
  margin-bottom: 10px;
}

.footer {
  background: #0a2540;
  color: white;
  padding: 30px;
  text-align: center;
}

.social a {
  color: white;
  margin: 0 10px;
  font-size: 20px;
}

@media (max-width: 768px) {
  .services-home {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   BOTÓN PRINCIPAL DEL SITIO
   =============================== */
.btn-primary {
  display: inline-block;     /* Permite padding y márgenes */
  margin-top: 25px;          /* Espacio arriba del botón */
  padding: 14px 30px;        /* Tamaño del botón */
  background: #ffffff;       /* Fondo blanco */
  color: #0a2540;            /* Texto azul corporativo */
  text-decoration: none;     /* Quita subrayado */
  font-weight: 600;          /* Texto un poco más grueso */
  border-radius: 4px;        /* Bordes suaves */
  transition: all 0.3s ease; /* Animación suave */
}

/* EFECTO AL PASAR EL MOUSE */
.btn-primary:hover {
  background: #e6e6e6;       /* Gris suave al hover */
  transform: translateY(-2px); /* Se eleva un poco */
}

/* ===============================
   AJUSTES GENERALES DE TEXTO
   =============================== */

/* Texto general del sitio */
body {
  line-height: 1.6;      /* Más espacio entre líneas */
  color: #1a1a1a;        /* Negro suave (no negro puro) */
}

/* Títulos de sección */
.section h2 {
  font-size: 30px;
  font-weight: 600;
  max-width: 900px;
  margin: 0 auto 20px;
}

.section p {
  font-size: 16px;
  line-height: 1.7;
  max-width: 900px;
  margin: auto;
}

/* TARJETAS DE SERVICIOS / BENEFICIOS */
.services-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

/* ICONOS */
.service-card i {
  font-size: 36px;
  color: #0a2540; /* Azul elegante original */
  margin-bottom: 15px;
}

/* TÍTULOS */
.service-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

footer {
  text-align: center;
  padding: 25px 10px;
  background: #0a2540;   /* Azul oscuro elegante */
  color: #ffffff;        /* Texto blanco */
  font-size: 14px;
}


footer a {
  color: #9ecbff;        /* Azul claro contrastante */
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  color: #ffffff;        /* Blanco al pasar el mouse */
  text-decoration: underline;
}

/* ===============================
   ESTILO DOCUMENTOS LEGALES
   =============================== */

.section.legal {
  max-width: 900px;     /* Ancho cómodo de lectura */
  margin: 60px auto;
  text-align: left;     /* 👈 clave */
}

.section.legal h2 {
  margin-bottom: 30px;
}

.section.legal h3 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 18px;
  color: #0a2540;
}



.whatsapp-footer img {
    width: 60px;      /* ← aquí controlas el tamaño */
    height: auto;     /* mantiene proporción */
    margin-top: 10px;
    transition: transform 0.3s ease;
}

.whatsapp-footer img:hover {
    transform: scale(1.1);
}

footer .whatsapp-footer img {
    width: 60px !important;
    height: auto !important;
    display: inline-block;
}

  
/* ICONOS SOCIALES FOOTER */
.footer-social {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
}

.footer-social a {
    font-size: 32px;                /* MÁS GRANDES */
    color: #cfd8dc;                 /* Gris claro elegante */
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-social a:hover {
    transform: scale(1.18);
}

/* Colores individuales al hover */
.footer-social a:hover .fa-facebook-f {
    color: #1877F2;                 /* Azul Facebook */
}

.footer-social a:hover .fa-whatsapp {
    color: #25D366;                 /* Verde WhatsApp */
}

/* FUERZA ICONOS FACEBOOK Y WHATSAPP DEL FOOTER */
footer i.fa-facebook-f,
footer i.fa-whatsapp {
    font-size: 25px !important;
    margin: 0 12px;
    transition: transform 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

/* EFECTO HOVER */
footer i.fa-facebook-f:hover {
    transform: scale(1.2);
    color: #1877F2 !important;
}

footer i.fa-whatsapp:hover {
    transform: scale(1.2);
    color: #25D366 !important;
}

footer i.fa-facebook-f,
footer i.fa-whatsapp {
    margin-top: 16px;
}

/* ===== MENÚ NAV ANIMADO ===== */

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    position: relative;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* línea animada */
.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background-color: #25D366; /* cámbialo si quieres */
    transition: width 0.3s ease;
}

/* hover */
.nav a:hover {
    color: #25D366;
    transform: translateY(-2px);
}

.nav a:hover::after {
    width: 100%;
}

.nav a.active {
    color: #25D366;
}

.nav a.active::after {
    width: 100%;
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

/* LOGO */
.logo a {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}


/* =========================
   MENÚ DESKTOP
   ========================= */
.nav {
    display: flex; /* siempre visible en desktop */
    flex-direction: row;
    align-items: center;
    gap: 30px;
    position: static;
    background: none;
    padding: 0;
    z-index: 1000;
}

.nav a {
    color: #ffffff;
    font-size: 1rem;
    padding: 8px 12px;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative; /* necesario para underline animado */
}

/* UNDERLINE ANIMADO */
.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #25D366;
    transition: width 0.3s ease, left 0.3s ease;
    transform: translateX(-50%);
}

.nav a:hover::after {
    width: 60%;
    left: 50%;
}

.nav a:hover {
    color: #25D366;
    transform: scale(1.05);
}

/* BOTÓN HAMBURGUESA oculto en desktop */
.menu-toggle {
    display: none;
}

/* =========================
   MENÚ PREMIUM MÓVIL
   ========================= */
@media (max-width: 768px) {

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 32px;
        height: 24px;
        cursor: pointer;
        z-index: 2000;
    }

    .menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #ffffff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* ANIMACIÓN ☰ → ✕ */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .nav {
        position: absolute;
        top: 64px;
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        width: 90%;
        background: rgba(13, 27, 42, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.4);
        border-radius: 15px;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 30px 0;
        display: none;
        opacity: 0;
        transition: all 0.5s ease;
        z-index: 1500;
    }

    .nav.active {
        display: flex;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .nav a {
        font-size: 1.1rem;
        padding: 12px 0;
        position: relative;
    }

    /* UNDERLINE ANIMADO MÓVIL / TOQUE */
    .nav a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background-color: #25D366;
        transition: width 0.3s ease, left 0.3s ease;
        transform: translateX(-50%);
    }

    .nav a:hover::after,
    .nav a:focus::after,
    .nav a:active::after {
        width: 60%;
        left: 50%;
    }

    .nav a:hover,
    .nav a:focus,
    .nav a:active {
        color: #25D366;
        transform: scale(1.05);
    }
}


.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.services-hero {
  text-align: center;
  margin-bottom: 50px;
}

.services-hero h2 {
  font-size: 2.5rem;
  color: #0d1b2a;
  margin-bottom: 15px;
}

.services-hero p {
  font-size: 1.1rem;
  color: #333;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 30px;
}

/* =========================
   TARJETAS DE SERVICIO PREMIUM
   ========================= */
.service-item {
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding: 20px;

  /* Transición para hover */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Elevación y ligero movimiento al pasar el mouse */
.service-item:hover {
  transform: translateY(-5px); /* se eleva ligeramente */
  box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* sombra suave */
}

/* Imagen de servicio con efecto zoom */
.service-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;

  /* Transición suave para zoom */
  transition: transform 0.3s ease;
}

/* Zoom ligero en la imagen */
.service-img img:hover {
  transform: scale(1.05); /* aumenta un 5% */
}

/* Texto y botón */
.service-text h3 {
  font-size: 1.4rem;
  color: #0d1b2a;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.service-text p {
  font-size: 0.95rem;
  color: #555;
}

.btn-cta {
  background: linear-gradient(135deg, var(--color-primary), #0077ff);
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius-soft);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
}

.btn-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-glow);
}


.service-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  padding: 20px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.service-img img {
  transition: transform 0.5s ease;
}

.service-img img:hover {
  transform: scale(1.07); /* zoom ligero y elegante */
}

.btn-cta {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
}

.btn-cta:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.service-text h3 {
  transition: color 0.4s ease, transform 0.3s ease;
}

.service-item:hover .service-text h3 {
  color: #25D366;
  transform: scale(1.03);
}

/* =========================
   ESTILOS PROYECTOS 3X3 PREMIUM
   ========================= */

/* Contenedor principal */
.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* HERO / encabezado */
.projects-hero {
  text-align: center;
  margin-bottom: 50px;
}

.projects-hero h2 {
  font-size: 2.5rem;
  color: #0d1b2a;
  margin-bottom: 15px;
}

.projects-hero p {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
}

/* GRID DE PROYECTOS 3X3 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* TARJETA INDIVIDUAL */
.project-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);

  /* Inicial para animación scroll */
  opacity: 1; /* CORREGIDO: antes estaba 0 */
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

/* Hover tarjeta */
.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* Imagen */
.project-img img {
  width: 100%;
  height: 220px; /* tamaño estándar */
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Zoom al pasar el mouse */
.project-item:hover .project-img img {
  transform: scale(1.05);
}

/* Texto */
.project-text {
  padding: 20px;
}

.project-text h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #0d1b2a;
}

.project-text p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 15px;
}

/* Botón */
.btn-cta {
  display: inline-block;
  padding: 10px 24px;
  background-color: #25D366;
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-cta:hover {
  background-color: #1ebe57;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-img img {
    height: 200px;
  }
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.modal-content {
  background: #fff;
  padding: 25px;
  max-width: 800px;
  width: 90%;
  border-radius: 12px;
  text-align: center;
}

.modal-content img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
}

/* Miniaturas */
.modal-thumbs {
  display: flex;
  justify-content: center;
  gap: 4px; /* MÁS JUNTAS */
  margin-top: 12px;
  overflow-x: auto; /* Si hay muchas, scroll horizontal */
  padding-bottom: 5px;
}

.modal-thumb {
  width: 65px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  border: 1px solid rgba(255,255,255,0.18);
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.modal-thumb:hover {
  opacity: 1;
  border-color: #00e5ff; /* Azul premium */
}


.modal-thumbs img {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.3s;
}

.modal-thumbs img.active,
.modal-thumbs img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.modal-close {
  font-size: 28px;
  cursor: pointer;
  float: right;
}



/* ===================================
   BOTÓN VER PROYECTO – GLOW ANIMADO
   =================================== */

.project-item .btn-cta {
  position: relative;
  background: linear-gradient(135deg, #1f6cff, #00d4ff);
  color: #ffffff;
  border-radius: 30px;
  padding: 12px 28px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-decoration: none;
  display: inline-block;
  overflow: hidden;
  transition: all 0.35s ease;
  box-shadow: 0 0 12px rgba(0,212,255,0.6);
  animation: glowPulse 2.5s infinite ease-in-out;
}

/* GLOW BASE (PULSO SUAVE) */
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 12px rgba(31,108,255,0.5);
  }
  50% {
    box-shadow: 0 0 22px rgba(0,212,255,0.9);
  }
  100% {
    box-shadow: 0 0 12px rgba(31,108,255,0.5);
  }
}

/* HOVER: GLOW MÁS FUERTE */
.project-item .btn-cta:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow:
    0 0 15px rgba(0,212,255,0.8),
    0 0 35px rgba(31,108,255,0.7),
    0 0 60px rgba(0,212,255,0.4);
  animation-play-state: paused; /* pausa pulso para glow fuerte */
}

/* CLICK */
.project-item .btn-cta:active {
  transform: scale(0.96);
}

/* ===================================
   BOTÓN VER PROYECTO – GLOW QUE SIGUE EL MOUSE
   =================================== */

.project-item .btn-cta {
  position: relative;
  background: linear-gradient(135deg, #1f6cff, #00d4ff);
  color: #ffffff;
  border-radius: 30px;
  padding: 12px 28px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  overflow: hidden;
  transition: transform 0.25s ease;
  box-shadow: 0 8px 20px rgba(0,212,255,0.35);
}

/* Capa del glow */
.project-item .btn-cta::before {
  content: "";
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(0,212,255,0.7),
    transparent 60%
  );
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Hover */
.project-item .btn-cta:hover {
  transform: translateY(-3px) scale(1.05);
}

.project-item .btn-cta:hover::before {
  opacity: 1;
}

/* Click */
.project-item .btn-cta:active {
  transform: scale(0.97);
}

/* ==================================================
   HERO PROYECTOS
   ================================================== */

.projects-hero {
  position: relative;       /* Necesario para el overlay */
  min-height: 380px;        /* Altura del hero */

  /* 👇 RUTA ABSOLUTA DESDE /krakem */
  background-image: url('/krakem/img/proyectos/hero-proyectos.jpg');

  background-size: cover;   /* La imagen cubre todo */
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  text-align: center;
}

/* Capa oscura encima del fondo */
.projects-hero-overlay {
  position: absolute;
  inset: 0; /* top, right, bottom, left = 0 */
  background: rgba(0, 0, 0, 0.65);
  z-index: 1;
}

/* Contenido del hero */
.projects-hero-content {
  position: relative;
  z-index: 2; /* Encima del overlay */
  max-width: 900px;
  padding: 20px;
}

.projects-hero-content h2 {
  font-size: 2.6rem;
  margin-bottom: 15px;
}

.projects-hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .projects-hero {
    min-height: 280px;
  }

  .projects-hero-content h2 {
    font-size: 2rem;
  }
}

.projects-hero-overlay {
  background: linear-gradient(
    120deg,
    rgba(0,0,0,0.85),
    rgba(0,0,0,0.4)
  );
}
/* Overlay MÁS CLARO */
.projects-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* antes 0.65 */
  z-index: 1;
}

.projects-hero-content h2,
.projects-hero-content p {
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* ===== FORZAR TEXTO BLANCO EN HERO PROYECTOS ===== */
.projects-hero-content h2,
.projects-hero-content p {
  color: #ffffff !important; /* fuerza blanco */
  text-shadow: 0 3px 10px rgba(0,0,0,0.8); /* mejora lectura */
}
/* ==========================================
   PROYECTOS – TARJETA PREMIUM
   ========================================== */

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  min-height: 360px;
  cursor: pointer;

  /* Sombra premium */
  box-shadow: 0 25px 50px rgba(0,0,0,0.35);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* Imagen más suave */
  filter: brightness(0.95) saturate(1.05);
  transition: transform 0.8s ease, filter 0.8s ease;
}

/* Hover imagen */
.project-item:hover .project-img img {
  transform: scale(1.12);
  filter: brightness(0.8) saturate(1.1);
}

/* ==========================================
   PROYECTOS – TEXTO AZUL ELÉCTRICO (FORZADO)
   ========================================== */

.project-text h3,
.project-text p {
  color: var(--electric-blue) !important;

  /* Glow tech para legibilidad */
  text-shadow:
    0 0 6px rgba(0,229,255,0.9),
    0 0 18px rgba(0,229,255,0.6),
    0 6px 18px rgba(0,0,0,0.95);
}

.project-text h3 {
  font-size: 1.3rem;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.project-text p {
  font-size: 0.95rem;
  opacity: 0.95;
}

.project-text .btn-cta {
  background: linear-gradient(
    135deg,
    #00e5ff,
    #0072ff
  );
  color: #001018;

  box-shadow:
    0 0 12px rgba(0,229,255,0.8),
    0 10px 30px rgba(0,114,255,0.5);
}

.project-text .btn-cta:hover {
  box-shadow:
    0 0 22px rgba(0,229,255,1),
    0 18px 45px rgba(0,114,255,0.7);
}

/* ==============================
   PARTICULAS HERO PROYECTOS
   ============================== */



/* Ajuste de capas */
.projects-hero-overlay {
  z-index: 1;
}

.projects-hero-content {
  z-index: 2;
  position: relative;
}



/* Todo el contenido encima */
header,
section,
footer {
  position: relative;
  z-index: 1;
}


/* Canvas interno de particles */
#particles-js canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

body {
  position: relative;
  background: transparent;
}

/* ===============================
   PARTICULAS – GLOBAL DEFINITIVO
   =============================== */

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  z-index: 1;           /* 👈 CLAVE */
  pointer-events: none;
}

/* Canvas interno */
#particles-js canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Todo el contenido encima */
header,
section,
footer {
  position: relative;
  z-index: 2;
}

/* ======================================
   CONTACTO PREMIUM TECNOLOGICO
   ====================================== */

.contact-hero {
  position: relative;
  min-height: 100vh;

  background: url('/krakem/img/servicios/contact-bg.jpg') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1;
}

.contact-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  width: 100%;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;

  color: #fff;
}

/* Texto corporativo */
.contact-info h2 {
  font-size: 2.4rem;
  margin-bottom: 20px;
  color: #00e5ff;
}

.contact-info p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #dcefff;
}

/* Formulario */
.contact-form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,229,255,0.2);
  padding: 40px;
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

/* Inputs flotantes */
.form-group {
  position: relative;
  margin-bottom: 28px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(252, 247, 247, 0.3);
  color: #fff;
  padding: 10px 5px;
  font-size: 1rem;
}

.form-group textarea {
  resize: none;
  min-height: 90px;
}

.form-group label {
  position: absolute;
  left: 5px;
  top: 10px;
  color: rgba(248, 248, 248, 0.993);
  font-size: 0.9rem;
  pointer-events: none;
  transition: 0.3s;
}

/* Animación label */
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:valid + label,
.form-group textarea:valid + label {
  top: -12px;
  font-size: 0.75rem;
  color: #00e5ff;
}

/* Botón */
.contact-form .btn-cta {
  width: 100%;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
}

/* ======================================
   CONTACTO – FONDO IMAGEN JPG
   ====================================== */

.contact-hero {
  position: relative;
  min-height: 100vh;

  /* 🔴 AQUÍ CAMBIAS TU IMAGEN */
  background: url('/krakem/img/contacto/contact-bg.jpg') center center / cover no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 25, 0.75);
  z-index: 1;
}

/* ======================================
   FORMULARIO CONTACTO – FLOATING LABELS
   ====================================== */

.contact-form {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  padding: 40px;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  z-index: 2;
}

/* CONTENEDOR */
.form-group {
  position: relative;
  margin-bottom: 28px;
}

/* INPUTS */
.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 10px;
  padding: 16px 14px;
  color: #e6faff;
  font-size: 15px;
  outline: none;
}

/* TEXTAREA */
.form-group textarea {
  min-height: 120px;
  resize: none;
}

/* LABEL */
.form-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  color: rgba(0, 229, 255, 0.6);
  font-size: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  background: rgba(15, 23, 42, 0.9);
  padding: 0 6px;
  transition: 0.3s ease;
}

/* CUANDO ESCRIBES O HAY FOCUS */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 12px;
  color: #00e5ff;
}

/* BORDE ACTIVO */
.form-group input:focus,
.form-group textarea:focus {
  border-color: #00e5ff;
}

.contact-error {
  background: rgba(255, 60, 60, 0.12);
  border: 1px solid rgba(255, 60, 60, 0.35);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  color: #ff5c5c;
  text-align: center;
  font-weight: 500;
  backdrop-filter: blur(12px);
  animation: fadeIn .6s ease;
}

/* CAPTCHA ESTILO PREMIUM */
.captcha {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

/* ===============================
   VALIDACIÓN VISUAL PREMIUM
================================ */

.form-group input.valid,
.form-group textarea.valid {
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0,229,255,0.6);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #ff4d4d;
  box-shadow: 0 0 8px rgba(255,77,77,0.5);
}

.error-msg {
  font-size: 0.75rem;
  color: #ff4d4d;
  margin-top: 4px;
  display: block;
}

/* =========================
   PROYECTOS MINIMAL PREMIUM
========================= */

.projects-hero-minimal {
  text-align: center;
  padding: 90px 20px 40px;
  color: #fff;
}

.projects-hero-minimal h2 {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.projects-hero-minimal p {
  color: #9aa4b2;
  margin-top: 10px;
}

/* GRID */
.projects-grid-minimal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px 8%;
}

/* CARD */
.project-card-minimal {
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  transition: 0.35s ease;
}

.project-card-minimal:hover {
  transform: translateY(-6px);
  border-color: #00e5ff;
}

/* IMAGE */
.project-img-minimal img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: 0.4s ease;
}

.project-card-minimal:hover img {
  transform: scale(1.05);
}

/* TEXT */
.project-info-minimal {
  padding: 18px 20px;
}

/* TITULOS PROYECTOS */
.project-info-minimal h3 {
  color: #eaf6ff; /* blanco suave premium */
  font-size: 1.15rem;
  font-weight: 600;
}

/* DESCRIPCIÓN */
.project-info-minimal p {
  color: #9aa4b2; /* gris elegante */
}


/* BUTTON */
.btn-project-minimal {
  margin-top: 12px;
  background: none;
  border: none;
  color: #00e5ff;
  font-weight: 500;
  cursor: pointer;
}

.btn-project-minimal:hover {
  text-decoration: underline;
}

/* MODAL */
.modal-minimal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

.modal-content-minimal {
  max-width: 820px;
  margin: 6% auto;
  background: rgba(15, 20, 35, 0.96); /* más claro */
  padding: 25px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
}


/* ===============================
   IMAGEN MODAL TAMAÑO ESTÁNDAR
================================ */

#modalImagen {
  width: 100%;
  height: 420px; /* TAMAÑO ESTÁNDAR */
  object-fit: cover; /* Recorta sin deformar */
  border-radius: 12px;
  margin: 16px 0;
  transition: opacity 0.35s ease-in-out;
  background: #000; /* Fondo elegante si sobra espacio */
}



.modal-thumbs-minimal img {
  width: 90px;
  margin: 8px;
  cursor: pointer;
  opacity: 0.6;
}

.modal-thumbs-minimal img:hover {
  opacity: 1;
}
/* TEXTO MODAL */
.modal-content-minimal h3 {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.modal-content-minimal p {
  color: #b8c4d4;
  margin-top: 12px;
  font-size: 0.95rem;
}

/* BOTÓN CERRAR */
.modal-close {
  color: #00e5ff;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close:hover {
  color: white;
}

.modal-thumbs-minimal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
  gap: 8px;
}

.modal-thumbs-minimal img {
  width: 80px;
  height: 55px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  border: 1px solid rgba(255,255,255,0.15);
  transition: 0.25s ease;
}

.modal-thumbs-minimal img:hover {
  opacity: 1;
  transform: scale(1.06);
  border-color: #00e5ff;
}


/* --- DISEÑO BRUTAL KRAKEM --- */
:root {
    --p-accent: #00e5ff; /* Cyan tecnológico */
    --p-bg: #05080a;
    --p-glass: rgba(15, 23, 42, 0.7);
    --p-text: #f8fafc;
    --p-muted: #94a3b8;
}

.premium-bg {
    position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(circle at 50% 0%, #003244 0%, var(--p-bg) 70%);
}

.portfolio-container { max-width: 1300px; margin: 0 auto; padding: 100px 20px; }
.portfolio-header { text-align: center; margin-bottom: 70px; }
.portfolio-header h1 { font-size: clamp(2.5rem, 5vw, 4rem); color: #fff; line-height: 1.1; }
.portfolio-header h1 span { color: var(--p-accent); text-shadow: 0 0 15px rgba(0,229,255,0.4); }
.eyebrow { color: var(--p-accent); font-weight: 800; letter-spacing: 5px; font-size: 0.75rem; }

/* GRID CONFIGURATION */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

.p-card {
    background: var(--p-glass);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 25px;
    overflow: hidden;
    cursor: pointer;
    display: flex; flex-direction: column;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.p-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--p-accent);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.p-image-box {
    position: relative;
    width: 100%; aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000;
}

.p-image-box img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s ease; opacity: 0.9;
}

.p-card:hover .p-image-box img { transform: scale(1.1); opacity: 1; }

.p-badge {
    position: absolute; top: 15px; right: 15px;
    background: var(--p-accent); color: #000;
    padding: 6px 14px; font-size: 0.65rem; font-weight: 900; border-radius: 7px;
}

.p-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.p-content h3 { color: #fff; font-size: 1.5rem; margin-bottom: 12px; font-weight: 700; }
.p-content p { color: var(--p-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 25px; }

.p-link {
    margin-top: auto; color: var(--p-accent); font-weight: 700;
    display: flex; align-items: center; gap: 10px; font-size: 0.8rem;
}

/* MODAL SYSTEM */
.p-modal {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(2, 6, 12, 0.98);
    display: none; align-items: center; justify-content: center; padding: 25px;
}

.p-modal-content {
    background: #0a0f14; width: 100%; max-width: 1150px;
    border-radius: 35px; border: 1px solid rgba(0, 229, 255, 0.3);
    position: relative; overflow: hidden;
    box-shadow: 0 0 100px rgba(0,0,0,0.8);
}

.p-close {
    position: absolute; top: 25px; right: 30px;
    background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; z-index: 10;
}

.p-modal-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; }

.p-modal-gallery { padding: 35px; background: #070b10; border-right: 1px solid rgba(255,255,255,0.05); }
.p-main-wrapper { width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.1); }
.p-main-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.p-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.p-thumbs img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: 10px; opacity: 0.3; cursor: pointer; transition: 0.3s;
    border: 2px solid transparent;
}
.p-thumbs img.active { opacity: 1; border-color: var(--p-accent); }

.p-modal-info { padding: 60px 50px; color: #fff; overflow-y: auto; }
.p-modal-tag { color: var(--p-accent); font-weight: 900; font-size: 0.75rem; letter-spacing: 2px; }
.p-line { height: 3px; width: 50px; background: var(--p-accent); margin: 25px 0; }
.p-meta { color: var(--p-accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 25px; }
.p-description-box h4 { font-size: 0.8rem; letter-spacing: 2px; color: var(--p-accent); margin-bottom: 15px; }
.p-modal-info p { color: #cbd5e1; line-height: 1.8; font-size: 1rem; }

.p-btn {
    display: block; width: 100%; text-align: center;
    background: var(--p-accent); color: #000; padding: 20px;
    border-radius: 15px; font-weight: 900; text-decoration: none; margin-top: 40px;
    transition: 0.4s;
}
.p-btn:hover { box-shadow: 0 0 30px var(--p-accent); transform: scale(1.03); }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .p-modal-grid { grid-template-columns: 1fr; }
    .p-modal-content { height: 95vh; overflow-y: auto; }
}

/* Ajuste específico para las 10 miniaturas en el modal */
.p-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 2 filas de 5 imágenes */
    gap: 10px;
    margin-top: 15px;
}

.p-thumbs img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Cuadradas perfectas */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.4;
    border: 2px solid transparent;
    transition: 0.3s ease;
}

.p-thumbs img.active {
    opacity: 1;
    border-color: #00e5ff;
}

.p-main-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9; /* Formato panorámico para la foto principal */
    border-radius: 20px;
    overflow: hidden;
    background: #000;
}


/*INICIO*/

:root {
    --cyan: #00e5ff;
    --dark: #020406;
}

/* --- HERO SLIDER BASE --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh; /* Ocupa toda la pantalla */
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* CONTENEDOR DE IMÁGENES */
.slider-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; /* Al fondo */
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* La clase active fuerza visibilidad */
.slide.active {
    opacity: 0.7; /* Brillo de la imagen */
    z-index: 2;
    animation: kenBurns 12s infinite alternate;
}

@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

/* ZONA DE SEGURIDAD (PANEL LATERAL OSCURO) */
.hero-safe-zone {
    position: relative;
    z-index: 10; /* Por encima de todo */
    width: 100%;
    height: 100%;
    /* Gradiente negro sólido a la izquierda para que el texto sea blanco sobre negro */
    background: linear-gradient(90deg, 
        rgba(0,0,0,0.95) 0%, 
        rgba(0,0,0,0.8) 30%, 
        rgba(0,0,0,0) 100%);
    display: flex;
    align-items: center;
    padding: 0 8%;
}

.hero-content {
    max-width: 650px;
}

.hero-tag {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 5px;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    color: #fff;
    line-height: 0.9;
    font-weight: 900;
    margin-bottom: 25px;
}

.hero-content h1 span {
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(0,229,255,0.4);
}

.hero-content p {
    color: #cbd5e1;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
}

/* BOTONES */
.hero-actions { display: flex; align-items: center; gap: 30px; }

.btn-brutal {
    background: var(--cyan);
    color: #000;
    padding: 18px 40px;
    font-weight: 900;
    text-decoration: none;
    border-radius: 4px;
    transition: 0.3s ease;
}

.btn-brutal:hover {
    box-shadow: 0 0 40px var(--cyan);
    transform: translateY(-3px);
}

.hero-links a {
    color: #fff;
    text-decoration: none;
    margin-right: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
}

.hero-links a:hover {
    color: var(--cyan);
    border-bottom: 2px solid var(--cyan);
}

/* SECCIÓN INFERIOR */
.home-intro { padding: 100px 0; background: var(--dark); color: #fff; }
.container-premium { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.intro-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: center; }
.intro-title h2 { font-size: 3rem; line-height: 1; }
.intro-title h2 span { color: var(--cyan); }
.intro-text p { font-size: 1.2rem; color: #94a3b8; line-height: 1.8; }


/* --- SECCIÓN INTRO PREMIUM CON PARTÍCULAS --- */
.home-intro-premium {
    position: relative;
    padding: 120px 0;
    /* Gradiente para dar profundidad en lugar de negro sólido */
    background: radial-gradient(circle at 50% 50%, #0a1622 0%, #050a0f 100%);
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
}

/* Contenedor de partículas absoluto */
#particles-intro {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.5; /* Para que no distraiga demasiado del texto */
}

.container-premium {
    position: relative;
    z-index: 10; /* Por encima de las partículas */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

/* Título con estilo */
.intro-title h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
    font-weight: 900;
}

.intro-title h2 span {
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.tech-accent-line {
    width: 80px;
    height: 4px;
    background: var(--cyan);
    margin-top: 20px;
    border-radius: 2px;
}

/* Caja de texto con efecto Cristal (Glassmorphism) */
.intro-text-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.intro-text-box p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 30px;
}

.intro-stats-row {
    display: flex;
    gap: 30px;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cyan);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 900px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .intro-text-box { padding: 30px; }
}


#particles-intro {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Esto lo pone detrás del texto pero delante del fondo negro */
    pointer-events: none;
}

.home-intro-premium {
    position: relative; /* Necesario para que las partículas se queden adentro */
    background: radial-gradient(circle at center, #0a1622 0%, #050a0f 100%);
    overflow: hidden;
}



/* --- MODAL SYSTEM REPARADO --- */
.p-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(2, 6, 12, 0.98);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(10px);
}

/* BOTÓN CERRAR - Posición absoluta y fija */
.p-close {
    position: fixed;
    top: 20px;
    right: 30px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid var(--p-accent);
    color: var(--p-accent);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001; /* Siempre por encima */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.p-close:hover {
    background: var(--p-accent);
    color: #000;
}

.p-modal-content {
    background: #0a1118;
    width: 100%;
    max-width: 1200px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    position: relative;
}

.p-modal-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
}

/* CONTENEDOR DE IMAGEN (NADA SE CORTA) */
.p-main-wrapper {
    width: 100%;
    height: 500px; /* Altura estándar brutal */
    background: #000; /* Fondo negro para que no distraiga */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
}

.p-main-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 👈 ESTO EVITA QUE SE CORTEN */
    transition: opacity 0.4s ease;
}

/* MINIATURAS */
.p-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.p-thumbs img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover; /* Las pequeñas sí pueden cortarse para simetría */
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.4;
    border: 2px solid transparent;
}

.p-thumbs img.active {
    opacity: 1;
    border-color: var(--p-accent);
}

@media (max-width: 1024px) {
    .p-modal-grid { grid-template-columns: 1fr; }
    .p-main-wrapper { height: 350px; }
    .p-modal-content { height: 90vh; overflow-y: auto; }
}

/* Esto hace que la imagen se vea COMPLETA y no cortada */
.p-main-wrapper {
    width: 100%;
    height: 450px; 
    background: #000; /* Fondo negro para los bordes si la foto es delgada */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    overflow: hidden;
}

.p-main-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* 👈 LA CLAVE: contain para no cortar, cover corta */
}

/* Esto asegura que el botón cerrar siempre funcione */
.p-close {
    position: fixed;
    top: 25px;
    right: 30px;
    z-index: 10005 !important; /* Por encima de TODO */
    cursor: pointer;
    background: #00e5ff;
    color: #000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    font-weight: bold;
}

/* --- ESTANDARIZACIÓN DEL MODAL --- */
.p-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(5, 10, 20, 0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* El botón cerrar siempre visible y arriba */
.p-close {
    position: fixed;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    transition: 0.3s;
}

.p-close:hover { color: var(--p-accent); transform: rotate(90deg); }

.p-main-wrapper {
    width: 100%;
    height: 450px; /* ALTURA ESTÁNDAR */
    background: #000; /* Fondo negro para que no se vea vacío si la foto es delgada */
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.p-main-wrapper img {
    max-width: 100%;
    max-height: 100%;
    /* LA CLAVE: contain muestra la imagen entera sin recortar nada */
    object-fit: contain; 
    transition: opacity 0.4s ease;
}

/* Miniaturas en cuadrícula perfecta */
.p-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.p-thumbs img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
}

.p-thumbs img.active, .p-thumbs img:hover {
    opacity: 1;
    border: 2px solid var(--p-accent);
}

/* --- MODAL DASHBOARD STYLE --- */
.p-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(2, 6, 12, 0.98);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.p-modal-content {
    background: #0a1118;
    width: 100%;
    max-width: 1200px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.p-modal-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr; /* Más espacio para la imagen */
}

/* IMAGEN PRINCIPAL (ESTANDARIZADA - COVER) */
.p-main-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.p-main-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 👈 Se llena el recuadro, estilo cinemático */
    transition: 0.3s;
}

/* MINIATURAS PEQUEÑAS Y ELEGANTES */
.p-thumbs {
    display: grid;
    grid-template-columns: repeat(10, 1fr); /* Las 10 en una sola línea */
    gap: 8px;
    padding: 15px;
    background: #070b10;
}

.p-thumbs img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.4;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.3s;
}

.p-thumbs img.active {
    opacity: 1;
    border-color: #00e5ff;
    transform: scale(1.05);
}

/* INFORMACIÓN LADO DERECHO (FORMATO PROFESIONAL) */
.p-modal-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}

.p-modal-tag {
    color: #00e5ff;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.p-modal-info h2 {
    color: #fff;
    font-size: 2rem;
    margin: 10px 0;
    line-height: 1.1;
}

.p-meta {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 25px;
    font-weight: 500;
}

.info-section {
    margin-bottom: 30px;
}

.info-section h4 {
    color: #00e5ff;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section p {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.95rem;
}

.tech-specs {
    list-style: none;
    padding: 0;
}

.tech-specs li {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-specs i { color: #00e5ff; font-size: 0.7rem; }

.p-btn {
    margin-top: auto;
    background: #00e5ff;
    color: #000;
    text-align: center;
    padding: 18px;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.p-btn:hover { box-shadow: 0 0 20px rgba(0,229,255,0.4); transform: translateY(-2px); }

/* BOTÓN CERRAR */
.p-close {
    position: absolute;
    top: 30px; right: 30px;
    color: #fff; font-size: 35px;
    background: none; border: none; cursor: pointer;
}

/* ===============================
   KRAKEM PREMIUM DESIGN SYSTEM
   =============================== */

:root {
  --color-bg: #0b0f14;
  --color-bg-soft: #10151c;
  --color-panel: #151b23;
  --color-text: #e9eef5;
  --color-muted: #9aa4b2;
  --color-primary: #00aaff;
  --color-accent: #ff2d2d;

  --radius-soft: 12px;
  --radius-round: 20px;

  --blur-glass: blur(10px);

  --shadow-soft: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 18px rgba(0,170,255,0.25);

  --transition: 0.3s ease;
}

:root {
  --electric-blue: #00e5ff;  /* azul eléctrico */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}



.header {
  background: #0a2540;
  color: white;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
}

/* ===== SLIDER PROFESIONAL ===== */

.slider {
  position: relative;
  height: 55vh;              /* 👈 mejor proporción */
  min-height: 420px;
  overflow: hidden;
}

.slides {
  display: flex;
  height: 100%;
  transition: transform 0.8s ease-in-out;
}

.slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Overlay oscuro elegante */
.slider-overlay {
  position: absolute;
  inset: 0;
 background: linear-gradient(
  to right,
  rgba(10,37,64,0.75),
  rgba(10,37,64,0.35)
);


  display: flex;
  align-items: center;
}

/* Contenido alineado */
.slider-content {
  max-width: 1000px;
  padding: 0 40px;
  margin: auto;
  color: white;
}

.slider-content h1 {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 15px;
  line-height: 1.2;
}

.slider-content p {
  font-size: 18px;
  max-width: 600px;
  opacity: 0.95;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .slider {
    height: 45vh;
  }

  .slider-content h1 {
    font-size: 28px;
  }

  .slider-content p {
    font-size: 15px;
  }
}

.section {
  padding: 60px 20px;
  max-width: 1000px;
  margin: auto;
  text-align: center;
}

.services-home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card i {
  font-size: 36px;
  color: #0a2540;
  margin-bottom: 10px;
}

.footer {
  background: #0a2540;
  color: white;
  padding: 30px;
  text-align: center;
}

.social a {
  color: white;
  margin: 0 10px;
  font-size: 20px;
}

@media (max-width: 768px) {
  .services-home {
    grid-template-columns: 1fr;
  }
}

/* ===============================
   BOTÓN PRINCIPAL DEL SITIO
   =============================== */
.btn-primary {
  display: inline-block;     /* Permite padding y márgenes */
  margin-top: 25px;          /* Espacio arriba del botón */
  padding: 14px 30px;        /* Tamaño del botón */
  background: #ffffff;       /* Fondo blanco */
  color: #0a2540;            /* Texto azul corporativo */
  text-decoration: none;     /* Quita subrayado */
  font-weight: 600;          /* Texto un poco más grueso */
  border-radius: 4px;        /* Bordes suaves */
  transition: all 0.3s ease; /* Animación suave */
}

/* EFECTO AL PASAR EL MOUSE */
.btn-primary:hover {
  background: #e6e6e6;       /* Gris suave al hover */
  transform: translateY(-2px); /* Se eleva un poco */
}

/* ===============================
   AJUSTES GENERALES DE TEXTO
   =============================== */

/* Texto general del sitio */
body {
  line-height: 1.6;      /* Más espacio entre líneas */
  color: #1a1a1a;        /* Negro suave (no negro puro) */
}

/* Títulos de sección */
.section h2 {
  font-size: 30px;
  font-weight: 600;
  max-width: 900px;
  margin: 0 auto 20px;
}

.section p {
  font-size: 16px;
  line-height: 1.7;
  max-width: 900px;
  margin: auto;
}

/* TARJETAS DE SERVICIOS / BENEFICIOS */
.services-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

/* ICONOS */
.service-card i {
  font-size: 36px;
  color: #0a2540; /* Azul elegante original */
  margin-bottom: 15px;
}

/* TÍTULOS */
.service-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

footer {
  text-align: center;
  padding: 25px 10px;
  background: #0a2540;   /* Azul oscuro elegante */
  color: #ffffff;        /* Texto blanco */
  font-size: 14px;
}


footer a {
  color: #9ecbff;        /* Azul claro contrastante */
  text-decoration: none;
  font-weight: 500;
}

footer a:hover {
  color: #ffffff;        /* Blanco al pasar el mouse */
  text-decoration: underline;
}

/* ===============================
   ESTILO DOCUMENTOS LEGALES
   =============================== */

.section.legal {
  max-width: 900px;     /* Ancho cómodo de lectura */
  margin: 60px auto;
  text-align: left;     /* 👈 clave */
}

.section.legal h2 {
  margin-bottom: 30px;
}

.section.legal h3 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 18px;
  color: #0a2540;
}



.whatsapp-footer img {
    width: 60px;      /* ← aquí controlas el tamaño */
    height: auto;     /* mantiene proporción */
    margin-top: 10px;
    transition: transform 0.3s ease;
}

.whatsapp-footer img:hover {
    transform: scale(1.1);
}

footer .whatsapp-footer img {
    width: 60px !important;
    height: auto !important;
    display: inline-block;
}

  
/* ICONOS SOCIALES FOOTER */
.footer-social {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
}

.footer-social a {
    font-size: 32px;                /* MÁS GRANDES */
    color: #cfd8dc;                 /* Gris claro elegante */
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-social a:hover {
    transform: scale(1.18);
}

/* Colores individuales al hover */
.footer-social a:hover .fa-facebook-f {
    color: #1877F2;                 /* Azul Facebook */
}

.footer-social a:hover .fa-whatsapp {
    color: #25D366;                 /* Verde WhatsApp */
}

/* FUERZA ICONOS FACEBOOK Y WHATSAPP DEL FOOTER */
footer i.fa-facebook-f,
footer i.fa-whatsapp {
    font-size: 25px !important;
    margin: 0 12px;
    transition: transform 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

/* EFECTO HOVER */
footer i.fa-facebook-f:hover {
    transform: scale(1.2);
    color: #1877F2 !important;
}

footer i.fa-whatsapp:hover {
    transform: scale(1.2);
    color: #25D366 !important;
}

footer i.fa-facebook-f,
footer i.fa-whatsapp {
    margin-top: 16px;
}

/* ===== MENÚ NAV ANIMADO ===== */

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    position: relative;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* línea animada */
.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background-color: #25D366; /* cámbialo si quieres */
    transition: width 0.3s ease;
}

/* hover */
.nav a:hover {
    color: #25D366;
    transform: translateY(-2px);
}

.nav a:hover::after {
    width: 100%;
}

.nav a.active {
    color: #25D366;
}

.nav a.active::after {
    width: 100%;
}

/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

/* LOGO */
.logo a {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}


/* =========================
   MENÚ DESKTOP
   ========================= */
.nav {
    display: flex; /* siempre visible en desktop */
    flex-direction: row;
    align-items: center;
    gap: 30px;
    position: static;
    background: none;
    padding: 0;
    z-index: 1000;
}

.nav a {
    color: #ffffff;
    font-size: 1rem;
    padding: 8px 12px;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative; /* necesario para underline animado */
}

/* UNDERLINE ANIMADO */
.nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #25D366;
    transition: width 0.3s ease, left 0.3s ease;
    transform: translateX(-50%);
}

.nav a:hover::after {
    width: 60%;
    left: 50%;
}

.nav a:hover {
    color: #25D366;
    transform: scale(1.05);
}

/* BOTÓN HAMBURGUESA oculto en desktop */
.menu-toggle {
    display: none;
}

/* =========================
   MENÚ PREMIUM MÓVIL
   ========================= */
@media (max-width: 768px) {

    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 32px;
        height: 24px;
        cursor: pointer;
        z-index: 2000;
    }

    .menu-toggle span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #ffffff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* ANIMACIÓN ☰ → ✕ */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    .nav {
        position: absolute;
        top: 64px;
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        width: 90%;
        background: rgba(13, 27, 42, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.4);
        border-radius: 15px;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 30px 0;
        display: none;
        opacity: 0;
        transition: all 0.5s ease;
        z-index: 1500;
    }

    .nav.active {
        display: flex;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .nav a {
        font-size: 1.1rem;
        padding: 12px 0;
        position: relative;
    }

    /* UNDERLINE ANIMADO MÓVIL / TOQUE */
    .nav a::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0;
        left: 50%;
        background-color: #25D366;
        transition: width 0.3s ease, left 0.3s ease;
        transform: translateX(-50%);
    }

    .nav a:hover::after,
    .nav a:focus::after,
    .nav a:active::after {
        width: 60%;
        left: 50%;
    }

    .nav a:hover,
    .nav a:focus,
    .nav a:active {
        color: #25D366;
        transform: scale(1.05);
    }
}


.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.services-hero {
  text-align: center;
  margin-bottom: 50px;
}

.services-hero h2 {
  font-size: 2.5rem;
  color: #0d1b2a;
  margin-bottom: 15px;
}

.services-hero p {
  font-size: 1.1rem;
  color: #333;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 30px;
}

/* =========================
   TARJETAS DE SERVICIO PREMIUM
   ========================= */
.service-item {
  background: #f9f9f9;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding: 20px;

  /* Transición para hover */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Elevación y ligero movimiento al pasar el mouse */
.service-item:hover {
  transform: translateY(-5px); /* se eleva ligeramente */
  box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* sombra suave */
}

/* Imagen de servicio con efecto zoom */
.service-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;

  /* Transición suave para zoom */
  transition: transform 0.3s ease;
}

/* Zoom ligero en la imagen */
.service-img img:hover {
  transform: scale(1.05); /* aumenta un 5% */
}

/* Texto y botón */
.service-text h3 {
  font-size: 1.4rem;
  color: #0d1b2a;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.service-text p {
  font-size: 0.95rem;
  color: #555;
}

.btn-cta {
  background: linear-gradient(135deg, var(--color-primary), #0077ff);
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius-soft);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
}

.btn-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-glow);
}


.service-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  padding: 20px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.service-img img {
  transition: transform 0.5s ease;
}

.service-img img:hover {
  transform: scale(1.07); /* zoom ligero y elegante */
}

.btn-cta {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
}

.btn-cta:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.service-text h3 {
  transition: color 0.4s ease, transform 0.3s ease;
}

.service-item:hover .service-text h3 {
  color: #25D366;
  transform: scale(1.03);
}

/* =========================
   ESTILOS PROYECTOS 3X3 PREMIUM
   ========================= */

/* Contenedor principal */
.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* HERO / encabezado */
.projects-hero {
  text-align: center;
  margin-bottom: 50px;
}

.projects-hero h2 {
  font-size: 2.5rem;
  color: #0d1b2a;
  margin-bottom: 15px;
}

.projects-hero p {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
}

/* GRID DE PROYECTOS 3X3 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* TARJETA INDIVIDUAL */
.project-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);

  /* Inicial para animación scroll */
  opacity: 1; /* CORREGIDO: antes estaba 0 */
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

/* Hover tarjeta */
.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* Imagen */
.project-img img {
  width: 100%;
  height: 220px; /* tamaño estándar */
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Zoom al pasar el mouse */
.project-item:hover .project-img img {
  transform: scale(1.05);
}

/* Texto */
.project-text {
  padding: 20px;
}

.project-text h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #0d1b2a;
}

.project-text p {
  font-size: 1rem;
  color: #555;
  margin-bottom: 15px;
}

/* Botón */
.btn-cta {
  display: inline-block;
  padding: 10px 24px;
  background-color: #25D366;
  color: #fff;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-cta:hover {
  background-color: #1ebe57;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .project-img img {
    height: 200px;
  }
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.modal-content {
  background: #fff;
  padding: 25px;
  max-width: 800px;
  width: 90%;
  border-radius: 12px;
  text-align: center;
}

.modal-content img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
}

/* Miniaturas */
.modal-thumbs {
  display: flex;
  justify-content: center;
  gap: 4px; /* MÁS JUNTAS */
  margin-top: 12px;
  overflow-x: auto; /* Si hay muchas, scroll horizontal */
  padding-bottom: 5px;
}

.modal-thumb {
  width: 65px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  border: 1px solid rgba(255,255,255,0.18);
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.modal-thumb:hover {
  opacity: 1;
  border-color: #00e5ff; /* Azul premium */
}


.modal-thumbs img {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: 0.3s;
}

.modal-thumbs img.active,
.modal-thumbs img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.modal-close {
  font-size: 28px;
  cursor: pointer;
  float: right;
}



/* ===================================
   BOTÓN VER PROYECTO – GLOW ANIMADO
   =================================== */

.project-item .btn-cta {
  position: relative;
  background: linear-gradient(135deg, #1f6cff, #00d4ff);
  color: #ffffff;
  border-radius: 30px;
  padding: 12px 28px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-decoration: none;
  display: inline-block;
  overflow: hidden;
  transition: all 0.35s ease;
  box-shadow: 0 0 12px rgba(0,212,255,0.6);
  animation: glowPulse 2.5s infinite ease-in-out;
}

/* GLOW BASE (PULSO SUAVE) */
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 12px rgba(31,108,255,0.5);
  }
  50% {
    box-shadow: 0 0 22px rgba(0,212,255,0.9);
  }
  100% {
    box-shadow: 0 0 12px rgba(31,108,255,0.5);
  }
}

/* HOVER: GLOW MÁS FUERTE */
.project-item .btn-cta:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow:
    0 0 15px rgba(0,212,255,0.8),
    0 0 35px rgba(31,108,255,0.7),
    0 0 60px rgba(0,212,255,0.4);
  animation-play-state: paused; /* pausa pulso para glow fuerte */
}

/* CLICK */
.project-item .btn-cta:active {
  transform: scale(0.96);
}

/* ===================================
   BOTÓN VER PROYECTO – GLOW QUE SIGUE EL MOUSE
   =================================== */

.project-item .btn-cta {
  position: relative;
  background: linear-gradient(135deg, #1f6cff, #00d4ff);
  color: #ffffff;
  border-radius: 30px;
  padding: 12px 28px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  overflow: hidden;
  transition: transform 0.25s ease;
  box-shadow: 0 8px 20px rgba(0,212,255,0.35);
}

/* Capa del glow */
.project-item .btn-cta::before {
  content: "";
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(0,212,255,0.7),
    transparent 60%
  );
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Hover */
.project-item .btn-cta:hover {
  transform: translateY(-3px) scale(1.05);
}

.project-item .btn-cta:hover::before {
  opacity: 1;
}

/* Click */
.project-item .btn-cta:active {
  transform: scale(0.97);
}

/* ==================================================
   HERO PROYECTOS
   ================================================== */

.projects-hero {
  position: relative;       /* Necesario para el overlay */
  min-height: 380px;        /* Altura del hero */

  /* 👇 RUTA ABSOLUTA DESDE /krakem */
  background-image: url('/krakem/img/proyectos/hero-proyectos.jpg');

  background-size: cover;   /* La imagen cubre todo */
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  text-align: center;
}

/* Capa oscura encima del fondo */
.projects-hero-overlay {
  position: absolute;
  inset: 0; /* top, right, bottom, left = 0 */
  background: rgba(0, 0, 0, 0.65);
  z-index: 1;
}

/* Contenido del hero */
.projects-hero-content {
  position: relative;
  z-index: 2; /* Encima del overlay */
  max-width: 900px;
  padding: 20px;
}

.projects-hero-content h2 {
  font-size: 2.6rem;
  margin-bottom: 15px;
}

.projects-hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .projects-hero {
    min-height: 280px;
  }

  .projects-hero-content h2 {
    font-size: 2rem;
  }
}

.projects-hero-overlay {
  background: linear-gradient(
    120deg,
    rgba(0,0,0,0.85),
    rgba(0,0,0,0.4)
  );
}
/* Overlay MÁS CLARO */
.projects-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* antes 0.65 */
  z-index: 1;
}

.projects-hero-content h2,
.projects-hero-content p {
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* ===== FORZAR TEXTO BLANCO EN HERO PROYECTOS ===== */
.projects-hero-content h2,
.projects-hero-content p {
  color: #ffffff !important; /* fuerza blanco */
  text-shadow: 0 3px 10px rgba(0,0,0,0.8); /* mejora lectura */
}
/* ==========================================
   PROYECTOS – TARJETA PREMIUM
   ========================================== */

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  min-height: 360px;
  cursor: pointer;

  /* Sombra premium */
  box-shadow: 0 25px 50px rgba(0,0,0,0.35);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* Imagen más suave */
  filter: brightness(0.95) saturate(1.05);
  transition: transform 0.8s ease, filter 0.8s ease;
}

/* Hover imagen */
.project-item:hover .project-img img {
  transform: scale(1.12);
  filter: brightness(0.8) saturate(1.1);
}

/* ==========================================
   PROYECTOS – TEXTO AZUL ELÉCTRICO (FORZADO)
   ========================================== */

.project-text h3,
.project-text p {
  color: var(--electric-blue) !important;

  /* Glow tech para legibilidad */
  text-shadow:
    0 0 6px rgba(0,229,255,0.9),
    0 0 18px rgba(0,229,255,0.6),
    0 6px 18px rgba(0,0,0,0.95);
}

.project-text h3 {
  font-size: 1.3rem;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.project-text p {
  font-size: 0.95rem;
  opacity: 0.95;
}

.project-text .btn-cta {
  background: linear-gradient(
    135deg,
    #00e5ff,
    #0072ff
  );
  color: #001018;

  box-shadow:
    0 0 12px rgba(0,229,255,0.8),
    0 10px 30px rgba(0,114,255,0.5);
}

.project-text .btn-cta:hover {
  box-shadow:
    0 0 22px rgba(0,229,255,1),
    0 18px 45px rgba(0,114,255,0.7);
}

/* ==============================
   PARTICULAS HERO PROYECTOS
   ============================== */



/* Ajuste de capas */
.projects-hero-overlay {
  z-index: 1;
}

.projects-hero-content {
  z-index: 2;
  position: relative;
}



/* Todo el contenido encima */
header,
section,
footer {
  position: relative;
  z-index: 1;
}


/* Canvas interno de particles */
#particles-js canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

body {
  position: relative;
  background: transparent;
}

/* ===============================
   PARTICULAS – GLOBAL DEFINITIVO
   =============================== */

#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  z-index: 1;           /* 👈 CLAVE */
  pointer-events: none;
}

/* Canvas interno */
#particles-js canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Todo el contenido encima */
header,
section,
footer {
  position: relative;
  z-index: 2;
}

/* ======================================
   CONTACTO PREMIUM TECNOLOGICO
   ====================================== */

.contact-hero {
  position: relative;
  min-height: 100vh;

  background: url('/krakem/img/servicios/contact-bg.jpg') center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1;
}

.contact-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  width: 100%;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;

  color: #fff;
}

/* Texto corporativo */
.contact-info h2 {
  font-size: 2.4rem;
  margin-bottom: 20px;
  color: #00e5ff;
}

.contact-info p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #dcefff;
}

/* Formulario */
.contact-form {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(0,229,255,0.2);
  padding: 40px;
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

/* Inputs flotantes */
.form-group {
  position: relative;
  margin-bottom: 28px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(252, 247, 247, 0.3);
  color: #fff;
  padding: 10px 5px;
  font-size: 1rem;
}

.form-group textarea {
  resize: none;
  min-height: 90px;
}

.form-group label {
  position: absolute;
  left: 5px;
  top: 10px;
  color: rgba(248, 248, 248, 0.993);
  font-size: 0.9rem;
  pointer-events: none;
  transition: 0.3s;
}

/* Animación label */
.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:valid + label,
.form-group textarea:valid + label {
  top: -12px;
  font-size: 0.75rem;
  color: #00e5ff;
}

/* Botón */
.contact-form .btn-cta {
  width: 100%;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
}

/* ======================================
   CONTACTO – FONDO IMAGEN JPG
   ====================================== */

.contact-hero {
  position: relative;
  min-height: 100vh;

  /* 🔴 AQUÍ CAMBIAS TU IMAGEN */
  background: url('/krakem/img/contacto/contact-bg.jpg') center center / cover no-repeat;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

.contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 25, 0.75);
  z-index: 1;
}

/* ======================================
   FORMULARIO CONTACTO – FLOATING LABELS
   ====================================== */

.contact-form {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
  padding: 40px;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  z-index: 2;
}

/* CONTENEDOR */
.form-group {
  position: relative;
  margin-bottom: 28px;
}

/* INPUTS */
.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 10px;
  padding: 16px 14px;
  color: #e6faff;
  font-size: 15px;
  outline: none;
}

/* TEXTAREA */
.form-group textarea {
  min-height: 120px;
  resize: none;
}

/* LABEL */
.form-group label {
  position: absolute;
  top: 50%;
  left: 14px;
  color: rgba(0, 229, 255, 0.6);
  font-size: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  background: rgba(15, 23, 42, 0.9);
  padding: 0 6px;
  transition: 0.3s ease;
}

/* CUANDO ESCRIBES O HAY FOCUS */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 12px;
  color: #00e5ff;
}

/* BORDE ACTIVO */
.form-group input:focus,
.form-group textarea:focus {
  border-color: #00e5ff;
}

.contact-error {
  background: rgba(255, 60, 60, 0.12);
  border: 1px solid rgba(255, 60, 60, 0.35);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
  color: #ff5c5c;
  text-align: center;
  font-weight: 500;
  backdrop-filter: blur(12px);
  animation: fadeIn .6s ease;
}

/* CAPTCHA ESTILO PREMIUM */
.captcha {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}

/* ===============================
   VALIDACIÓN VISUAL PREMIUM
================================ */

.form-group input.valid,
.form-group textarea.valid {
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0,229,255,0.6);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #ff4d4d;
  box-shadow: 0 0 8px rgba(255,77,77,0.5);
}

.error-msg {
  font-size: 0.75rem;
  color: #ff4d4d;
  margin-top: 4px;
  display: block;
}

/* =========================
   PROYECTOS MINIMAL PREMIUM
========================= */

.projects-hero-minimal {
  text-align: center;
  padding: 90px 20px 40px;
  color: #fff;
}

.projects-hero-minimal h2 {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.projects-hero-minimal p {
  color: #9aa4b2;
  margin-top: 10px;
}

/* GRID */
.projects-grid-minimal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px 8%;
}

/* CARD */
.project-card-minimal {
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  transition: 0.35s ease;
}

.project-card-minimal:hover {
  transform: translateY(-6px);
  border-color: #00e5ff;
}

/* IMAGE */
.project-img-minimal img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: 0.4s ease;
}

.project-card-minimal:hover img {
  transform: scale(1.05);
}

/* TEXT */
.project-info-minimal {
  padding: 18px 20px;
}

/* TITULOS PROYECTOS */
.project-info-minimal h3 {
  color: #eaf6ff; /* blanco suave premium */
  font-size: 1.15rem;
  font-weight: 600;
}

/* DESCRIPCIÓN */
.project-info-minimal p {
  color: #9aa4b2; /* gris elegante */
}


/* BUTTON */
.btn-project-minimal {
  margin-top: 12px;
  background: none;
  border: none;
  color: #00e5ff;
  font-weight: 500;
  cursor: pointer;
}

.btn-project-minimal:hover {
  text-decoration: underline;
}

/* MODAL */
.modal-minimal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

.modal-content-minimal {
  max-width: 820px;
  margin: 6% auto;
  background: rgba(15, 20, 35, 0.96); /* más claro */
  padding: 25px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
}


/* ===============================
   IMAGEN MODAL TAMAÑO ESTÁNDAR
================================ */

#modalImagen {
  width: 100%;
  height: 420px; /* TAMAÑO ESTÁNDAR */
  object-fit: cover; /* Recorta sin deformar */
  border-radius: 12px;
  margin: 16px 0;
  transition: opacity 0.35s ease-in-out;
  background: #000; /* Fondo elegante si sobra espacio */
}



.modal-thumbs-minimal img {
  width: 90px;
  margin: 8px;
  cursor: pointer;
  opacity: 0.6;
}

.modal-thumbs-minimal img:hover {
  opacity: 1;
}
/* TEXTO MODAL */
.modal-content-minimal h3 {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.modal-content-minimal p {
  color: #b8c4d4;
  margin-top: 12px;
  font-size: 0.95rem;
}

/* BOTÓN CERRAR */
.modal-close {
  color: #00e5ff;
  font-size: 1.4rem;
  cursor: pointer;
}

.modal-close:hover {
  color: white;
}

.modal-thumbs-minimal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
  gap: 8px;
}

.modal-thumbs-minimal img {
  width: 80px;
  height: 55px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  border: 1px solid rgba(255,255,255,0.15);
  transition: 0.25s ease;
}

.modal-thumbs-minimal img:hover {
  opacity: 1;
  transform: scale(1.06);
  border-color: #00e5ff;
}


/* --- DISEÑO BRUTAL KRAKEM --- */
:root {
    --p-accent: #00e5ff; /* Cyan tecnológico */
    --p-bg: #05080a;
    --p-glass: rgba(15, 23, 42, 0.7);
    --p-text: #f8fafc;
    --p-muted: #94a3b8;
}

.premium-bg {
    position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(circle at 50% 0%, #003244 0%, var(--p-bg) 70%);
}

.portfolio-container { max-width: 1300px; margin: 0 auto; padding: 100px 20px; }
.portfolio-header { text-align: center; margin-bottom: 70px; }
.portfolio-header h1 { font-size: clamp(2.5rem, 5vw, 4rem); color: #fff; line-height: 1.1; }
.portfolio-header h1 span { color: var(--p-accent); text-shadow: 0 0 15px rgba(0,229,255,0.4); }
.eyebrow { color: var(--p-accent); font-weight: 800; letter-spacing: 5px; font-size: 0.75rem; }

/* GRID CONFIGURATION */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

.p-card {
    background: var(--p-glass);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 25px;
    overflow: hidden;
    cursor: pointer;
    display: flex; flex-direction: column;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.p-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--p-accent);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.p-image-box {
    position: relative;
    width: 100%; aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000;
}

.p-image-box img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s ease; opacity: 0.9;
}

.p-card:hover .p-image-box img { transform: scale(1.1); opacity: 1; }

.p-badge {
    position: absolute; top: 15px; right: 15px;
    background: var(--p-accent); color: #000;
    padding: 6px 14px; font-size: 0.65rem; font-weight: 900; border-radius: 7px;
}

.p-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.p-content h3 { color: #fff; font-size: 1.5rem; margin-bottom: 12px; font-weight: 700; }
.p-content p { color: var(--p-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 25px; }

.p-link {
    margin-top: auto; color: var(--p-accent); font-weight: 700;
    display: flex; align-items: center; gap: 10px; font-size: 0.8rem;
}

/* MODAL SYSTEM */
.p-modal {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(2, 6, 12, 0.98);
    display: none; align-items: center; justify-content: center; padding: 25px;
}

.p-modal-content {
    background: #0a0f14; width: 100%; max-width: 1150px;
    border-radius: 35px; border: 1px solid rgba(0, 229, 255, 0.3);
    position: relative; overflow: hidden;
    box-shadow: 0 0 100px rgba(0,0,0,0.8);
}

.p-close {
    position: absolute; top: 25px; right: 30px;
    background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; z-index: 10;
}

.p-modal-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; }

.p-modal-gallery { padding: 35px; background: #070b10; border-right: 1px solid rgba(255,255,255,0.05); }
.p-main-wrapper { width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.1); }
.p-main-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.p-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.p-thumbs img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: 10px; opacity: 0.3; cursor: pointer; transition: 0.3s;
    border: 2px solid transparent;
}
.p-thumbs img.active { opacity: 1; border-color: var(--p-accent); }

.p-modal-info { padding: 60px 50px; color: #fff; overflow-y: auto; }
.p-modal-tag { color: var(--p-accent); font-weight: 900; font-size: 0.75rem; letter-spacing: 2px; }
.p-line { height: 3px; width: 50px; background: var(--p-accent); margin: 25px 0; }
.p-meta { color: var(--p-accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 25px; }
.p-description-box h4 { font-size: 0.8rem; letter-spacing: 2px; color: var(--p-accent); margin-bottom: 15px; }
.p-modal-info p { color: #cbd5e1; line-height: 1.8; font-size: 1rem; }

.p-btn {
    display: block; width: 100%; text-align: center;
    background: var(--p-accent); color: #000; padding: 20px;
    border-radius: 15px; font-weight: 900; text-decoration: none; margin-top: 40px;
    transition: 0.4s;
}
.p-btn:hover { box-shadow: 0 0 30px var(--p-accent); transform: scale(1.03); }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .p-modal-grid { grid-template-columns: 1fr; }
    .p-modal-content { height: 95vh; overflow-y: auto; }
}

/* Ajuste específico para las 10 miniaturas en el modal */
.p-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 2 filas de 5 imágenes */
    gap: 10px;
    margin-top: 15px;
}

.p-thumbs img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Cuadradas perfectas */
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.4;
    border: 2px solid transparent;
    transition: 0.3s ease;
}

.p-thumbs img.active {
    opacity: 1;
    border-color: #00e5ff;
}

.p-main-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9; /* Formato panorámico para la foto principal */
    border-radius: 20px;
    overflow: hidden;
    background: #000;
}


/*INICIO*/

:root {
    --cyan: #00e5ff;
    --dark: #020406;
}

/* --- HERO SLIDER BASE --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh; /* Ocupa toda la pantalla */
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* CONTENEDOR DE IMÁGENES */
.slider-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; /* Al fondo */
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* La clase active fuerza visibilidad */
.slide.active {
    opacity: 0.7; /* Brillo de la imagen */
    z-index: 2;
    animation: kenBurns 12s infinite alternate;
}

@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.15); }
}

/* ZONA DE SEGURIDAD (PANEL LATERAL OSCURO) */
.hero-safe-zone {
    position: relative;
    z-index: 10; /* Por encima de todo */
    width: 100%;
    height: 100%;
    /* Gradiente negro sólido a la izquierda para que el texto sea blanco sobre negro */
    background: linear-gradient(90deg, 
        rgba(0,0,0,0.95) 0%, 
        rgba(0,0,0,0.8) 30%, 
        rgba(0,0,0,0) 100%);
    display: flex;
    align-items: center;
    padding: 0 8%;
}

.hero-content {
    max-width: 650px;
}

.hero-tag {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 5px;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 20px;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    color: #fff;
    line-height: 0.9;
    font-weight: 900;
    margin-bottom: 25px;
}

.hero-content h1 span {
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(0,229,255,0.4);
}

.hero-content p {
    color: #cbd5e1;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 500px;
}

/* BOTONES */
.hero-actions { display: flex; align-items: center; gap: 30px; }

.btn-brutal {
    background: var(--cyan);
    color: #000;
    padding: 18px 40px;
    font-weight: 900;
    text-decoration: none;
    border-radius: 4px;
    transition: 0.3s ease;
}

.btn-brutal:hover {
    box-shadow: 0 0 40px var(--cyan);
    transform: translateY(-3px);
}

.hero-links a {
    color: #fff;
    text-decoration: none;
    margin-right: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
}

.hero-links a:hover {
    color: var(--cyan);
    border-bottom: 2px solid var(--cyan);
}

/* SECCIÓN INFERIOR */
.home-intro { padding: 100px 0; background: var(--dark); color: #fff; }
.container-premium { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.intro-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: center; }
.intro-title h2 { font-size: 3rem; line-height: 1; }
.intro-title h2 span { color: var(--cyan); }
.intro-text p { font-size: 1.2rem; color: #94a3b8; line-height: 1.8; }


/* --- SECCIÓN INTRO PREMIUM CON PARTÍCULAS --- */
.home-intro-premium {
    position: relative;
    padding: 120px 0;
    /* Gradiente para dar profundidad en lugar de negro sólido */
    background: radial-gradient(circle at 50% 50%, #0a1622 0%, #050a0f 100%);
    overflow: hidden;
    color: #fff;
    display: flex;
    align-items: center;
}

/* Contenedor de partículas absoluto */
#particles-intro {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    opacity: 0.5; /* Para que no distraiga demasiado del texto */
}

.container-premium {
    position: relative;
    z-index: 10; /* Por encima de las partículas */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

/* Título con estilo */
.intro-title h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
    font-weight: 900;
}

.intro-title h2 span {
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.tech-accent-line {
    width: 80px;
    height: 4px;
    background: var(--cyan);
    margin-top: 20px;
    border-radius: 2px;
}

/* Caja de texto con efecto Cristal (Glassmorphism) */
.intro-text-box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.intro-text-box p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin-bottom: 30px;
}

.intro-stats-row {
    display: flex;
    gap: 30px;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--cyan);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 900px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .intro-text-box { padding: 30px; }
}


#particles-intro {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Esto lo pone detrás del texto pero delante del fondo negro */
    pointer-events: none;
}

.home-intro-premium {
    position: relative; /* Necesario para que las partículas se queden adentro */
    background: radial-gradient(circle at center, #0a1622 0%, #050a0f 100%);
    overflow: hidden;
}


/* --- FORMATO DE TEXTO PREMIUM --- */

/* Tag superior (Ej: GAMER) */
.p-modal-tag {
    color: var(--p-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px; /* Espaciado pro */
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 5px;
}

/* Título principal (Ej: Ensamble de PC & Gamer) */
#pTitle {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin: 5px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Subtítulo / Meta (Ej: High-End • Overclock • Custom) */
.p-meta {
    color: #94a3b8; /* Gris azulado elegante */
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

/* Línea divisoria tecnológica */
.p-line {
    height: 2px;
    width: 50px;
    background: var(--p-accent);
    margin: 20px 0;
    border-radius: 2px;
}

/* Título de sección (FICHA TÉCNICA) */
.p-description-box h4 {
    color: var(--p-accent);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio con el icono */
}

/* Párrafo de descripción principal */
.p-main-desc {
    color: #cbd5e1; /* Color suave para lectura larga */
    font-size: 1.05rem;
    line-height: 1.7; /* Espaciado entre líneas para que no se vea pesado */
    text-align: left;
}

/* Botón con mejor alineación */
.p-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}


/* --- ESTILOS GENERALES --- */
:root {
    --p-accent: #00e5ff;
    --p-bg-modal: #0a1118;
    --p-text-main: #ffffff;
    --p-text-dim: #94a3b8;
}

/* --- GRID DE PROYECTOS --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 20px;
}

.p-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.4s ease;
}

.p-card:hover { transform: translateY(-10px); border-color: var(--p-accent); }

.p-image-box { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.p-image-box img { width: 100%; height: 100%; object-fit: cover; }





/* --- MODAL OPTIMIZADO (-15% Galería) --- */
.p-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(2, 6, 12, 0.98);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.p-modal-content {
    background: #0a1118;
    width: 100%;
    max-width: 1100px; /* Reducido un poco para mayor elegancia */
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.p-modal-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr; /* 45% Galería - 55% Texto */
}

/* Imagen Principal Reducida */
.p-main-wrapper {
    width: 100%;
    height: 360px; /* Antes 450px (-15% aprox) */
    background: #000;
    overflow: hidden;
}

.p-main-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Miniaturas más pequeñas */
.p-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 12px;
    background: #070b10;
}

.p-thumbs img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 5px;
    opacity: 0.3;
    cursor: pointer;
    transition: 0.3s;
}

.p-thumbs img.active { opacity: 1; border: 2px solid #00e5ff; }

/* --- FORMATO DE TEXTO PROFESIONAL --- */
.p-modal-info {
    padding: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra el contenido verticalmente */
}

.p-modal-tag {
    color: #00e5ff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

#pTitle {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
}

.p-meta {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.p-divider-tech {
    height: 3px;
    width: 40px;
    background: #00e5ff;
    margin: 25px 0;
}

.spec-section h4 {
    color: #00e5ff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.p-description {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.p-btn-action {
    background: #00e5ff;
    color: #000;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    transition: 0.3s;
    margin-top: auto;
}

.p-btn-action:hover { box-shadow: 0 0 20px rgba(0,229,255,0.4); }

.p-close {
    position: fixed; top: 30px; right: 40px;
    color: #fff; background: none; border: none; font-size: 40px; cursor: pointer;
    z-index: 10001;
}

@media (max-width: 900px) {
    .p-modal-grid { grid-template-columns: 1fr; }
    .p-modal-info { padding: 30px; }
}

/* 1. Las partículas deben estar al fondo del todo */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Al fondo */
    pointer-events: none;
}

/* 2. El fondo gradiente debe ser semitransparente para dejar pasar las partículas */
.premium-bg {
    position: fixed;
    inset: 0;
    z-index: 2; /* Se mantiene entre las partículas y el contenido */
    /* Bajamos la opacidad del negro (0.6) y aumentamos el brillo del azul central */
    background: radial-gradient(circle at 50% 0%, rgba(0, 80, 110, 0.4) 0%, rgba(5, 8, 10, 0.6) 70%);
    pointer-events: none;
}

/* Opcional: Si quieres que las partículas se vean todavía más claras, 
asegúrate de que el contenedor de partículas no tenga filtros */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
    background-color: #03070a; /* Un negro un poco más profundo de fondo base */
}

/* 3. El contenido de la página debe estar arriba de todo */
.portfolio-container {
    position: relative;
    z-index: 10;
    max-width: 1300px;
    margin: 0 auto;
    padding: 100px 20px;
}

header, footer {
    position: relative;
    z-index: 20; /* Prioridad máxima */
}


/*CODIGO PARA QUE SE ADAPTE SEGUN LA PANTALLA, LA PAGINA WEB*/

/* ==================================================
   RESPONSIVE DESIGN - AJUSTES PARA MÓVILES
   ================================================== */

@media (max-width: 768px) {
    
    /* 1. AJUSTES DEL HERO (INICIO) */
    .hero-safe-zone {
        padding: 0 5%;
        background: linear-gradient(0deg, rgba(0,0,0,0.9) 30%, rgba(0,0,0,0.4) 100%);
        align-items: flex-end; /* Bajamos el texto en móviles */
        padding-bottom: 80px;
    }

    .hero-content h1 {
        font-size: 2.5rem; /* Título más pequeño para que no se amontone */
        line-height: 1.1;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    .hero-actions {
        flex-direction: column; /* Botones uno arriba del otro */
        align-items: stretch;
        gap: 15px;
    }

    .btn-brutal {
        text-align: center;
        padding: 15px;
    }

    /* 2. SECCIÓN INTRO (INGENIERÍA SIN LÍMITES) */
    .intro-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 30px;
        text-align: center;
    }

    .tech-accent-line {
        margin: 20px auto; /* Centramos la línea */
    }

    .intro-text-box {
        padding: 25px;
    }

    /* 3. GRID DE PROYECTOS */
    .portfolio-grid {
        grid-template-columns: 1fr; /* Solo un proyecto por fila */
        gap: 20px;
    }

    /* 4. MODAL DE PROYECTOS (ESTO ES LO MÁS IMPORTANTE) */
    .p-modal {
        padding: 10px; /* Menos margen exterior */
    }

    .p-modal-content {
        max-height: 90vh; /* Que no se salga de la pantalla */
        overflow-y: auto; /* Permitir scroll si el texto es largo */
    }

    .p-modal-grid {
        grid-template-columns: 1fr; /* Imagen arriba, Texto abajo */
    }

    .p-main-wrapper {
        height: 250px; /* Altura más pequeña en móviles */
    }

    .p-modal-info {
        padding: 25px; /* Menos espacio interno */
    }

    #pTitle {
        font-size: 1.5rem; /* Título de modal más pequeño */
    }

    /* Ajuste de miniaturas para que quepan */
    .p-thumbs {
        grid-template-columns: repeat(5, 1fr); /* 2 filas de 5 */
    }

    .p-close {
        top: 15px;
        right: 15px;
        font-size: 30px;
        background: rgba(0,0,0,0.5); /* Fondo para que se vea sobre las fotos */
        width: 35px;
        height: 35px;
    }

    /* 5. SECCIÓN SERVICIOS */
    .services-grid {
        grid-template-columns: 1fr; /* Un servicio por fila */
    }
}

/* AJUSTE PARA PANTALLAS MUY PEQUEÑAS (IPHONE SE, ETC) */
@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .p-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* --- MEJORA DE LEGIBILIDAD EN SERVICIOS --- */

.services-hero h2 {
    color: #ffffff; /* Blanco puro para el título */
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.9); /* Sombra intensa para separar de las partículas */
    font-size: 3rem; /* Tamaño impactante */
    font-weight: 800;
    margin-bottom: 20px;
}

.services-hero p {
    color: #00e5ff; /* Color Cyan para que resalte o un blanco suave #cbd5e1 */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 500;
    line-height: 1.6;
}

/* Opcional: Un pequeño sutil fondo oscuro detrás del texto para blindar la lectura */
.services-hero {
    background: rgba(5, 10, 15, 0.4); /* Crea una zona un poco más oscura solo ahí */
    padding: 60px 20px;
    border-radius: 20px;
    display: inline-block; /* Para que el fondo no ocupe todo el ancho si no es necesario */
    width: 100%;
    text-align: center;
}