/* ==========================================================================
   ÍNDICE DE ESTILOS - FG FINCAS
   ==========================================================================
   01. Fuentes y Variables Globales
   02. Reset, Scrollbar y Lenis Smooth Scroll
   03. Cabecera y Navegación Liquid Glass (Escritorio + Móvil)
   04. Fondo Fijo General
   05. Inicio: Hero y Cuña Granate
   06. Inicio: Sección de Valores (Tarjetas con Chaflán 45º)
   07. Inicio: Carrusel de Noticias y Tarjetas PDF
   08. Inicio: Sección de Servicios (Zigzag Liquid Glass)
   09. Pie de Página (Footer Granate)
   10. Página de Contacto (Burbujas, Línea Animada y Píldoras)
   11. Página de Historial de Anuncios (Timeline y Cuadrícula)
   12. Adaptación Exclusiva para Dispositivos Táctiles
   ========================================================================== */


/* -+-+-+-+-+-+-+-+-+- 01. FUENTES Y VARIABLES GLOBALES -+-+-+-+-+-+-+-+-+- */

@font-face {
  font-family: 'TituloGrandeFont';
  src: url('fonts/yeseva-one/static/yeseva-one-latin-400-normal.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'TituloSecundarioFont';
  src: url('fonts/yeseva-one/static/yeseva-one-latin-400-normal.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta de colores */
  --granate: #7b1818;
  --rojo: #c40009;
  --blanco: #f9f9f9;
  --negro: #111111;

  /* Liquid Glass unificado */
  --glass-bg: rgba(121, 121, 121, 0.08);
  --glass-bg-ahumado: rgba(121, 121, 121, 0.65);
  --glass-border: rgba(255, 255, 255, 0.18);

  /* Tipografías del proyecto */
  --font-titulo-grande: 'TituloGrandeFont', Georgia, serif;
  --font-titulo: 'TituloSecundarioFont', Georgia, serif;
  --font-subtitulo: 'Cabinet Grotesk', sans-serif;
  --font-cuerpo: "Bricolage Grotesque", sans-serif;
}


/* -+-+-+-+-+-+-+-+-+- 02. RESET, SCROLLBAR Y LENIS SMOOTH SCROLL -+-+-+-+-+-+-+-+-+- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  background-color: var(--negro);
  color: var(--blanco);
  font-family: var(--font-cuerpo);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-stopped {
  overflow: hidden;
}


/* -+-+-+-+-+-+-+-+-+- 03. CABECERA Y NAVEGACIÓN LIQUID GLASS -+-+-+-+-+-+-+-+-+- */

.glass-nav {
  position: fixed;
  z-index: 100;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition:
    width 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    top 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.5s ease,
    box-shadow 0.5s ease;
}

/* Estado 1: Arriba del todo (barra ancha plana) */
.glass-nav.nav-top {
  top: 0;
  width: 100%;
  padding: 1.2rem 5vw;
  border-radius: 0;
  background: var(--glass-bg-ahumado);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Logo dinámico */
.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo-text {
  font-family: var(--font-titulo-grande);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--blanco);
  letter-spacing: -0.01em;
  transition: opacity 0.3s ease;
}

.logo-circle-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.logo-img-circle {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.nav-logo-link:hover .logo-circle-wrapper {
  transform: scale(1.08);
  border-color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

.glass-nav.nav-top .nav-logo-text {
  display: block;
}

.glass-nav.nav-top .logo-circle-wrapper {
  display: none;
}

/* Estado 2: Scroll en escritorio (menú píldora flotante) */
@media (min-width: 769px) {
  .glass-nav.nav-floating {
    top: 1.2rem;
    width: 92%;
    max-width: 1150px;
    padding: 0.35rem 2.5rem 0.35rem 0.35rem;
    border-radius: 99px;
    background: var(--glass-bg-ahumado);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 35px 0 rgba(0, 0, 0, 0.4);
    overflow: hidden;
  }

  .glass-burger-btn {
    display: none;
  }

  .glass-nav.nav-floating .nav-logo-text {
    display: none;
  }

  .glass-nav.nav-floating .logo-circle-wrapper {
    order: 1;
    display: flex;
    margin-right: auto;
  }

  .glass-nav.nav-floating .nav-links {
    order: 2;
    display: flex;
    align-items: center;
  }

  .nav-links a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
    margin-left: 2.2rem;
    font-family: var(--font-cuerpo);
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
  }

  .glass-nav.nav-floating .nav-links a:first-child {
    margin-left: 2rem;
  }

  .nav-links a:hover {
    color: #ffffff;
    transform: translateY(-3px);
  }
}

/* Navegación móvil (< 768px) */
@media (max-width: 768px) {
  .glass-burger-btn {
    display: flex;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    color: var(--blanco);
    align-items: center;
    justify-content: center;
  }

  .glass-burger-btn svg {
    width: 22px;
    height: 22px;
  }

  .glass-burger-btn .icon-close {
    display: none;
  }

  .glass-nav.nav-top .nav-links {
    display: none;
  }

  /* Burbuja circular flotante a la derecha */
  .glass-nav.nav-floating {
    top: 1.2rem;
    right: 5vw;
    left: auto;
    transform: none;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    background: var(--glass-bg-ahumado);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  }

  .glass-nav.nav-floating .nav-logo-link,
  .glass-nav.nav-floating .nav-links {
    display: none;
  }

  /* Menú desplegado en móvil */
  .glass-nav.nav-floating.menu-open {
    width: 90vw;
    max-width: 500px;
    height: 82vh;
    padding: 4rem 2rem 2.5rem;
    border-radius: 32px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: var(--glass-bg-ahumado);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  }

  .glass-nav.nav-floating.menu-open .icon-burger {
    display: none;
  }

  .glass-nav.nav-floating.menu-open .icon-close {
    display: block;
  }

  .glass-nav.nav-floating.menu-open .glass-burger-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    margin: 0;
  }

  .glass-nav.nav-floating.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    gap: 0;
  }

  .glass-nav.nav-floating.menu-open .nav-links a {
    margin: 0;
    width: 100%;
    text-decoration: none;
    padding: 1.3rem 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--blanco);
    display: block;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: color 0.3s ease, padding-left 0.3s ease;
  }

  .glass-nav.nav-floating.menu-open .nav-links a:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .glass-nav.nav-floating.menu-open .nav-links a:active,
  .glass-nav.nav-floating.menu-open .nav-links a:hover {
    color: #ffffff;
    padding-left: 0.5rem;
  }
}


