/* ==========================================
   ROOT & GLOBAL
   ========================================== */

:root {
  --accent: #fb0000;
  --accent-text: #c21313; /* rojo más oscuro para texto pequeño sobre tarjetas claras */
  --white: #ffffff;
  --black: #000000;
  --glass-bg: #ffeef0;
  --glass-border: rgba(194, 19, 19, 0.25);
  --glass-shadow: 0 8px 32px rgba(26, 13, 13, 0.45);
  --nav-h: 100px; /* altura del navbar fijo; script.js la ajusta con la real */
}

@keyframes move-forever1 {
  0%   { transform: translate(85px, 0%); }
  100% { transform: translate(-90px, 0%); }
}
@keyframes move-forever2 {
  0%   { transform: translate(-90px, 0%); }
  100% { transform: translate(85px, 0%); }
}
*, *:before, *:after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
}

html {
  scroll-padding-top: var(--nav-h); /* el navbar fijo no tapa los títulos al navegar por anclas */
}

body {
  margin: 0;
  background-color: #801919;
  font-family: "Outfit", sans-serif;
  font-optical-sizing: auto;
}

/* ==========================================
   NAVBAR
   ========================================== */

.mask-custom {
  backdrop-filter: blur(5px);
  background-color: #ffd2d6;
}

.navbar-brand {
  font-size: 1.75rem;
  letter-spacing: 3px;
}

.lang-btn {
  border: none;
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: background 0.2s ease;
  margin-right: 4px;
}

.lang-btn:hover {
  background: #ff4747;
}

.lang-btn.active {
  background: #1a0d0d;
  color: var(--white);
  font-weight: 700;
}

div:has(> .lang-btn) {
  margin-right: 1.5rem;
}


/* ==========================================
   HERO / INTRO
   ========================================== */

#index {
  position: relative;
  padding-top: var(--nav-h);
}

#intro {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  min-height: 300px;
  background-color: #1a0d0d; /* mismo color de fondo que el GIF */
}

/* El GIF se muestra a lo sumo a su tamaño real (1280 px), anclado a la
   izquierda; el resto de la sección se rellena con su color de fondo.
   Los bordes superior e inferior se difuminan para que no se note el corte. */
#intro::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: min(100%, 1280px);
  aspect-ratio: 2 / 1;
  background: url("../images/NPDS_Gif.gif") center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent);
}

@media (max-width: 768px) {
  /* En móvil se amplía el ancho del GIF para que la animación (que ocupa
     ~73 % del ancho) llene la pantalla; solo se recorta fondo vacío. */
  #intro::before {
    width: 130%;
  }
}

/* ==========================================
   WAVE SVG SEPARATOR
   ========================================== */

.editorial {
  display: block;
  width: 100%;
  height: 60px;
  max-height: 60px;
  margin: 0;
  z-index: 5;
  bottom: -1px;
  position: absolute;
  left: 0;
}

.parallax1 > use { animation: move-forever1 10s linear infinite; }
.parallax2 > use { animation: move-forever2 8s linear infinite; }
.parallax3 > use { animation: move-forever1 6s linear infinite; }
.parallax4 > use { animation: move-forever2 4s linear infinite; }

.parallax1 > use:nth-child(1),
.parallax2 > use:nth-child(1),
.parallax3 > use:nth-child(1),
.parallax4 > use:nth-child(1) {
  animation-delay: -2s;
}


@media (max-width: 768px) {
  .editorial {
    height: 30px;
    max-height: 30px;
  }
}


/* ==========================================
   SECTION TITLES
   ========================================== */

.section-label {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffa4ac;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffa4ac;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: #fb0000;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #ffa4ac;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  font-style: normal;
}


/* ==========================================
   SECTIONS LAYOUT
   ========================================== */

.cards-section {
  padding: 4rem max(24px, 5%);
}

@media (max-width: 480px) {
  .cards-section {
    padding: 2rem 16px;
  }
}

/* ==========================================
   TECH STACK (spotlight cards)
   ========================================== */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
}

.stack-card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.8rem 1.8rem 1.6rem;
  border-radius: 22px;
  color: #ffd9dc;
  background: linear-gradient(155deg, rgba(22, 6, 6, 0.94), rgba(70, 12, 12, 0.7));
  border: 1px solid rgba(255, 164, 172, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s ease, border-color 0.35s ease;
}

/* Foco de luz que sigue al cursor */
.stack-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(251, 0, 0, 0.38), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Número gigante de fondo, solo contorno */
.stack-card::after {
  content: attr(data-index);
  position: absolute;
  top: -0.6rem;
  right: 1rem;
  z-index: -1;
  font-size: 7rem;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 164, 172, 0.22);
  pointer-events: none;
}

.stack-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 0, 0, 0.7);
}

.stack-card:hover::before { opacity: 1; }

