:root {
  --bg: #050c18;
  --brand: #4da6ff;
  --brand-light: #7ec0ff;
  --text: #e7edf7;
  --text-muted: #a0a8bf;
  --panel-bg: rgba(77, 166, 255, 0.12);
  --shadow-soft: 0 10px 30px rgba(77, 166, 255, 0.18);
  --radius: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: rgba(0, 0, 0, 0.7);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  min-height: 70px;
}

.logo {
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--brand);
  letter-spacing: 2px;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links li {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background-color: var(--brand);
  color: var(--bg);
}

.container {
  max-width: 900px;
  margin: 60px auto 80px;
  padding: 0 20px;
  text-align: center;
}

h1, h2 {
  color: var(--brand);
  text-shadow: 0 0 12px var(--brand);
  margin-bottom: 20px;
}

h1 {
  font-weight: 900;
  font-size: clamp(2.2rem, 4vw, 3rem);
}

h2 {
  font-weight: 700;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  margin-top: 60px;
}

/* CSS Grid para igualar alturas */

.row {
  display: grid;
  grid-template-columns: 40% 55%;
  column-gap: 25px;
  margin-top: 40px;
  align-items: stretch;
  text-align: left;
}

.images-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
}

.images-column img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0;
}

.text-improved p {
  margin-bottom: 1.3rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.text-improved ul {
  margin-left: 1.5rem;
  margin-bottom: 1.3rem;
  color: var(--brand-light);
  font-weight: 600;
  list-style-type: disc;
}

.text-improved blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--brand);
  background: rgba(77, 166, 255, 0.1);
  font-style: italic;
  color: var(--brand-light);
  font-size: 1.1rem;
  line-height: 1.5;
}

