/* ===== QUIEN SOY: CARRUSELES + CERT TABS ===== */

/* --- Portfolio carousel --- */
.folio-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  user-select: none;
}

.folio-slides {
  display: flex;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}

.folio-slides .folio-img {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  background: #ffffff;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.folio-prev,
.folio-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(8, 12, 12, .78);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.folio-prev { left: 10px; }
.folio-next { right: 10px; }

.folio-carousel:hover .folio-prev,
.folio-carousel:hover .folio-next,
.folio-carousel:focus-within .folio-prev,
.folio-carousel:focus-within .folio-next {
  opacity: 1;
}

.folio-prev:hover,
.folio-next:hover {
  transform: translateY(-50%) scale(1.05);
  background: rgba(24, 36, 24, .92);
}

.folio-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}

.folio-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .25);
  cursor: pointer;
  padding: 0;
}

.folio-dots .dot.active {
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 8px rgba(163, 230, 53, .6);
}

/* --- Generic info carousel (stack + trust) --- */
.info-carousel {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 44px 20px;
}

.info-wrap {
  overflow: hidden;
  border-radius: 14px;
}

.info-slides {
  display: flex;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
  touch-action: pan-y;
}

.info-slide {
  flex: 0 0 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.info-prev,
.info-next {
  position: absolute;
  top: 44%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(8, 12, 12, .8);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.info-prev { left: 0; }
.info-next { right: 0; }

.info-prev:hover,
.info-next:hover {
  background: rgba(24, 36, 24, .95);
}

.info-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.info-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .22);
  cursor: pointer;
  padding: 0;
}

.info-dot.is-active,
.info-dot.active {
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 8px rgba(163, 230, 53, .58);
}

/* --- Cards inside stack/trust carousels --- */
.info-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  padding: 18px 20px;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}

.tech-logo {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(163, 230, 53, .18));
}

.tech-card i {
  color: var(--lime);
  font-size: 20px;
  line-height: 1;
}

.tech-card span,
.trust-card span {
  display: inline-block;
}

.trust-card {
  min-height: 88px;
}

/* --- Hero skill carousel (2 cards visible) --- */
.hero-skill-carousel {
  max-width: 100%;
  margin-top: 16px;
  padding: 0 36px 12px;
}

.hero-skill-carousel .info-wrap {
  border-radius: 0;
}

.hero-skill-carousel .info-slide {
  padding: 0 6px;
}

.hero-skill-carousel .info-card {
  min-height: 68px;
  justify-content: center;
  text-align: center;
  font-size: 15px;
}

.hero-skill-carousel .info-prev,
.hero-skill-carousel .info-next {
  top: 50%;
}

/* --- Cert tabs --- */
.cert-tabs-wrap {
  margin-top: 18px;
}

.cert-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.cert-tab {
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

.cert-tab:hover {
  border-color: rgba(163, 230, 53, .45);
}

.cert-tab.is-active {
  background: rgba(163, 230, 53, .18);
  border-color: rgba(163, 230, 53, .7);
  color: #f4ffdf;
}

.cert-panel[hidden] {
  display: none !important;
}

.cert-panel .form2-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cert-panel .form2-item {
  min-height: 92px;
  align-items: flex-start;
}

.cert-panel .form2-year {
  white-space: normal;
}

.cert-links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* --- Media gallery tabs + carousel --- */
.media-tabs-wrap {
  margin-top: 18px;
}

.media-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.media-tab {
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

.media-tab:hover {
  border-color: rgba(163, 230, 53, .45);
}

.media-tab.is-active {
  background: rgba(163, 230, 53, .18);
  border-color: rgba(163, 230, 53, .7);
  color: #f4ffdf;
}

.media-panel[hidden] {
  display: none !important;
}

.media-carousel {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 42px 18px;
}

.media-wrap {
  overflow: hidden;
}

.media-track {
  display: flex;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
  touch-action: pan-y;
}

.media-slide {
  flex: 0 0 100%;
  min-width: 100%;
  box-sizing: border-box;
  padding: 0 6px;
}

.media-prev,
.media-next {
  position: absolute;
  top: 46%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(8, 12, 12, .8);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  z-index: 4;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.media-prev { left: 0; }
.media-next { right: 0; }

.media-prev:hover,
.media-next:hover {
  background: rgba(24, 36, 24, .95);
}

.media-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.media-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .22);
  cursor: pointer;
  padding: 0;
}

.media-dot.is-active,
.media-dot.active {
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 8px rgba(163, 230, 53, .58);
}

.media-item {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.media-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .24);
}

.media-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  background: #f2f4f3;
}

/* --- Media gallery lightbox --- */
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(2, 4, 5, .9);
  backdrop-filter: blur(4px);
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  padding: 24px;
}

.media-lightbox[hidden] {
  display: none !important;
}

.media-lightbox-figure {
  margin: 0;
  max-width: min(1080px, 96vw);
  max-height: 90vh;
  justify-self: center;
  display: grid;
  gap: 10px;
}

#media-lightbox-img {
  width: auto;
  max-width: 100%;
  max-height: 82vh;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: #0a0f0e;
}

#media-lightbox-caption {
  color: #eaf7ef;
  text-align: center;
  font-size: 14px;
}

.media-lightbox-close,
.media-lightbox-nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .24);
  background: rgba(8, 12, 12, .8);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.media-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 30px;
}

body.is-lightbox-open {
  overflow: hidden;
}

/* --- Overflow hardening (mobile first) --- */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

