@charset "utf-8";

/* ==========================================================
   HERO BLOG – PIXELDOT
   ========================================================== */

#hero-blog {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}



/* Aislamiento para overlays */
.hero-original {
  isolation: isolate;
}

/* ==========================================================
   IMAGEN DE FONDO
   ========================================================== */

#hero-blog .hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../img/hero/hero-blog.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  transform: scale(1.05);
}

/* ==========================================================
   OVERLAY PIXELDOT (AZUL DEGRADADO)
   ========================================================== */

#hero-blog .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 67, 143, 0.75) 0%,
    rgba(20, 67, 143, 0.85) 60%,
    rgba(20, 67, 143, 0.95) 100%
  );
  z-index: 2;
}

/* ==========================================================
   CONTENIDO
   ========================================================== */

#hero-blog .hero-content {
  position: relative;
  z-index: 3;
  max-width: 760px;
  padding: 0 20px;
  color: #ffffff;
	opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}


/* ==========================================================
   TÍTULO
   ========================================================== */

#hero-blog h1 {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 18px;
  color: #ffffff;
  text-shadow: 0 12px 30px rgba(0,0,0,.35);
}

/* ==========================================================
   DESCRIPCIÓN
   ========================================================== */

#hero-blog p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 36px;
  line-height: 1.55;
  text-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* ==========================================================
   BOTÓN CTA
   ========================================================== */

#hero-blog .hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 14px 36px;
  border-radius: 999px;

  background: linear-gradient(90deg, #149bd7, #127ab0);
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;

  box-shadow: 0 18px 40px rgba(20, 155, 215, 0.45);
  transition: transform .35s ease, box-shadow .35s ease;
}

#hero-blog .hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 60px rgba(20, 155, 215, 0.65);
  color: #ffffff;
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 768px) {

  #hero-blog {
    min-height: 85vh;
  }

  #hero-blog h1 {
    font-size: 2.4rem;
  }

  #hero-blog p {
    font-size: 1rem;
  }

}

/* =======================
   BLOG SEARCH – PIXELDOT
======================= */

.blog-search-wrapper {
  max-width: 680px;
  margin: 0 auto 28px;
  position: relative;
}

/* Campo */
.blog-search-field {
  position: relative;
  display: flex;
  align-items: center;

  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;

  padding: 14px 18px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.blog-search-field:focus-within {
  border-color: #149bd7;
  box-shadow: 0 8px 24px rgba(20,155,215,.12);
}

/* Ícono lupa (CSS, no lib) */
.search-icon {
  width: 16px;
  height: 16px;
  margin-right: 12px;
  position: relative;
}

.search-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #777;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: #777;
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
}

/* Input */
.blog-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;

  font-size: 15px;
  font-weight: 500;
  color: #111;
}

.blog-search-input::placeholder {
  color: #999;
}

/* Clear */
.clear-search-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #f1f3f5;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
}

.blog-search-input:not(:placeholder-shown) + .clear-search-btn {
  opacity: 1;
}

.clear-search-btn::before,
.clear-search-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: #666;
}

.clear-search-btn::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.clear-search-btn::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.clear-search-btn:hover {
  background: #e5e7eb;
}

/* =======================
   SUGERENCIAS
======================= */

.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;

  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,.08);

  list-style: none;
  padding: 10px 0;
  margin: 0;

  display: none;
  z-index: 10;
}

/* =======================
   RESULT COUNT
======================= */

.blog-results-count {
  text-align: center;
  font-size: 13px;
  color: #777;
  letter-spacing: .04em;
}

.blog-results-count strong {
  color: #111;
  font-weight: 800;
}

/* =======================
   BLOG HEADER
======================= */

.blog-header {
  max-width: 820px;
  margin: 0 auto 48px;
  text-align: center;
}

.blog-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #149bd7;
  margin-bottom: 16px;
}

/* Título editorial */
.blog-title {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #111;
  margin-bottom: 20px;
}

