
/* ==========================================
   CONTENIDO DEL BLOG (.blog-content)
   ========================================== */

/* --- TÍTULOS CON JERARQUÍA (Móvil por defecto) --- */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: #1A52A8; /* Color de $rose */
  text-align: start;
  margin-top: 32px;
  margin-bottom: 16px;
}

/* Tamaños Base (Pantallas Móviles) */
.blog-content h1 {
  font-size: 32px;
  line-height: 40px;
}

.blog-content h2 {
  font-size: 28px;
  line-height: 36px;
}

.blog-content h3 {
  font-size: 24px;
  line-height: 32px;
}

.blog-content h4 {
  font-size: 20px;
  line-height: 28px;
}

.blog-content h5 {
  font-size: 18px;
  line-height: 26px;
}

.blog-content h6 {
  font-size: 16px;
  line-height: 24px;
}

/* --- Párrafos --- */
.blog-content p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #1E2235; /* Color de $blue-primary */
  margin-bottom: 20px;
}

/* --- Listas Ordenadas (ol) --- */
.blog-content ol {
  counter-reset: item;
  padding-left: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.blog-content ol li {
  list-style: none;
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1E2235;
  line-height: 28px;
  text-decoration: none;
}

.blog-content ol li::before {
  counter-increment: item;
  content: counter(item);
  font-size: 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #1E2235;
  color: #1E2235;
  border-radius: 50%;
  text-align: center;
  margin-right: 10px;
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
}

/* --- Listas Desordenadas (ul) --- */
.blog-content ul {
  padding-left: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.blog-content ul li {
  position: relative;
  list-style: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 24px;
  color: #1E2235;
}

.blog-content ul li::before {
  content: "•";
  color: #1A52A8;
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-left: -1em;
  font-size: 18px;
  vertical-align: middle;
}

/* --- Bloque de Citas (blockquote) --- */
.blog-content blockquote {
  margin: 30px 0;
  padding: 20px 24px;
  border-left: 4px solid #1A52A8;
  background-color: #f3f4f6;
  border-radius: 0 8px 8px 0;
}

.blog-content blockquote p {
  font-family: 'Inter', sans-serif;
  font-style: italic;
  font-size: 14px;
  line-height: 28px;
  color: #1E2235;
  margin-bottom: 0;
}

/* --- Enlaces (a) --- */
.blog-content a {
  color: #1A52A8;
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.2s ease-in-out;
}

.blog-content a:hover {
  opacity: 0.8;
}

/* --- Imágenes (img) --- */
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
  display: block;
}

/* --- Código e Inline Code (code / pre) --- */
.blog-content pre {
  background-color: #f3f4f6;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.blog-content code {
  font-family: monospace;
  font-size: 14px;
  color: #1A52A8;
  background-color: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
}

.blog-content pre code {
  padding: 0;
  background-color: transparent;
  color: #1E2235;
}

/* --- Tablas --- */
.blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-family: sans-serif;
  font-size: 14px;
}

.blog-content th,
.blog-content td {
  padding: 12px;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.blog-content th {
  background-color: #f3f4f6;
  color: #1A52A8;
  font-weight: 500;
}

.blog-content td {
  color: #1E2235;
}

.blog-card-thumb .blog-card-badge,
.job-thumb .blog-card-badge,
.blog-feature-media .blog-card-badge {
  background: rgba(20, 22, 34, 0.85);
  border-color: rgba(196, 171, 108, 0.6);
  /* opcional: ayuda a que se lea bien incluso en fotos con mucho detalle */
  backdrop-filter: blur(2px);
}



/* ==========================================
   MEDIA QUERIES (Pantallas Grandes / Escritorio)
   ========================================== */
@media (min-width: 640px) {
  
  

  .blog-content h1 {
    font-size: 42px;
    line-height: 52px;
  }

  .blog-content h2 {
    font-size: 36px;
    line-height: 46px;
  }

  .blog-content h3 {
    font-size: 30px;
    line-height: 38px;
  }

  .blog-content h4 {
    font-size: 24px;
    line-height: 32px;
  }

  .blog-content h5 {
    font-size: 20px;
    line-height: 28px;
  }

  .blog-content h6 {
    font-size: 18px;
    line-height: 26px;
  }

  /* Textos de párrafos y listas en escritorio */
  .blog-content p {
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 24px;
  }

  .blog-content ul li {
    font-size: 16px;
    line-height: 26px;
  }
}



.testimonials-track {
  display: flex; /* Asumo que usas flexbox para poner las cards en fila */
  /* Esta es la transición por defecto que usará el JS */
  transition: transform 0.4s ease;
  will-change: transform; /* Optimización de rendimiento */
    width: max-content;
}
.carousel-arrow:disabled { opacity: .3; cursor: not-allowed; }

.carousel-track { width: max-content; }
.carousel-btn:disabled { opacity: .3; cursor: not-allowed; }


.copy-link-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 12px);
  background: #1A1A1A;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
}
.copy-link-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.testimonials-track {
  align-items: flex-start;
}

