/* Fuente Host Grotesk (Variable) */
@font-face {
  font-family: "Host Grotesk";
  src: url("https://blinkomv2.desarrollodigital.com.mx/wp-content/uploads/2025/12/HostGrotesk-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Variables */
:root {
  --accent: #E3E9E7;
  --overlay-dark: rgba(6, 6, 6, .78);
  --brand-green: #B3D139;
}

/* Bloqueo de scroll del documento cuando el modal está abierto */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  height: 100%;
}

/* Sección principal */
.blinkom-portfolio-section {
  position: relative;
  padding: 60px 40px;
  color: var(--accent);
  font-family: "Host Grotesk", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.blinkom-portfolio-header { margin-bottom: 40px; }

.blinkom-portfolio-header h2 {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 2px;
  margin: 0;
  text-transform: uppercase;
  color: var(--accent);
}

/* Swiper contenedor */
.blinkom-portfolio-swiper {
  position: relative;
  padding: 40px 0;
}

/* Swiper base */
.swiper-wrapper { display: flex; }
.swiper-slide { display: flex; justify-content: center; align-items: center; }

/* Tarjetas */
.blinkom-card {
  position: relative;
  width: 340px;
  height: 520px;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform .3s ease, filter .3s ease;
  filter: brightness(.9);
  border-radius: 10px;
}
.blinkom-card:hover { transform: scale(1.02); filter: brightness(1); }

.blinkom-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, .7) 100%);
  z-index: 1;
}

.blinkom-card-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blinkom-card-content span { font-size: 19px; font-weight: 700; color: var(--accent); }
.blinkom-card-content small { font-size: 14px; color: var(--accent); opacity: .9; }

/* Navegación carrusel principal */
.swiper-button-prev,
.swiper-button-next {
  width: 46px;
  height: 46px;
  background: transparent;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all .3s ease;
  margin-top: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(227, 233, 231, .24);
}
.swiper-button-prev:hover,
.swiper-button-next:hover { transform: translateY(-50%) scale(1.08); }
.swiper-button-prev:after,
.swiper-button-next:after { font-size: 18px; color: var(--accent); }
.swiper-button-prev { left: 20px; }
.swiper-button-next { right: 20px; }

/* Paginación carrusel principal */
.swiper-pagination {
  bottom: 0 !important;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .3s ease, opacity .3s ease;
  margin: 0 !important;
  background: rgba(227, 233, 231, 0.28);
}
.swiper-pagination-bullet-active { background: var(--brand-green) !important; }

/* ================== MODAL ================== */
.blinkom-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}
.blinkom-modal.is-open { display: block; }

.blinkom-modal__overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-dark);
  backdrop-filter: blur(4px);
  z-index: 1;
}

/* ✅ Centrando real con “margen” arriba/abajo (no pegado) */
.blinkom-modal__content {
  position: fixed;
  z-index: 2;

  /* en lugar de top:50% (a veces se ve “pegado” abajo), usamos inset seguro */
  top: 3vh;
  bottom: 3vh;
  left: 50%;
  transform: translateX(-50%);

  background: #161616;
  color: var(--accent);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.65);

  width: min(1200px, 92vw);
}

/* Botón cerrar */
.blinkom-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(227,233,231,.18);
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 8px 10px;
  z-index: 5;
  border-radius: 10px;
}
.blinkom-modal__close:hover { background: rgba(0,0,0,.35); }

/* ✅ SOLO galería */
.blinkom-modal__inner {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  height: 100%;
}

/* Ocultar todo lo que NO es galería (por si existe en tu markup) */
.blinkom-modal__left,
.blinkom-modal__header,
.blinkom-modal__title,
.blinkom-modal__year,
.blinkom-modal__info {
  display: none !important;
}

.blinkom-modal__gallery {
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  height: 100%;
}

/* Swiper galería */
.blinkom-gallery-swiper { width: 100%; height: 100%; overflow: hidden; }
.blinkom-gallery-swiper .swiper-wrapper { height: 100%; }
.blinkom-gallery-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  overflow: hidden;
}

/* Imagen grande */
.blinkom-gallery-swiper img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

/* Flechas galería */
.blinkom-gallery-swiper .swiper-button-prev,
.blinkom-gallery-swiper .swiper-button-next {
  width: auto;
  height: auto;
  background: none;
  color: var(--accent);
  opacity: .95;
  z-index: 10;
}
.blinkom-gallery-swiper .swiper-button-prev:hover,
.blinkom-gallery-swiper .swiper-button-next:hover { opacity: 1; }
.blinkom-gallery-swiper .swiper-button-prev:after,
.blinkom-gallery-swiper .swiper-button-next:after {
  font-size: 22px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  color: var(--accent);
}

/* Progress bar */
.blinkom-gallery-swiper .swiper-pagination {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 3px;
}
.blinkom-gallery-swiper .swiper-pagination-progressbar-fill { background: var(--brand-green) !important; }
.blinkom-gallery-swiper .swiper-pagination-progressbar { background: rgba(179, 209, 57, .25) !important; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .blinkom-card { width: 340px; height: 520px; }
}

/* Tablet */
@media (max-width: 992px) {
  .blinkom-modal__content {
    width: 96vw;
    top: 2vh;
    bottom: 2vh;
    border-radius: 16px;
  }

  .blinkom-modal__gallery {
    padding: 8px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .blinkom-portfolio-section { padding: 30px 15px; }

  .blinkom-card {
    width: 340px;
    height: 520px;
    max-width: 88vw;
  }

  .blinkom-portfolio-swiper .swiper-button-prev,
  .blinkom-portfolio-swiper .swiper-button-next {
    display: none !important;
  }

  .blinkom-modal__content {
    width: 98vw;
    top: 1.5vh;
    bottom: 1.5vh;
    border-radius: 14px;
  }

  .blinkom-modal__gallery {
    padding: 6px;
  }

  /* Opcional: ocultar controles en móvil */
  .blinkom-gallery-swiper .swiper-button-prev,
  .blinkom-gallery-swiper .swiper-button-next,
  .blinkom-gallery-swiper .swiper-pagination {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .blinkom-card { width: 340px; height: 520px; max-width: 92vw; }
}