#main,
.section,
.container,
.about2-hero,
.about2-intro,
.about2-photo,
.portfolio-grid,
.cert-panels,
.cert-panel,
.form2-grid,
.form2-item,
.info-carousel,
.info-wrap,
.info-slide,
.info-card,
.tl2-card,
.uni-video-block,
.uni-video-copy,
.folio-info {
  min-width: 0;
}

.hero-ctas {
  flex-wrap: wrap;
  max-width: 100%;
}

.about2-intro {
  width: 100%;
  max-width: 100%;
}

.about2-intro h1,
.about2-intro .tagline,
.about2-intro .muted {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sh2-badge {
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}

.info-card span,
.form2-info h4,
.form2-info p,
.cert-tab,
.tl2-title,
.tl2-company,
.tl2-desc,
.folio-info h3,
.folio-info p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --- University memory video block --- */
.uni-video-block {
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.uni-video-thumb {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  min-height: 240px;
  background: #0b0f0e;
}

.uni-video-thumb img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
  filter: brightness(.86);
  transition: transform .25s ease, filter .25s ease;
}

.uni-video-thumb:hover img {
  transform: scale(1.02);
  filter: brightness(.98);
}

.uni-video-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(8, 12, 12, .82);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 12px;
}

.uni-video-play i {
  color: var(--lime);
  font-size: 18px;
  line-height: 1;
}

.uni-video-copy {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}

.uni-video-copy p {
  margin: 0 0 12px;
  color: var(--text);
  line-height: 1.65;
}

.uni-video-copy p:last-child {
  margin-bottom: 0;
}

/* --- Focus states --- */
.folio-prev:focus-visible,
.folio-next:focus-visible,
.info-prev:focus-visible,
.info-next:focus-visible,
.info-dot:focus-visible,
.folio-dots .dot:focus-visible,
.cert-tab:focus-visible,
.media-tab:focus-visible,
.media-prev:focus-visible,
.media-next:focus-visible,
.media-dot:focus-visible,
.media-item:focus-visible,
.media-lightbox-close:focus-visible,
.media-lightbox-nav:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

/* --- Responsive --- */
@media (max-width: 960px) {
  .info-carousel {
    padding: 0 34px 18px;
  }

  .info-card {
    min-height: 74px;
    padding: 16px;
  }

  .hero-skill-carousel {
    padding: 0 26px 12px;
  }

  .about2-intro h1 {
    font-size: clamp(26px, 8.2vw, 36px);
    line-height: 1.15;
  }

  .about2-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .a2-stat {
    min-width: 0;
  }

  .a2-stat-lbl {
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 768px) {
  .folio-prev,
  .folio-next,
  .info-prev,
  .info-next {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 20px;
    opacity: .95;
  }

  .folio-prev { left: 6px; }
  .folio-next { right: 6px; }

  .info-carousel {
    padding: 0 26px 16px;
  }

  .info-prev { left: 2px; }
  .info-next { right: 2px; }

  .info-card {
    min-height: 72px;
    font-size: 14px;
  }

  .cert-tab {
    font-size: 12px;
    padding: 9px 12px;
  }

  .media-tab {
    font-size: 12px;
    padding: 9px 12px;
  }

  .media-carousel {
    padding: 0 32px 16px;
  }

  .media-prev {
    left: 2px;
  }

  .media-next {
    right: 2px;
  }

  .hero-skill-carousel {
    padding: 0 28px 12px;
  }

  .hero-skill-carousel .info-prev {
    left: 4px;
  }

  .hero-skill-carousel .info-next {
    right: 4px;
  }

  .hero-skill-carousel .info-slide {
    padding: 0 4px;
  }

  .hero-skill-carousel .info-card {
    min-height: 64px;
    font-size: 14px;
  }

  .uni-video-block {
    grid-template-columns: 1fr;
  }

  .uni-video-thumb,
  .uni-video-thumb img {
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .folio-slides .folio-img {
    padding: 8px;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
  }

  .info-carousel {
    padding: 0 20px 14px;
  }

  .info-card {
    min-height: 70px;
    padding: 14px;
  }

  .hero-skill-carousel {
    padding: 0 18px 12px;
  }

  .about2-hero {
    gap: 18px;
  }

  .about2-photo {
    max-width: 100%;
  }

  .about2-photo img {
    width: 100%;
    height: auto;
  }

  .about2-intro {
    overflow: hidden;
  }

  .hero-skill-carousel .info-prev,
  .hero-skill-carousel .info-next {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 18px;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .cert-panel .form2-grid {
    grid-template-columns: 1fr;
  }

  .media-carousel {
    padding: 0 22px 14px;
  }

  .media-slide {
    padding: 0 4px;
  }

  .media-prev,
  .media-next {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 19px;
  }

  .media-lightbox {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding: 12px;
  }

  .media-lightbox-close,
  .media-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .hero-skill-carousel {
    padding: 0 0 12px;
  }

  .hero-skill-carousel .info-wrap {
    max-width: 340px;
    margin: 0 auto;
  }

  .hero-skill-carousel .info-slide {
    padding: 0;
  }

  .hero-skill-carousel .info-prev,
  .hero-skill-carousel .info-next {
    display: none;
  }

  .cert-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .media-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cert-tab {
    width: 100%;
    text-align: left;
    line-height: 1.35;
  }

  .media-tab {
    width: 100%;
    text-align: left;
    line-height: 1.35;
  }

  .cert-panel .form2-item {
    flex-direction: column;
    gap: 10px;
  }

  .cert-panel .form2-year {
    width: 100%;
  }
}