/*===================== BORRAR =====================*/
/*===================== BORRAR =====================*/
/*===================== BORRAR =====================*/

/* -+-+-+-+-+-+-+-+-+- BANNER BAJO CABECERA PLANA (SOLO INICIO + PC) -+-+-+-+-+-+-+-+-+- */
.nav-rebrand-strip {
  display: none;
}

@media (min-width: 901px) {
  .nav-rebrand-strip {
    position: fixed;
    top: 62px;
    left: 0;
    width: 100%;
    z-index: 99;
    padding: 0.42rem 5vw;
    background: rgba(123, 24, 24, 0.88);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--blanco);
    font-family: var(--font-cuerpo);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .rebrand-badge {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  /* Desaparece solo cuando la barra pasa a píldora flotante al hacer scroll */
  .glass-nav.nav-floating + .nav-rebrand-strip {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
  }
}

/*===================== BORRAR =====================*/
/*===================== BORRAR =====================*/
/*===================== BORRAR =====================*/

/* -+-+-+-+-+-+-+-+-+- 04. FONDO FIJO GENERAL -+-+-+-+-+-+-+-+-+- */

.fixed-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('images/buildings.png');
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.1);
  z-index: 1;
}


/* -+-+-+-+-+-+-+-+-+- 05. INICIO: HERO Y CUÑA GRANATE -+-+-+-+-+-+-+-+-+- */

.granate-card {
  position: relative;
  z-index: 10;
  margin-top: 50vh;
  width: 100%;
}

.card-wedge {
  background-color: var(--granate);
  width: 100%;
  height: 65vh;
  clip-path: polygon(0 15%, 100% 100%, 0 100%);
  position: relative;
  z-index: 2;
}

.hero-brand {
  position: absolute;
  left: 5vw;
  top: 6vh;
  z-index: 20;
  color: var(--blanco);
  pointer-events: none;
}

.brand-title {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  font-family: var(--font-titulo-grande);
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.word-main {
  font-size: clamp(15rem, 17vw, 17rem);
  font-weight: 900;
  display: block;
}

.brand-secondary {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0.5rem;
}

.word-sub {
  font-size: clamp(11rem, 13vw, 13rem);
  font-weight: 900;
  display: block;
  line-height: 0.85;
  margin-bottom: 0.75rem;
}

.subtitle-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 1rem;
  overflow: hidden;
}