.blog-title span {
  display: inline-block;
  position: relative;
  left: 48px; /* leve desplazamiento editorial */
  color: #111;
}

/* Subtítulo */
.blog-subtitle {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  max-width: 640px;
  margin: 0 auto;
}

/* =======================
   BLOG FILTERS – EDITORIAL
======================= */

.blog-filters {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;

  padding: 10px;
  margin: 0 auto 40px;

  background: #f7f9fc;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #e5e7eb;

  overflow-x: auto;
  scrollbar-width: none;
	
	position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.blog-filters::-webkit-scrollbar {
  display: none;
}

.blog-filters .filter-btn {
  padding: 10px 18px;

  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;

  border-radius: 999px;
  border: none;
  background: transparent;
  color: #555;

  cursor: pointer;
  transition: all .25s ease;
}

.blog-filters .filter-btn.active {
  background: #111;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}

.blog-filters .filter-btn:not(.active):hover {
  background: rgba(20,155,215,.12);
  color: #149bd7;
}

/* =======================
   BLOG GRID
======================= */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
	margin-bottom: 50px
}

/* =======================
   BLOG CARD TRANSITIONS
======================= */

.blog-card {
  transition:
    opacity .35s ease,
    transform .35s ease;
}

/* Estado oculto */
.blog-card.is-hidden {
  opacity: 0;
  transform: translateY(12px) scale(.98);
  pointer-events: none;
}

/* Estado visible */
.blog-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =======================
   BLOG CARD
======================= */

.blog-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;

  box-shadow: 0 18px 40px rgba(0,0,0,.08);
  transition: transform .35s ease, box-shadow .35s ease;

  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 70px rgba(0,0,0,.16);
}

/* =======================
   MEDIA
======================= */

.blog-card-media {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.blog-card:hover .blog-card-media img {
  transform: scale(1.05);
}

/* Overlay sutil */
.blog-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.45),
    rgba(0,0,0,.15),
    transparent
  );
}

/* Tag categoría */
.blog-card-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  font-weight: 800;
  text-transform: uppercase;

  color: #fff;
  padding: 8px 14px;

  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  border-radius: 999px;
	 font-size: 10px;
  letter-spacing: .18em;
  opacity: .85;
}

/* =======================
   CONTENT
======================= */

.blog-card-content {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-title {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: #111;
  margin-bottom: 10px;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: #666;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.blog-card:hover .blog-card-title::after {
  transform: scaleX(1);
}

.blog-card-excerpt {
  font-size: 14.5px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 22px;
  flex-grow: 1;
}

/* =======================
   META
======================= */

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.blog-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-card-author img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  display: block;
  font-weight: 700;
  color: #111;
	  font-size: 12px;
}

.author-date {
  display: block;
 font-size: 11px;
  color: #888;
}

/* =======================
   LINK
======================= */

.blog-card-link {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #149bd7;
  text-decoration: none;
  position: relative;
}

.blog-card-link::after {
  content: "→";
  margin-left: 6px;
  transition: transform .25s ease;
}

.blog-card-link:hover::after {
  transform: translateX(4px);
}

/* =======================
   RESPONSIVE
======================= */

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-card-media {
    height: 200px;
  }
}

/* =======================
   BADGE – ÚLTIMA NOTA
======================= */

.blog-card {
  position: relative;
  overflow: visible; /* 👈 CLAVE */
}

/* Badge flotante */
.blog-card-badge {
  position: absolute;
  top: -45px;        /* SALE POR ARRIBA */
  left: 0px;

  background: #ffd400;
  color: #111;

  font-size: 10px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;

  padding: 8px 18px;
  border-radius: 999px;

  box-shadow: 0 14px 32px rgba(0,0,0,.22);
  z-index: 20;
}

/* Solo para la última */
.blog-card:not(.is-latest) .blog-card-badge {
  display: none;
}