/* ================================================================
   Service Page Blocks — Featured Cases + Related Guides
   Shared across all service templates
   ================================================================ */

/* ----------------------------------------------------------------
   SHARED SECTION BASE
   ---------------------------------------------------------------- */
.twl-featured-cases,
.twl-related-guides {
  position: relative;
  padding: clamp(60px, 10vh, 120px) 0;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.twl-featured-cases {
  background: #f2f1ed;
}

.twl-related-guides {
  background: #e8e7e3;
}

/* Texture overlay */
.twl-featured-cases::before,
.twl-related-guides::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo.jpg');
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.twl-featured-cases > *,
.twl-related-guides > * {
  position: relative;
  z-index: 1;
}

/* ----------------------------------------------------------------
   CONTAINER
   ---------------------------------------------------------------- */
.twl-featured-cases__inner,
.twl-related-guides__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ----------------------------------------------------------------
   HEADER
   ---------------------------------------------------------------- */
.twl-featured-cases__header,
.twl-related-guides__header {
  text-align: center;
  margin-bottom: 3rem;
}

.twl-featured-cases__label,
.twl-related-guides__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.65rem, 1vw, 0.75rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8a8a8a;
  display: block;
  margin-bottom: 0.75rem;
}

.twl-featured-cases__title,
.twl-related-guides__title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: #1a1a1a;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.twl-featured-cases__subtitle,
.twl-related-guides__subtitle {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  color: #666;
  margin: 0;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ----------------------------------------------------------------
   FEATURED CASES — GRID + CARDS
   ---------------------------------------------------------------- */
.twl-featured-cases__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}

.twl-featured-cases__card {
  display: block;
  background: #fafaf8;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.twl-featured-cases__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo.jpg');
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.twl-featured-cases__card > * {
  position: relative;
  z-index: 1;
}

.twl-featured-cases__card:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Images row */
.twl-featured-cases__images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.twl-featured-cases__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.twl-featured-cases__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.twl-featured-cases__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 2px;
  z-index: 2;
}

.twl-featured-cases__img--before .twl-featured-cases__badge {
  background: rgba(0,0,0,0.6);
  color: #fff;
}

.twl-featured-cases__img--after .twl-featured-cases__badge {
  background: rgba(231,99,1,0.85);
  color: #fff;
}

/* Card info */
.twl-featured-cases__info {
  padding: 1.25rem 1.5rem 1.5rem;
}

.twl-featured-cases__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.twl-featured-cases__vehicle {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.twl-featured-cases__difficulty {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 2px;
  background: rgba(0,0,0,0.05);
  color: #555;
}

/* View all link */
.twl-featured-cases__more {
  display: block;
  text-align: center;
  margin-top: 2.5rem;
}

.twl-featured-cases__more a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1a1a1a;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 2px;
  transition: all 0.3s ease;
  display: inline-block;
}

.twl-featured-cases__more a:hover {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* ----------------------------------------------------------------
   OTHER SERVICES — SECTION + CARDS (same visual language)
   ---------------------------------------------------------------- */
.twl-other-services {
  position: relative;
  padding: clamp(60px, 10vh, 120px) 0;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #dddcd8;
}

.twl-other-services::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo.jpg');
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

.twl-other-services > * {
  position: relative;
  z-index: 1;
}

.twl-other-services__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.twl-other-services__header {
  text-align: center;
  margin-bottom: 3rem;
}

.twl-other-services__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.65rem, 1vw, 0.75rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8a8a8a;
  display: block;
  margin-bottom: 0.75rem;
}

.twl-other-services__title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: #1a1a1a;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

.twl-other-services__subtitle {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  color: #666;
  margin: 0;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.twl-other-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}

.twl-other-services__card {
  display: block;
  background: #fafaf8;
  text-decoration: none;
  color: inherit;
  padding: 2rem 1.75rem;
  position: relative;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.twl-other-services__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo.jpg');
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.twl-other-services__card > * {
  position: relative;
  z-index: 1;
}

.twl-other-services__card:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.twl-other-services__card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 1rem;
}

.twl-other-services__card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.twl-other-services__card-desc {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.twl-other-services__card-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e76301;
  transition: transform 0.3s ease;
  display: inline-block;
}

.twl-other-services__card:hover .twl-other-services__card-arrow {
  transform: translateX(4px);
}

/* ----------------------------------------------------------------
   CLUSTER SEO LINKS — inline with service page style
   ---------------------------------------------------------------- */
.twl-cluster-seo {
  position: relative;
  padding: clamp(40px, 6vh, 80px) 0;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #e0dfdb;
}

.twl-cluster-seo::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo.jpg');
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}

.twl-cluster-seo > * {
  position: relative;
  z-index: 1;
}

.twl-cluster-seo__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.twl-cluster-seo__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(0.65rem, 1vw, 0.75rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8a8a8a;
  display: block;
  margin-bottom: 0.5rem;
}

.twl-cluster-seo__title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: #1a1a1a;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}

.twl-cluster-seo__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px;
}

.twl-cluster-seo__item {
  background: #fafaf8;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.twl-cluster-seo__item::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo.jpg');
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.08;
  pointer-events: none;
}

.twl-cluster-seo__link {
  display: block;
  padding: 0.9rem 1.25rem;
  text-decoration: none;
  color: #1a1a1a;
  font-size: 0.88rem;
  font-weight: 500;
  position: relative;
  z-index: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.twl-cluster-seo__link:hover {
  background: #fff;
  color: #e76301;
}

.twl-cluster-seo__link--hub {
  font-weight: 600;
  color: #e76301;
}

/* ----------------------------------------------------------------
   RELATED GUIDES — GRID + CARDS
   ---------------------------------------------------------------- */
.twl-related-guides__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}

.twl-related-guides__card {
  display: block;
  background: #fafaf8;
  text-decoration: none;
  color: inherit;
  padding: 2rem 1.75rem;
  position: relative;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.twl-related-guides__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/fondo.jpg');
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.twl-related-guides__card > * {
  position: relative;
  z-index: 1;
}

.twl-related-guides__card:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.twl-related-guides__card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 1rem;
}

.twl-related-guides__card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.twl-related-guides__card-excerpt {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.twl-related-guides__card-arrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #e76301;
  transition: transform 0.3s ease;
  display: inline-block;
}

.twl-related-guides__card:hover .twl-related-guides__card-arrow {
  transform: translateX(4px);
}

/* ----------------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .twl-featured-cases__grid,
  .twl-related-guides__grid,
  .twl-other-services__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .twl-featured-cases__card,
  .twl-related-guides__card,
  .twl-other-services__card {
    border-radius: 6px;
    overflow: hidden;
  }

  .twl-cluster-seo__list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .twl-featured-cases__grid,
  .twl-related-guides__grid,
  .twl-other-services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