.brand-subtitle {
  font-family: var(--font-cuerpo);
  font-size: clamp(1.25rem, 3vw, 2.8rem);
  opacity: 0.9;
  font-weight: 500;
  line-height: 1.3;
  color: var(--blanco);
  border-left: 4px solid var(--blanco);
  padding-left: 1.2rem;
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  animation: revealTextStatic 0.9s cubic-bezier(0.77, 0, 0.175, 1) forwards;
  animation-delay: 0.2s;
}

.reveal-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--blanco);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  z-index: 2;
  animation: lineScan 0.9s cubic-bezier(0.77, 0, 0.175, 1) forwards;
  animation-delay: 0.2s;
}

@keyframes lineScan {
  0% {
    left: 100%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    left: 0%;
    opacity: 0;
  }
}

@keyframes revealTextStatic {
  0% {
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@media (max-width: 870px) {
  .brand-title {
    flex-direction: column;
    gap: 0;
  }

  .word-main {
    font-size: clamp(12rem, 22vw, 14rem);
  }

  .word-sub {
    font-size: clamp(7rem, 12vw, 8rem);
    margin-bottom: 1rem;
  }

  .brand-secondary {
    padding-top: 0;
  }

  .brand-subtitle {
    max-width: 100%;
  }
}


/* -+-+-+-+-+-+-+-+-+- 06. INICIO: SECCIÓN DE VALORES -+-+-+-+-+-+-+-+-+- */

.card-body {
  background-color: var(--granate);
  min-height: 80vh;
  padding: 3rem 5vw 6rem;
  margin-top: -2px;
  position: relative;
  z-index: 3;
}

.section-title {
  font-family: var(--font-subtitulo);
  font-size: 3.2rem;
  font-weight: 100;
  color: var(--blanco);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-family: var(--font-subtitulo);
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 3.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  width: 100%;
}

.card-outer {
  flex: 1 1 300px;
  display: flex;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.35));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-outer:hover {
  transform: translateY(-8px);
}

/* Tarjeta Liquid Glass con chaflán de 45º inferior izquierdo */
.feature-card {
  position: relative;
  width: 100%;
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--glass-bg-ahumado);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 22px 22px 22px 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 56px 100%, 0 calc(100% - 56px));
  overflow: hidden;
}

.card-banner-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 145px;
  overflow: hidden;
  margin-top: auto;
}

.card-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.card-outer:hover .card-banner {
  transform: scale(1.06);
  filter: grayscale(40%) contrast(1.05);
}

.feature-card::before {
  content: attr(data-step);
  position: absolute;
  bottom: -1.4rem;
  left: -2rem;
  font-size: 21.5rem;
  line-height: 0.8;
  color: rgba(243, 243, 243, 0.43);
  pointer-events: none;
  z-index: 2;
  transition: transform 0.4s ease, color 0.4s ease;
}

.card-outer:hover .feature-card::before {
  color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.feature-card.card-01::before {
  font-family: var(--font-titulo-grande);
  font-weight: 400;
  letter-spacing: -0.05em;
}

.feature-card.card-02::before {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  bottom: -3.2rem;
  font-size: 37rem;
  letter-spacing: -0.06em;
}

.feature-card.card-03::before {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 100;
  bottom: -1.4rem;
  font-variant-numeric: lining-nums;
  font-style: italic;
  letter-spacing: -0.04em;
}

.card-content {
  position: relative;
  z-index: 3;
  padding: 2.6rem 2rem 1.5rem;
}

.card-title {
  font-family: var(--font-titulo);
  font-size: 2.1rem;
  color: var(--blanco);
  margin-bottom: 1.1rem;
  letter-spacing: -0.01em;
}

.card-text {
  font-family: var(--font-cuerpo);
  font-size: 0.92rem;
  margin-bottom: 1.4rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.card-btn {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem;
  margin-left: -0.45rem;
  font-family: var(--font-cuerpo);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--blanco);
  text-decoration: none;
  background-color: transparent;
  overflow: hidden;
  transition: background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.card-btn .btn-arrow {
  display: inline-block;
  font-weight: 600;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--blanco);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-btn:hover {
  background-color: var(--rojo);
  color: #ffffff;
}

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

.card-btn:hover .btn-arrow {
  transform: translateX(3px);
}


/* -+-+-+-+-+-+-+-+-+- 07. INICIO: CARRUSEL DE NOTICIAS Y TARJETAS PDF -+-+-+-+-+-+-+-+-+- */

.section-divider-6deg {
  position: relative;
  width: 100%;
  height: 7vw;
  z-index: 10;
  background-color: var(--granate);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  margin-top: 0;
  margin-bottom: calc(-10.5vw - 2px);
  pointer-events: none;
}

.white-section {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: auto;
  background-color: rgba(231, 231, 231, 0.72);
  color: var(--negro);
  margin-top: -130px;
  padding: 11rem 5vw 3.5rem;
}

.section-header-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}

.section-title-dark {
  font-family: var(--font-titulo);
  font-size: 3.2rem;
  color: var(--negro);
  margin-bottom: 0.75rem;
}

.section-subtitle-dark {
  font-family: var(--font-subtitulo);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--negro);
}