.testimonial-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.testimonial-text.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.testimonial-toggle {
  display: inline-block;
  margin-top: 10px;
  margin-bottom: 14px;
  padding: 0;
  background: none;
  border: none;
  color: var(--SAND, #C4AB6C);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.testimonial-toggle:hover,
.testimonial-toggle:focus-visible {
  text-decoration: underline;
}


/* 1. Inicializamos el contador en el contenedor principal de la cuadrícula */
#gallery-grid {
  counter-reset: masonry-counter 0; /* Empieza en 0, para que el primer elemento sume 1 */
}

/* 2. Incrementamos el contador en cada tarjeta */
#gallery-grid .masonry-card {
  counter-increment: masonry-counter;
}

/* 3. Ocultamos el texto original (el 0, 1, 2...) y mostramos el nuevo número formateado */
#gallery-grid .masonry-card-num {
  visibility: hidden; /* Oculta el texto interno original sin romper el espacio del contenedor */
  position: relative;
}

#gallery-grid .masonry-card-num::before {
  content: counter(masonry-counter, decimal-leading-zero); /* Genera: 01, 02, 03... */
  visibility: visible; /* Hace visible el contador de CSS */
  position: absolute;
  left: 0;
  top: 0;
}

/* ─── Gallery modal — captioned image carousel (RelatedGallery) + project
   narrative (Description as "what we did", Html as story) below. Project-level
   prev/next (outside the box) cycles all visible cards; image-level prev/next
   (inside the carousel) cycles that project's RelatedGallery. Cards with no
   RelatedGallery still open the modal, just without the carousel — see
   .gallery-modal-box--no-gallery. ── */
.gallery-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(0,0,0,.92); backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.gallery-modal-overlay.open { opacity: 1; pointer-events: auto; }

.gallery-modal-box {
  position: relative; width: 100%; max-width: 880px; max-height: 92vh;
  overflow-y: auto; background: var(--CHAR);
}

.gallery-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,11,20,.55); border: none; cursor: pointer;
  transition: background .2s;
}
.gallery-modal-close:hover { background: rgba(10,11,20,.8); }

/* Image carousel */
.gallery-modal-box--no-gallery .gallery-modal-carousel { display: none; }
.gallery-modal-carousel { position: relative; overflow: hidden; background: var(--DARK); }
.gallery-modal-track { display: flex; transition: transform .35s ease; }
.gallery-modal-slide { position: relative; flex: 0 0 100%; width: 100%; aspect-ratio: 21 / 9; }
.gallery-modal-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-modal-slide-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,11,20,.85) 0%, rgba(10,11,20,0) 100%);
}
.gallery-modal-caption {
  position: absolute; left: 24px; right: 24px; bottom: 16px;
  font-family: 'Inter', sans-serif; font-size: 13px; color: rgba(255,255,255,.85);
}

.gallery-modal-cat {
  position: absolute; top: 16px; left: 16px;
  font-family: 'Articulat CF', sans-serif; font-weight: 700; font-size: 9px;
  color: #fff; letter-spacing: 2.5px; text-transform: uppercase;
  background: var(--B); padding: 4px 10px;
}

.gallery-modal-imgnav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,11,20,.55); border: none; cursor: pointer;
  transition: background .2s;
}
.gallery-modal-imgnav:hover { background: rgba(10,11,20,.8); }
.gallery-modal-imgprev { left: 12px; }
.gallery-modal-imgnext { right: 12px; }

.gallery-modal-imgbar {
  position: absolute; bottom: 12px; right: 16px;
  display: flex; align-items: center; gap: 12px;
}
.gallery-modal-imgcount { font-family: 'Articulat CF', sans-serif; font-weight: 700; font-size: 11px; color: rgba(255,255,255,.6); }
.gallery-modal-dots { display: flex; gap: 6px; }
.gallery-modal-dot {
  width: 6px; height: 6px; border-radius: 50%; padding: 0; border: none; cursor: pointer;
  background: rgba(255,255,255,.4); transition: width .3s, background .3s;
}
.gallery-modal-dot.active { width: 18px; background: var(--SAND); }

/* Content below the carousel */
.gallery-modal-content { padding: 40px; }
@media (max-width: 639px) { .gallery-modal-content { padding: 28px 20px; } }
.gallery-modal-title { font-family: 'Articulat CF', sans-serif; font-weight: 800; font-size: clamp(24px,3vw,32px); color: #fff; line-height: 1.15; letter-spacing: -.5px; margin-bottom: 6px; }
.gallery-modal-loc { font-family: 'Inter', sans-serif; font-size: 14px; color: var(--SAND); margin-bottom: 24px; }

.gallery-modal-whatwedid { margin-bottom: 24px; padding: 16px; background: rgba(26,82,168,.12); border: 1px solid rgba(26,82,168,.25); }
.gallery-modal-whatwedid-label { font-family: 'Articulat CF', sans-serif; font-weight: 700; font-size: 10px; color: var(--B); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.gallery-modal-whatwedid-text { font-family: 'Inter', sans-serif; font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.6; }

.gallery-modal-story { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.gallery-modal-story p { font-family: 'Inter', sans-serif; font-size: 15px; color: rgba(255,255,255,.65); line-height: 1.8; }

.gallery-modal-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--B); border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 14px; color: #fff;
  transition: opacity .2s;
}
.gallery-modal-cta:hover { opacity: .9; }

/* Project-level prev/next — outside the box, over the backdrop */
.gallery-modal-projnav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); cursor: pointer;
  transition: background .2s;
}
.gallery-modal-projnav:hover { background: rgba(255,255,255,.16); }
.gallery-modal-projprev { left: 16px; }
.gallery-modal-projnext { right: 16px; }
@media (min-width: 1024px) { .gallery-modal-projnav { display: flex; } }