.bloque {
  margin-top: 60px;
  background: var(--panel-bg);
  padding: 30px 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  text-align: left;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.bloque h3 {
  color: var(--brand-light);
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  text-shadow: 0 0 8px var(--brand-light);
}

.bloque p {
  margin-bottom: 1.3rem;
  line-height: 1.7;
}

/* Responsive */

@media (max-width: 768px) {
  /* NAV FIX */
  .nav {
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    min-height: auto;
    gap: 12px;
  }

  .logo {
    font-size: 1.5rem;
    text-align: center;
    width: 100%;
  }

  .nav-links {
    flex-direction: row;
    gap: 12px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-links li {
    height: auto;
  }

  .nav-links a {
    display: inline-block;
    width: auto;
    padding: 8px 12px;
  }

  .row {
    display: block;
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
  }

  .images-column {
    display: block;
    height: auto;
    margin-bottom: 20px;
    text-align: center;
  }

  .images-column img {
    width: 100%;
    margin-bottom: 20px;
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }

  .text-improved {
    width: 100%;
    font-size: 1rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .text-improved p {
    text-align: center;
  }

  .text-improved ul {
    margin-left: auto;
    margin-right: auto;
    display: inline-block;
    text-align: left;
  }

  .text-improved blockquote {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .bloque {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
  }

  .bloque p {
    text-align: center;
  }

  .bloque h3 {
    text-align: center;
  }
}
.neon {
  color: #4da6ff;
  text-shadow:
    0 0 5px #4da6ff,
    0 0 10px #4da6ff,
    0 0 20px #4da6ff,
    0 0 40px #1e90ff,
    0 0 80px #1e90ff;
  font-weight: 700;
  transition: color 0.3s ease;
}

.neon:hover {
  color: #7ec0ff;
  text-shadow:
    0 0 10px #7ec0ff,
    0 0 20px #7ec0ff,
    0 0 30px #7ec0ff,
    0 0 50px #3cb0ff,
    0 0 100px #3cb0ff;
  cursor: pointer;
}

/*Seccion certificados*/
.certs{
  padding: clamp(28px, 6vw, 80px) clamp(16px, 5vw, 72px);
}

.certs__wrap{
  max-width: 1280px;
  margin: 0 auto;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 55px rgba(0,0,0,.45);
  overflow: hidden;
  position: relative;
}

.certs__inner{
  position: relative;
  padding: clamp(18px, 3.2vw, 34px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 2.4vw, 22px);
}

.certs__titleRow{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.certs__title{
  margin: 0;
  font-family: 'Fraunces', serif;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.05;
  color: #fff;
}

.certs__hint{
  margin: 0;
  color: rgba(255,255,255,.68);
  font-size: 14px;
  line-height: 1.4;
  max-width: 60ch;
}

/* Grid de imágenes: 5 en fila en desktop, máximo 2 columnas en móvil */
.certs__grid{
  display: grid;
  gap: clamp(18px, 2.2vw, 28px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.cert{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04));
  min-height: 150px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.cert:hover{
  transform: translateY(-3px);
  border-color: rgba(159,247,209,.35);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
}

.cert:active{
  transform: translateY(-1px) scale(.99);
}

.cert__content{
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 14px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
}

.cert__badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 12px;
  color: rgba(255,255,255,.86);
  letter-spacing: .2px;
}

.cert__dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ff7d1;
  box-shadow: 0 0 0 4px rgba(159,247,209,.12);
}

.cert__label{
  margin-top: auto;
  font-size: 13px;
  color: rgba(255,255,255,.78);
  line-height: 1.35;
}

.cert__image {
  width: 100%;
  height: 300px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  background: rgba(2, 7, 17, 0.72);
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
}


/* Responsive: máximo 2 columnas en pantallas menores a 820px */
@media (max-width: 820px){
  .certs__grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cert__image {
    height: 260px;
  }
}

/* Ajuste para pantallas muy pequeñas */
@media (max-width: 360px){
  .cert{
    min-height: 140px;
  }

  .cert__image {
    height: 230px;
  }
}
/*SECCION DE GALERIA*/

.gallery {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.gallery__title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 24px;
  color: #009dff;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery__item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.gallery__item img:hover {
  transform: scale(1.05);
}

/* Responsive: en pantallas pequeñas 2 columnas */
@media (max-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* En móviles 1 columna */
@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: 1fr;
  }
}

/* Sección dinámica con imagen y texto alineados horizontalmente y altura igualada */

.dynamic-content {
  display: flex;
  gap: 20px;
  align-items: stretch; /* Igual altura para columnas */
  flex-wrap: wrap;
  max-width: 900px; /* Limita ancho total para alinear márgenes */
  margin: 0 auto; /* Centra horizontalmente */
}

.images-column {
  flex: 0 0 34%; /* Ocupa aprox 34% del ancho */
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%; /* Ocupa toda la altura del contenedor padre */
}

.images-column img {
  width: 100%;
  flex-grow: 1; /* Crece para llenar la altura disponible */
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.images-column img:hover {
  transform: scale(1.05);
}

.text-improved {
  flex: 0 0 62%; /* Ocupa aprox 62% del ancho */
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}

.text-improved p {
  margin-bottom: 1.2rem;
}

.text-improved strong {
  color: #4da6ff;
}

.text-improved em {
  font-style: italic;
  color: #7ec0ff;
}

.text-improved q {
  display: block;
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 4px solid #4da6ff;
  font-style: italic;
  color: #555;
}

/* Responsive: apilar en pantallas pequeñas */
@media (max-width: 768px) {

  /* NAV FIX */
  .nav {
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    min-height: auto;
    gap: 12px;
  }

  .logo {
    font-size: 1.5rem;
    text-align: center;
    width: 100%;
  }

  .nav-links {
    flex-direction: row;
    gap: 12px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-links li {
    height: auto;
  }

  .nav-links a {
    display: inline-block;
    width: auto;
    padding: 8px 12px;
  }

  /* TEXTOS */
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .desc {
    font-size: 1rem;
  }

  /* IFRAME FIX */
  iframe {
    height: 220px;
  }

  /* YOUTUBE */
  .youtube-grid {
    grid-template-columns: 1fr;
  }
}
/* ========================================= */
/* 🔥 FIX REAL: SOLO CENTRAR IMÁGENES MOBILE */
/* ========================================= */

@media (max-width: 768px) {

  /* NO tocamos nav, títulos, colores, nada */

  /* SOLO esta sección */
  .row {
    display: block;
    text-align: center;
  }

  .images-column {
    display: flex !important;
    flex-direction: column;
    align-items: center; /* centra horizontal */
  }

  .images-column img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    max-width: 320px;
  }

  /* Galería centrada */
  .gallery__grid {
    justify-items: center;
  }

  .gallery__item img {
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    max-width: 320px;
  }

  /* Certificados centrados SIN romper grid */
  .certs__grid {
    justify-items: center;
  }

  .cert__image {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* Biografia en la columna de texto */
.text-improved .bio-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.text-improved .bio-lead strong {
  color: var(--brand);
}

.text-improved h3 {
  color: var(--brand-light);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  text-shadow: 0 0 8px var(--brand-light);
}

.text-improved h3:first-of-type {
  margin-top: 1.2rem;
}

@media (max-width: 768px) {
  .text-improved h3 {
    text-align: center;
    margin-top: 1.8rem;
  }
}