.news-carousel-wrapper {
  width: calc(100% + 5vw);
  margin-right: -5vw;
  position: relative;
}

.carousel-controls-pc {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-right: 5vw;
  margin-bottom: 1.25rem;
}

.carousel-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(123, 24, 24, 0.25);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--granate);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-arrow:hover {
  background-color: var(--granate);
  color: #ffffff;
  border-color: var(--granate);
  transform: scale(1.06);
}

.carousel-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.news-carousel {
  display: flex;
  align-items: stretch;
  gap: 2rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 1rem 6vw 2.5rem 0.25rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.news-carousel img {
  pointer-events: none;
  -webkit-user-drag: none;
}

.news-carousel::-webkit-scrollbar {
  display: none;
}

.news-carousel.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

/* CTA final del carrusel con anillo de progreso */
.carousel-end-cta {
  flex: 0 0 220px;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: end;
  padding-right: 2rem;
}

.view-all-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--granate);
}

.view-all-label {
  font-family: var(--font-titulo);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--granate);
  transition: transform 0.3s ease, color 0.3s ease;
}

.view-all-circle {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 12px 30px rgba(123, 24, 24, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.25s ease 0s,
    box-shadow 0.3s ease 0s;
}

.progress-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  pointer-events: none;
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(123, 24, 24, 0.15);
  stroke-width: 3;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--rojo);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 276.46;
  stroke-dashoffset: 276.46;
  transition: stroke-dashoffset 0.3s ease;
}

.view-all-arrow {
  color: var(--rojo);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0s,
    color 0.25s ease 0s;
}

.view-all-link:hover .progress-ring-fill {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-all-link:hover .view-all-circle {
  background-color: var(--rojo);
  transform: scale(1.08);
  box-shadow: 0 18px 38px rgba(196, 30, 30, 0.32);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.28s ease 0.42s,
    box-shadow 0.3s ease 0.42s;
}

.view-all-link:hover .view-all-arrow {
  color: #ffffff;
  transform: translateX(5px);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.42s,
    color 0.25s ease 0.42s;
}

.view-all-link:hover .view-all-label {
  color: var(--rojo);
  transform: translateY(-3px);
}

.spring-hint {
  font-family: var(--font-cuerpo);
  font-size: 0.78rem;
  color: rgba(17, 17, 17, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Tarjeta reutilizable de noticia / PDF (compartida entre index.html y news.html) */
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 4rem) / 3.35);
  min-width: 300px;
  min-height: 440px;
  scroll-snap-align: start;
  border-radius: 24px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 45px rgba(123, 24, 24, 0.22);
}

.news-preview {
  position: relative;
  width: 100%;
  height: 255px;
  background-color: #f4f4f4;
  overflow: hidden;
  z-index: 1;
}

.news-preview-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}

.news-doc-img {
  width: 100%;
  height: 115%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
}

.news-card:hover .news-doc-img {
  transform: translateY(-22px) scale(1.03);
  filter: brightness(0.65) blur(1.5px);
}

.pdf-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  padding: 0.25rem 0.65rem;
  background: rgba(17, 17, 17, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-cuerpo);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 6px;
  transition: opacity 0.3s ease;
}

.news-card:hover .pdf-badge {
  opacity: 0;
}

/* Botones flotantes en hover (Abrir / Descargar) */
.news-actions-overlay {
  position: absolute;
  inset: 0 0 42px 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.news-card:hover .news-actions-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-cuerpo);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 99px;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.news-actions-overlay .action-btn.btn-open,
.news-actions-overlay .action-btn.btn-open:hover,
.news-actions-overlay .action-btn.btn-open:visited {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  color: #111111 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.news-actions-overlay .action-btn.btn-open svg {
  stroke: #111111 !important;
}

.btn-open:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.btn-download {
  background-color: var(--granate);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(123, 24, 24, 0.4);
}

.btn-download:hover {
  background-color: var(--rojo);
  transform: translateY(-2px);
}