.gallery-footer-count {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}


/* ─── Case study modal — image carousel (RelatedGallery) + light content
   panel (Html/Description as story, Item1-3 as bullets) below. Light/white
   theme to match the CREAM bento section, unlike the dark Gallery modal.
   Project-level prev/next (outside the box) cycles all loaded cards;
   image-level prev/next (inside the carousel) cycles that case's
   RelatedGallery. Cards with no RelatedGallery still open the modal, just
   without the carousel — see .case-modal-box--no-gallery. ── */
.case-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(10,11,20,.82); backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.case-modal-overlay.open { opacity: 1; pointer-events: auto; }

.case-modal-box {
  position: relative; width: 100%; max-width: 980px; max-height: 92vh;
  overflow-y: auto; background: #fff;
}

.case-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,11,20,.55); border: none; cursor: pointer;
  transition: background .2s;
}
.case-modal-close:hover { background: rgba(10,11,20,.8); }

/* Image carousel */
.case-modal-box--no-gallery .case-modal-carousel { display: none; }
.case-modal-carousel { position: relative; overflow: hidden; background: var(--DARK); }
.case-modal-track { display: flex; transition: transform .35s ease; }
.case-modal-slide { position: relative; flex: 0 0 100%; width: 100%; aspect-ratio: 16 / 9; }
.case-modal-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.case-modal-slide-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,11,20,.85) 0%, rgba(10,11,20,0) 100%);
}
.case-modal-caption {
  position: absolute; left: 24px; right: 24px; bottom: 16px;
  font-family: 'Inter', sans-serif; font-size: 13px; color: rgba(255,255,255,.85);
}

.case-modal-cat {
  position: absolute; top: 16px; left: 16px;
  font-family: 'Articulat CF', sans-serif; font-weight: 700; font-size: 9px;
  color: #fff; letter-spacing: 2.5px; text-transform: uppercase;
  background: var(--B); padding: 4px 10px;
}

.case-modal-imgnav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,11,20,.55); border: none; cursor: pointer;
  transition: background .2s;
}
.case-modal-imgnav:hover { background: rgba(10,11,20,.8); }
.case-modal-imgprev { left: 12px; }
.case-modal-imgnext { right: 12px; }

.case-modal-imgbar {
  position: absolute; bottom: 12px; right: 16px;
  display: flex; align-items: center; gap: 12px;
}
.case-modal-imgcount { font-family: 'Articulat CF', sans-serif; font-weight: 700; font-size: 11px; color: rgba(255,255,255,.6); }
.case-modal-dots { display: flex; gap: 6px; }
.case-modal-dot {
  width: 6px; height: 6px; border-radius: 50%; padding: 0; border: none; cursor: pointer;
  background: rgba(255,255,255,.4); transition: width .3s, background .3s;
}
.case-modal-dot.active { width: 18px; background: var(--SAND); }

/* Content below the carousel — light theme, matches the CREAM section */
.case-modal-content { padding: 40px; }
@media (max-width: 639px) { .case-modal-content { padding: 28px 20px; } }
.case-modal-title { font-family: 'Articulat CF', sans-serif; font-weight: 800; font-size: clamp(24px,3vw,32px); color: var(--CHAR); letter-spacing: -.5px; margin-bottom: 20px; }

.case-modal-story { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.case-modal-story p { font-family: 'Inter', sans-serif; font-size: 16px; color: #444; line-height: 1.75; }

.case-modal-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px; }
.case-modal-item { display: flex; align-items: flex-start; gap: 10px; list-style: none; }
.case-modal-bullet { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-top: 7px; background: var(--B); }
.case-modal-item span { font-family: 'Inter', sans-serif; font-size: 14px; color: var(--MUTED); line-height: 1.6; }

.case-modal-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--B); border: none; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 14px; color: #fff;
  transition: opacity .2s;
}
.case-modal-cta:hover { opacity: .9; }

/* Project-level prev/next — outside the box, over the backdrop */
.case-modal-projnav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); cursor: pointer;
  transition: background .2s;
}
.case-modal-projnav:hover { background: rgba(255,255,255,.16); }
.case-modal-projprev { left: 16px; }
.case-modal-projnext { right: 16px; }
@media (min-width: 1024px) { .case-modal-projnav { display: flex; } }


.gallery-view-all:disabled { opacity: .5; cursor: not-allowed; }