.stack-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stack-head h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.stack-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  transform: rotate(-6deg);
  color: #fff;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #fb0000, #801919);
  box-shadow: 0 0 22px rgba(251, 0, 0, 0.55);
  transition: transform 0.35s ease;
}

.stack-card:hover .stack-icon { transform: rotate(6deg) scale(1.08); }

.stack-desc {
  margin: 0 0 1.3rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 217, 220, 0.85);
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 1.1rem 0 0;
  list-style: none;
  border-top: 1px dashed rgba(255, 164, 172, 0.3);
}

.stack-chips li {
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: #ffa4ac;
  background: rgba(255, 164, 172, 0.08);
  border: 1px solid rgba(255, 164, 172, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.stack-chips li:hover {
  transform: translateY(-3px);
  color: #fff;
  background: #fb0000;
  border-color: #fb0000;
}

@media (prefers-reduced-motion: reduce) {
  .stack-card, .stack-icon, .stack-chips li { transition: none; }
  .stack-card:hover, .stack-card:hover .stack-icon { transform: none; }
}


/* ==========================================
   PORTFOLIO (bento grid)
   ========================================== */

.bento-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
}

.bento-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  border-radius: 14px;
  overflow: clip;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--white);
}

.bento-card.small {
  flex: 1 1 280px;
  max-width: 340px;
}

.bento-card.small .bento-visual {
  aspect-ratio: 16 / 9;
}

.bento-visual {
  overflow: clip;
  width: 100%;
  height: 100%;
}

.bento-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: rgba(255, 255, 255, 0.05);
  transition: scale 0.4s ease, opacity 0.4s ease;
}

.bento-card:hover .bento-visual img {
  scale: 1.03;
}

.bento-content {
  display: grid;
  place-items: center start;
  gap: 0.5rem;
  padding: 1.5rem;
  grid-template-rows: auto 1fr auto;
}

.bento-content small {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--accent-text);
  letter-spacing: 0.05em;
}

.bento-content h3 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 700;
  margin: 0;
  align-self: start;
  color: #000;
}

.bento-content p {
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #000;
}

@media (prefers-reduced-motion: no-preference) {
  .bento-card.small {
    opacity: 0;
    will-change: transform;
  }

  .bento-reveal {
    animation:
      bento-fade-in 660ms ease forwards,
      bento-slide-up 1000ms cubic-bezier(0, 0, 0.1, 1) forwards;
  }

  .bento-reveal .bento-visual img {
    animation: bento-fade-in 1s ease forwards;
  }

  @keyframes bento-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  @keyframes bento-slide-up {
    from { transform: translateY(100px); }
    to   { transform: translateY(0); }
  }
}


/* ==========================================
   ABOUT BOX
   ========================================== */

.box {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  color: var(--white);
  margin: 0 auto;
  max-width: 90%;
  padding: 20px 50px;
  border-radius: 10px;
}

.box h1 {
  text-transform: uppercase;
  color: var(--black);
}

.box p {
  color: var(--black);
  text-align: justify;
}

.box-inner {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
}

.box-photo {
  flex-shrink: 0;
}

.box-photo img {
  width: 180px;
  height: 180px;
  object-fit: cover;
}

.box-text {
  flex: 1;
}

@media (max-width: 600px) {
  .box-inner {
    flex-direction: column;
    align-items: center;
  }

  .box-text {
    text-align: center;
  }
}

.box hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  margin: 1.5rem 0;
  opacity: 0.4;
}

/* ==========================================
   CERTIFICATIONS
   ========================================== */

.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1180px;
  margin: 0 auto;
}

.cert-card {
  flex: 1 1 300px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: clip;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-card:hover,
.cert-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(26, 13, 13, 0.55);
  outline: none;
}

.cert-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-bottom: 1px solid var(--glass-border);
  overflow: clip;
}

.cert-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  box-sizing: border-box;
  transition: scale 0.4s ease;
}

.cert-card:hover .cert-visual img,
.cert-card:focus-visible .cert-visual img {
  scale: 1.04;
}

.cert-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(26, 13, 13, 0.6);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cert-overlay i {
  font-size: 1.4rem;
}

.cert-card:hover .cert-overlay,
.cert-card:focus-visible .cert-overlay {
  opacity: 1;
}

.cert-content {
  padding: 1.25rem 1.5rem 1.5rem;
  text-align: center;
}

.cert-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a0d0d;
  margin: 0 0 0.3rem;
}

.cert-content p {
  font-size: 0.9rem;
  color: var(--accent-text);
  font-weight: 600;
  margin: 0 0 0.3rem;
  text-align: center;
}

.cert-content small {
  font-size: 0.8rem;
  color: #7a5a5d;
}

@media (max-width: 480px) {
  .cert-grid {
    gap: 1.25rem;
  }
}

/* Lightbox overlay for full-size certificate viewing */
.cert-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26, 13, 13, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 2rem;
  cursor: zoom-out;
}