/* Cuerpo inferior Liquid Glass oscuro */
.news-glass-body {
  position: relative;
  z-index: 3;
  margin-top: -48px;
  padding: 3.2rem 1.8rem 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(32, 32, 34, 0.86);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  clip-path: polygon(0 42px, 82% 42px, 100% 0, 100% 100%, 0 100%);
}

.news-glass-body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  background-color: var(--granate);
  z-index: 4;
  pointer-events: none;
  clip-path: polygon(0 42px, 82% 42px, 100% 0, 100% 6px, calc(82% + 2px) 47px, 0 47px);
  transition: background-color 0.3s ease;
}

.news-card:hover .news-glass-body::before {
  background-color: var(--rojo);
}

.news-date {
  font-family: var(--font-cuerpo);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.5rem;
}

.news-title {
  font-family: var(--font-titulo);
  font-size: 1.45rem;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-tag {
  padding: 0.3rem 0.85rem;
  background-color: var(--granate);
  color: #ffffff;
  font-family: var(--font-cuerpo);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

/* Variante Urgente */
.news-card.is-urgent .news-glass-body {
  background: rgba(105, 16, 16, 0.92);
}

.news-card.is-urgent .news-glass-body::before,
.news-card.is-urgent .news-tag {
  background-color: var(--rojo);
}


/* -+-+-+-+-+-+-+-+-+- 08. INICIO: SECCIÓN DE SERVICIOS -+-+-+-+-+-+-+-+-+- */

.services-section {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 5.5rem 0 6.5rem;
  background: transparent;
}

.services-header {
  padding: 0 5vw;
}

.services-header .section-title-light {
  font-family: var(--font-titulo);
  font-size: 3.2rem;
  color: #000000;
  margin-bottom: 0.75rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
}

.services-header .section-subtitle-light {
  font-family: var(--font-subtitulo);
  font-size: 1.2rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.92);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.services-stack {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  width: 100%;
}

.service-row {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 310px;
}

.service-row.row-reverse {
  flex-direction: row-reverse;
}

.service-media {
  position: relative;
  flex: 1 1 54%;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-glass {
  position: relative;
  flex: 1 1 52%;
  z-index: 2;
  margin-left: -72px;
  padding: 2.6rem 5vw 2.6rem 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.service-row.row-reverse .service-glass {
  margin-left: 0;
  margin-right: -72px;
  padding: 2.6rem 5.5rem 2.6rem 5vw;
}

.glass-light {
  background: rgba(255, 255, 255, 0.42);
  color: var(--negro);
  border-top: 1px solid rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.glass-granate {
  background: rgba(123, 24, 24, 0.54);
  color: var(--blanco);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.row-01 .service-glass {
  clip-path: polygon(44px 0, 100% 0, 100% 100%, 0 100%, 44px calc(100% - 44px));
}

.row-02 .service-glass {
  clip-path: polygon(0 0, calc(100% - 44px) 0, calc(100% - 44px) calc(100% - 44px), 100% 100%, 0 100%);
}

.row-03 .service-glass {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 44px 100%, 44px 44px);
}

.service-step-bg {
  display: block;
  position: relative;
  font-family: var(--font-titulo-grande);
  font-variant-numeric: lining-nums;
  font-size: clamp(2.8rem, 3.8vw, 3.8rem);
  line-height: 0.9;
  margin-bottom: 0.55rem;
  user-select: none;
}

.glass-light .service-step-bg {
  color: var(--granate);
}

.glass-granate .service-step-bg {
  color: var(--blanco);
}

.service-text-box {
  position: relative;
  margin-left: 30px;
  z-index: 2;
}

.service-title {
  position: relative;
  display: inline-block;
  font-family: var(--font-subtitulo);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.2vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  padding-bottom: 0.35rem;
  margin-bottom: 0.85rem;
}

.service-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-light .service-title {
  color: var(--granate);
}

.glass-light .service-title::after {
  background-color: var(--granate);
}

.glass-granate .service-title {
  color: #ffffff;
}

.glass-granate .service-title::after {
  background-color: var(--blanco);
}

.service-row:hover .service-title::after {
  transform: scaleX(1);
}

.service-desc {
  font-family: var(--font-cuerpo);
  font-weight: 400;
  font-size: 0.96rem;
  line-height: 1.6;
  max-width: 54ch;
}

.glass-light .service-desc {
  color: rgba(17, 17, 17, 0.95);
}

.glass-granate .service-desc {
  color: rgba(255, 255, 255, 0.95);
}

@media (min-width: 1101px) {
  .services-stack {
    gap: 1.85rem;
  }

  .service-row {
    min-height: 255px;
  }

  .service-glass {
    padding: 2rem 5vw 2rem 5rem;
  }

  .service-row.row-reverse .service-glass {
    padding: 2rem 5rem 2rem 5vw;
  }

  .service-step-bg {
    font-size: 3.1rem;
    margin-bottom: 0.45rem;
  }

  .service-title {
    font-size: 1.85rem;
    margin-bottom: 0.65rem;
  }

  .service-desc {
    font-size: 0.94rem;
    line-height: 1.55;
  }
}

@media (max-width: 860px) {
  .services-stack {
    gap: 2.2rem;
  }

  .service-row,
  .service-row.row-reverse {
    flex-direction: column;
    min-height: auto;
  }

  .service-media {
    flex: none;
    height: 230px;
    clip-path: polygon(36px 0, 100% 0, 100% 100%, 0 100%, 0 36px);
  }

  .row-01 .service-glass,
  .row-02 .service-glass,
  .row-03 .service-glass,
  .service-glass,
  .service-row.row-reverse .service-glass {
    flex: none;
    margin-left: 0;
    margin-right: 0;
    margin-top: -24px;
    padding: 2.5rem 5vw 2.8rem;
    clip-path: none;
  }

  .service-text-box {
    position: static;
  }

  .service-step-bg {
    position: absolute;
    bottom: -1rem;
    right: 2vw;
    left: auto;
    margin-bottom: 0;
    font-size: 9.5rem;
    line-height: 0.8;
    pointer-events: none;
    z-index: 1;
  }

  .glass-light .service-step-bg {
    color: rgba(123, 24, 24, 0.22);
  }

  .glass-granate .service-step-bg {
    color: rgba(255, 255, 255, 0.24);
  }

  .service-title,
  .service-desc {
    position: relative;
    z-index: 2;
  }
}


/* -+-+-+-+-+-+-+-+-+- 09. PIE DE PÁGINA (FOOTER GRANATE) -+-+-+-+-+-+-+-+-+- */

.site-footer {
  position: relative;
  z-index: 20;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -32px;
  margin-bottom: 0;
  background-color: var(--granate);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 -22px 48px rgba(0, 0, 0, 0.42),
    0 300px 0 300px var(--granate);
  color: var(--blanco);
  padding: 5.2rem 5vw 2.5rem;
  box-sizing: border-box;
}

.footer-container {
  display: flex;
  align-items: center;
  gap: 4.5rem;
  width: 100%;
}

.footer-image-box {
  flex: 0 0 260px;
  width: 260px;
  height: 260px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.footer-image-right .footer-img {
  object-position: bottom center;
}

.footer-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-logo {
  font-family: var(--font-titulo-grande);
  font-size: clamp(2.4rem, 3.5vw, 3.2rem);
  color: var(--blanco);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-family: var(--font-subtitulo);
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 3.5rem;
  margin-top: 2.5rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-heading {
  font-family: var(--font-subtitulo);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.35rem;
}

.footer-text,
.footer-link {
  font-family: var(--font-cuerpo);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-link:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-cuerpo);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 1150px) {
  .footer-image-box {
    flex: 0 0 190px;
    width: 190px;
    height: 190px;
  }

  .footer-columns {
    gap: 2rem;
  }
}

/* MÓVIL (< 860px) */
@media (max-width: 860px) {
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 2.5rem;
  }

  .footer-image-box {
    flex: none;
    width: 210px;
    height: 210px;
  }

  .footer-image-right {
    align-self: flex-start;
    width: 170px;
    height: 170px;
  }
}

/* -+-+-+-+-+-+-+-+-+- 10. PÁGINA DE CONTACTO -+-+-+-+-+-+-+-+-+- */

.contact-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 9rem;
  padding-bottom: 4.5rem;
  overflow: hidden;
}

.contact-bg-wrap {
  position: absolute;
  inset: 0;
  height: 100%;
  z-index: 1;
}

.contact-bg-img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.contact-bg-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0.1) 45%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

.contact-diagonal-granate {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: var(--granate);
  clip-path: polygon(100% 0, 100% 100%, 64% 100%);
  pointer-events: none;
}

.contact-stage {
  position: relative;
  z-index: 3;
  width: 58%;
  margin-left: auto;
  margin-right: 0;
}

.contact-main-title {
  font-family: var(--font-titulo-grande);
  font-size: clamp(3.2rem, 5vw, 4.7rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 0.85rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.contact-glass-panel {
  width: 100%;
  padding: 2.4rem 5vw 2.4rem 2.2rem;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.85);
  border-left: 1px solid rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: -12px 20px 45px rgba(0, 0, 0, 0.22);
}

.contact-tabs-layout {
  display: grid;
  grid-template-columns: auto 24px 1fr;
  gap: 1.4rem;
  align-items: stretch;
  min-height: 270px;
}

/* Burbujas selectoras de canal */
.contact-bubbles {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0;
}

.contact-bubble {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(120, 120, 125, 0.34);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.55);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
}

.contact-bubble:hover {
  background: rgba(123, 24, 24, 0.52);
  border-color: rgba(255, 255, 255, 0.85);
  transform: scale(1.06);
}

.contact-bubble.is-active {
  background: rgba(123, 24, 24, 0.86);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 10px 24px rgba(123, 24, 24, 0.35),
    inset 0 1px 2px rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

/* Línea SVG animada */
.contact-pointer-track {
  position: relative;
  width: 24px;
  height: 100%;
  color: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.22));
}

.contact-pointer-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Paneles de datos */
.contact-panels {
  position: relative;
  padding-left: 0.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-tab-panel {
  animation: tabFadeSlide 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.contact-tab-panel[hidden] {
  display: none;
}

@keyframes tabFadeSlide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-heading {
  font-family: var(--font-subtitulo);
  font-size: clamp(1.85rem, 2.6vw, 2.35rem);
  font-weight: 100;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.24);
  margin-bottom: 1.1rem;
  line-height: 1.05;
}

.panel-block {
  margin-bottom: 1rem;
}

.panel-sublabel {
  display: block;
  font-family: var(--font-subtitulo);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--blanco);
  margin-bottom: 0.25rem;
}

.panel-data-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.panel-data {
  font-family: var(--font-cuerpo);
  font-size: 1.42rem;
  font-weight: 600;
  color: var(--blanco);
  margin-bottom: 0.25rem;
}

/* Botones píldora expansibles (Copiar / QR) */
.pill-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(123, 24, 24, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(123, 24, 24, 0.22);
  color: #ffffff;
  font-family: var(--font-subtitulo);
  font-size: 0.8rem;
  font-weight: 100;
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color 0.3s ease,
    border-radius 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
}

.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pill-custom-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.pill-text-wrap {
  display: grid;
  grid-template-columns: 0fr;
  opacity: 0;
  margin-left: 0;
  transition:
    grid-template-columns 0.38s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.26s ease,
    margin-left 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-text {
  overflow: hidden;
  white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) {
  .pill-btn:not(.is-open):hover {
    background: var(--granate);
    padding: 0 14px 0 11px;
    box-shadow: 0 6px 16px rgba(123, 24, 24, 0.34);
  }

  .pill-btn:not(.is-open):hover .pill-text-wrap {
    grid-template-columns: 1fr;
    opacity: 1;
    margin-left: 7px;
  }
}

.pill-btn.is-copied {
  background: #1f7a4c !important;
  padding: 0 14px 0 11px !important;
}

.pill-btn.is-copied .pill-text-wrap {
  grid-template-columns: 1fr !important;
  opacity: 1 !important;
  margin-left: 7px !important;
}

/* Tarjeta QR flotante hacia arriba */
.pill-qr {
  position: relative;
  height: 36px;
  overflow: visible;
}

.pill-qr-header {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.pill-qr-box {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 156px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(123, 24, 24, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px) scale(0.94);
  transform-origin: bottom left;
  transition:
    opacity 0.28s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.28s ease;
}

.pill-qr.is-open {
  background: var(--granate);
  padding: 0 14px 0 11px;
  z-index: 51;
}

.pill-qr.is-open .pill-text-wrap {
  grid-template-columns: 1fr;
  opacity: 1;
  margin-left: 7px;
}

.pill-qr.is-open .pill-qr-box {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.pill-qr-box img {
  width: 136px;
  height: 136px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  border-radius: 0;
  display: block;
}

.pill-qr-box small {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 6px;
}

@media (max-width: 1024px) {
  .contact-stage {
    width: 84%;
  }

  .contact-diagonal-granate {
    clip-path: polygon(100% 0, 100% 100%, 52% 100%);
  }
}

@media (max-width: 768px) {
  .contact-hero {
    padding-top: 7.5rem;
    padding-bottom: 3rem;
  }

  .contact-stage {
    width: 92%;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-diagonal-granate {
    clip-path: polygon(100% 18%, 100% 100%, 35% 100%);
  }

  .contact-glass-panel {
    padding: 1.6rem 1.4rem 1.8rem;
    border-right: 1px solid rgba(255, 255, 255, 0.4);
  }

  .contact-tabs-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 22px auto;
    gap: 0.9rem;
    min-height: 250px;
  }

  .contact-bubbles {
    flex-direction: row;
    justify-content: space-around;
    padding: 0 0.5rem;
  }

  .contact-bubble {
    width: 48px;
    height: 48px;
  }

  .contact-pointer-track {
    width: 100%;
    height: 22px;
  }

  .contact-panels {
    padding-left: 0;
    padding-top: 0.25rem;
  }
}


/* -+-+-+-+-+-+-+-+-+- 11. PÁGINA DE HISTORIAL DE ANUNCIOS -+-+-+-+-+-+-+-+-+- */

.docs-history-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: #ffffff;
  padding-top: 8.5rem;
  padding-bottom: 8rem;
  overflow-x: hidden;
}

/* Fondo editorial superior difuminado hacia blanco */
.docs-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 500px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.docs-hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.28;
  filter: grayscale(100%) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 25%, rgba(0, 0, 0, 0) 100%);
}

.docs-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.65) 68%,
    #ffffff 100%
  );
}

.docs-container {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 5vw 0 3vw;
}

.docs-page-header {
  margin: 0 0 2.3rem 0 !important;
  padding-left: 3.1rem;
}

.docs-main-title {
  font-family: var(--font-titulo-grande);
  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--negro);
  margin: 0 !important;
}

/* Línea de tiempo continua en escritorio */
.docs-timeline {
  position: relative;
}

.docs-timeline-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 100%;
  display: block;
  color: var(--granate);
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}

.docs-timeline-svg path {
  vector-effect: non-scaling-stroke;
}

.docs-months-list {
  display: flex;
  flex-direction: column;
  gap: 3.8rem;
}

.docs-month-group {
  position: relative;
  padding-left: 3.1rem;
}

.docs-month-marker {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1.45rem;
}

.docs-month-title {
  font-family: var(--font-titulo-grande);
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  font-weight: 700;
  color: var(--negro);
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}

.docs-year {
  color: var(--granate);
}

.docs-year-sep {
  color: rgba(123, 24, 24, 0.45);
  font-weight: 400;
}

/* Cuadrícula de tarjetas PDF */
.docs-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem;
}

.docs-cards-grid .news-card {
  width: 100%;
  min-width: 0;
  flex: initial;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.docs-cards-grid .news-card.is-urgent {
  border-color: rgba(123, 24, 24, 0.35);
  box-shadow: 0 14px 34px rgba(123, 24, 24, 0.12);
}

@media (max-width: 1024px) {
  .docs-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .docs-history-page {
    padding-top: 7.2rem;
    padding-bottom: 6.5rem;
  }

  .docs-timeline::before,
  .docs-timeline::after,
  .docs-timeline-svg,
  .docs-timeline-svg path {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .docs-container {
    box-sizing: border-box !important;
    width: 100% !important;
    padding-left: 1.75rem !important;
    padding-right: 1.75rem !important;
  }

  .docs-page-header,
  .docs-month-group,
  .docs-month-marker,
  .docs-main-title,
  .docs-month-title {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }

  .docs-page-header {
    margin-bottom: 1.6rem !important;
  }

  .docs-months-list {
    gap: 2.6rem;
  }

  .docs-month-group::before,
  .docs-month-group::after,
  .docs-month-marker::before,
  .docs-month-marker::after {
    content: none !important;
    display: none !important;
  }

  .docs-month-marker {
    padding-bottom: 0;
    margin-bottom: 1.1rem;
    border: none !important;
  }

  .docs-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }
}


/* -+-+-+-+-+-+-+-+-+- 12. ADAPTACIÓN EXCLUSIVA PARA DISPOSITIVOS TÁCTILES -+-+-+-+-+-+-+-+-+- */

@media (hover: none) and (pointer: coarse) {
  /* Oculta flechas de carrusel y muestra pista táctil */
  .carousel-controls-pc {
    display: none;
  }

  .spring-hint {
    opacity: 1;
  }

  /* Subrayado de servicios siempre visible sin hover */
  .service-title::after {
    transform: scaleX(1);
    transition: none;
  }

  /* Tarjetas PDF: toque directo sobre la imagen abre el documento */
  .news-actions-overlay {
    display: none !important;
  }

  .news-preview-link {
    display: block !important;
    position: absolute;
    inset: 0;
    z-index: 5;
  }

  /* Contacto: oculta botones QR y deja solo "Copiar" */
  .pill-qr {
    display: none !important;
  }
}