.cert-lightbox.active {
  display: flex;
}

.cert-lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  background: #fff;
}

.cert-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}


/* ==========================================
   CONTACT FORM
   ========================================== */

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  padding: 40px;
  box-shadow: var(--glass-shadow);
}

.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  color: var(--black);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--black);
  border-radius: 15px;
  color: var(--black);
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--black);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-text);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(251, 0, 0, 0.18);
  transform: translateY(-2px);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.submit-btn {
  width: 100%;
  padding: 15px 30px;
  background: linear-gradient(135deg, #fb0000, #801919);
  color: var(--white);
  border: none;
  border-radius: 15px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(251, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #801919, #fb0000);
  transition: left 0.3s ease;
}

.submit-btn:hover::before { left: 0; }

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(251, 0, 0, 0.4);
}

.submit-btn span {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .contact-form { padding: 30px 25px; }
  .form-row { grid-template-columns: 1fr; gap: 15px; }
}

@media (max-width: 480px) {
  .contact-form { padding: 25px 20px; }
}


/* ==========================================
   FOOTER
   ========================================== */

.deneb_footer .widget_wrapper {
  padding-top: 200px;
  padding-bottom: 70px;
}

@media (max-width: 767px) {
  .deneb_footer .widget_wrapper .widget {
    margin-bottom: 40px;
  }
}

.deneb_footer .widget_wrapper .widget .widget_title {
  margin-bottom: 30px;
}
.deneb_footer .widget_wrapper .widget .widget_title h4 {
  font-weight: bold;
  color: #ffa4ac;
}
.deneb_footer .widget_wrapper .widget .widget_title h4:after {
  content: "";
  display: block;
  max-width: 38px;
  height: 2px;
  margin-top: 5px;
}
.deneb_footer .widget_wrapper .widegt_about p {
  margin-bottom: 20px;
  color: #ffa4ac;
}
.deneb_footer .widget_wrapper .widegt_about .social li {
  display: inline-block;
  margin-right: 10px;
}
.deneb_footer .widget_wrapper .widegt_about .social li a {
  display: block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  background-color: #e6e6ff;
  color: var(--accent);
  font-size: 14px;
  transition: all 0.5s ease-out;
}
.deneb_footer .widget_wrapper .widegt_about .social li a:hover,
.deneb_footer .widget_wrapper .widegt_about .social li a:focus {
  background-color: var(--accent);
  color: #fff;
  box-shadow: 2.5px 4.33px 15px 0px rgba(68, 0, 254, 0.4);
}
.deneb_footer .widget_wrapper .widget_link ul li {
  margin-bottom: 5px;
}
.deneb_footer .widget_wrapper .widget_link ul li a {
  color: #ffa4ac;
}
.deneb_footer .widget_wrapper .widget_link ul li a:hover,
.deneb_footer .widget_wrapper .widget_link ul li a:focus {
  color: var(--accent);
}
.deneb_footer .widget_wrapper .widget_contact .contact_info .single_info {
  max-width: 250px;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.deneb_footer .widget_wrapper .widget_contact .contact_info .single_info .icon {
  font-size: 12px;
  color: var(--accent);
  margin-right: 10px;
}
.deneb_footer .widget_wrapper .widget_contact .contact_info .single_info .info p {
  color: #ffa4ac;
}
.deneb_footer .widget_wrapper .widget_contact .contact_info .single_info .info p a {
  color: #ffa4ac;
}
.deneb_footer .widget_wrapper .widget_contact .contact_info .single_info .info p span {
  display: block;
}

.deneb_footer .copyright_area {
  background: #ffd2d6;
  padding: 10px 0;
}
.deneb_footer .copyright_area .copyright_text {
  text-align: center;
}
.deneb_footer .copyright_area .copyright_text p {
  color: #011a3e;
}

.deneb_cta .cta_wrapper {
  padding: 45px 50px 42px;
  max-width: 970px;
  border-radius: 15px;
  margin: auto;
  margin-bottom: -135px;
  position: relative;
  background-image: linear-gradient(135deg, #e50000, #a30d0d);
  border: 1px solid rgba(255, 164, 172, 0.45);
  box-shadow: 0 15px 30px rgba(26, 13, 13, 0.5);
  z-index: 1;
}
.deneb_cta .cta_wrapper .cta_content h3 {
  color: #fff;
  font-weight: bold;
  text-align: center;
}
@media (max-width: 767px) {
  .deneb_cta .cta_wrapper .cta_content h3 {
    font-size: 24px;
  }
}
.deneb_cta .cta_wrapper .cta_content h3:after {
  content: "";
  display: block;
  max-width: 110px;
  height: 2px;
  margin-top: 13px;
  margin-bottom: 24px;
}
.deneb_cta .cta_wrapper .cta_content p {
  color: #fff;
  text-align: center;
}