/* =========================================================================
   AZAHAR DATA INSIGHTS — CSS de página: sector
   Tipo nuevo. Solo clases específicas de "sector"; las globales azh-* viven
   en azh-globals.css y NO se redefinen aquí.
   Fuente de verdad: este fichero. La plantilla Jinja2 no lleva <style>.

   MULTICOLOR: la página lleva su azh-accent--{color} en el wrapper raíz, y
   cada grupo de servicios toma el acento de SU RUTA, de modo que el color
   mantiene la correspondencia con el sistema de rutas. Casos, tarjetas de
   solvencia y FAQs llevan el suyo desde el YAML. Todo el CSS consume
   --accent-color y --accent-light. No hay variables inline (B5).
   ========================================================================= */

/* === WRAPPER RAÍZ === */
/* .sector-page se registra en el Style Manager de Bricks con box-sizing y
   color; NO redefinir la clase base aquí (B6, provoca CONFLICT al importar). */
.sector-page * { box-sizing: border-box; }

/* B11: contención de desbordamiento en el wrapper del fragmento, nunca en
   el body, para no alterar el encabezado sticky del tema. */
div.sector-page { overflow-x: clip; }

/* B7: Bricks renderiza cada <section> como flex column y los __inner sin
   ancho explícito se encogen a su contenido. Todos los inner de este tipo
   necesitan width:100%. */
.sector-hero,
.sector-lead > .sector-lead__inner,
.sector-fit > .azh-section__inner,
.sector-serv > .azh-section__inner,
.sector-rutas > .azh-section__inner,
.sector-casos > .azh-section__inner,
.sector-solv > .azh-section__inner,
.sector-faq > .azh-section__inner,
.sector-otros > .azh-section__inner,
.sector-cta > .azh-cta-section__inner { width: 100%; }


/* === HERO === */
/* LONGHAND EXPLÍCITO: nunca shorthand padding con var() en Bricks (B1). */
.sector-hero {
  padding-top: 56px;
  padding-right: 40px;
  padding-bottom: 88px;
  padding-left: 40px;
  max-width: 1200px;
  margin-top: 0;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
}

.sector-hero__eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-color, #0eafa7);
  margin-bottom: 20px;
}

.sector-hero__title {
  color: var(--azahar-oxford, #05254c);
  max-width: 980px;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}

.sector-hero__tagline {
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
  max-width: 840px;
  font-weight: 500;
  margin: 0;
}


/* === FRANJA MOSAICO === */
/* Dos filas: 2 bandas arriba, 3 abajo. Mismo patrón que ruta y metodología. */
.sector-strip { width: 100%; }

.sector-strip__row { display: grid; }

.sector-strip__row--top {
  grid-template-columns: 1fr 1fr;
  height: 48px;
}

.sector-strip__row--bottom {
  grid-template-columns: 1fr 1fr 1fr;
  height: 48px;
}

.sector-strip__band {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--accent-color, #0eafa7) 0%,
    var(--azahar-white, #ffffff) 100%
  );
}


/* === ENTRADILLA === */
.sector-lead {
  padding-top: 88px;
  padding-right: 40px;
  padding-bottom: 96px;
  padding-left: 40px;
  background: var(--azahar-white, #ffffff);
}

.sector-lead__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.sector-lead__p {
  font-size: 19px;
  line-height: 1.7;
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
  max-width: 780px;
  margin: 0 0 26px;
}

.sector-lead__p:last-child { margin-bottom: 0; }


/* === CON QUIÉN TRABAJAMOS (panel Oxford) === */
.sector-fit__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}

.sector-fit__heading {
  color: var(--azahar-white, #ffffff);
  margin: 0;
}

.sector-fit__line {
  display: block;
  width: 64px;
  height: 5px;
  margin-top: 26px;
  background: linear-gradient(
    90deg,
    var(--accent-color, #0eafa7) 0%,
    var(--accent-light, #c6faf8) 100%
  );
}

.sector-fit__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* .azh-list-item aporta la barra 14×2px; aquí solo el color sobre oscuro. */
.sector-fit .azh-list-item__text { color: rgba(255, 255, 255, 0.9); }


/* === SERVICIOS DEL SECTOR === */
.sector-serv { padding-bottom: 40px; }

.sector-serv__intro {
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
  margin: 0;
}

.sector-grupo { margin-bottom: 72px; }

/* Cabecera de grupo: caja con esquina de color. Mismo patrón que .ruta-ghead. */
.sector-ghead {
  position: relative;
  padding: 34px 40px 32px 116px;
  background: var(--azahar-white, #ffffff);
  box-shadow: 0 0 0 1px var(--azahar-oxford-10, rgba(5, 37, 76, 0.1)) inset;
  margin-bottom: 8px;
}

.sector-ghead__corner {
  position: absolute;
  left: 0;
  top: 0;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--azahar-white, #ffffff);
  background: linear-gradient(
    135deg,
    var(--accent-color, #0eafa7) 0%,
    var(--accent-light, #c6faf8) 100%
  );
}

.sector-ghead__titulo {
  color: var(--azahar-oxford, #05254c);
  margin: 0;
}

.sector-ghead__bajada {
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
  font-style: italic;
  max-width: 820px;
  margin: 8px 0 0;
}

/* Listado de servicios */
.sector-lista {
  display: flex;
  flex-direction: column;
  padding-left: 4px;
  padding-right: 4px;
}

/* display:block obligatorio: Bricks remapea display:flex en un <a>. */
.sector-item {
  display: block;
  text-decoration: none;
  border-bottom: 1px solid var(--azahar-oxford-10, rgba(5, 37, 76, 0.1));
  transition: background 0.25s ease;
}

/* El Theme Style subraya `a:hover`, y como el enlace envuelve toda la fila,
   ese subrayado se propaga al nombre y al párrafo. Se anula en los tres
   estados del propio <a>: un descendiente no puede deshacer el
   text-decoration de su ancestro. */
.sector-item:hover,
.sector-item:focus-visible,
.sector-item:active { text-decoration: none; }

/* Iluminación SOLO en hover/foco: nada preiluminado. */
.sector-item:hover,
.sector-item:focus-visible {
  background: linear-gradient(
    90deg,
    var(--accent-light, #c6faf8) 0%,
    var(--azahar-white, #ffffff) 65%
  );
}

.sector-item__row {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 52px;
  padding: 30px 24px 30px 20px;
}

.sector-item__nombre {
  display: block;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--azahar-oxford, #05254c);
}

/* Barra dinámica: crece al pasar el ratón. */
.sector-item__rule {
  display: block;
  width: 56px;
  height: 5px;
  margin-top: 14px;
  background: linear-gradient(
    90deg,
    var(--accent-color, #0eafa7) 0%,
    var(--accent-light, #c6faf8) 100%
  );
  transition: width 0.3s ease;
}

.sector-item:hover .sector-item__rule,
.sector-item:focus-visible .sector-item__rule { width: 130px; }

.sector-item__texto {
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
  max-width: 720px;
  margin: 0 0 12px;
}

.sector-item__arrow {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-color, #0eafa7);
}

/* El único elemento de la fila que se subraya. */
.sector-item:hover .sector-item__arrow,
.sector-item:focus-visible .sector-item__arrow {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* Pie del grupo: puente a la ruta completa */
.sector-grupo__pie {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 24px 18px 20px;
  text-decoration: none;
  background: linear-gradient(
    90deg,
    var(--accent-light, #c6faf8) 0%,
    var(--azahar-white, #ffffff) 80%
  );
  transition: transform 0.2s ease;
}

.sector-grupo__pie:hover,
.sector-grupo__pie:focus-visible {
  text-decoration: none;
  transform: translateX(4px);
}

.sector-grupo__pie:active { text-decoration: none; }

.sector-grupo__pie-txt {
  font-size: 15px;
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
}

.sector-grupo__pie-cta {
  font-size: 15px;
  font-weight: 600;
  color: var(--azahar-oxford, #05254c);
}

.sector-grupo__pie:hover .sector-grupo__pie-cta,
.sector-grupo__pie:focus-visible .sector-grupo__pie-cta {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}


/* === PUENTE AL RESTO DEL CATÁLOGO: LAS RUTAS === */
.sector-rutas__intro {
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
  margin: 0;
}

.sector-rutas__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sector-ruta {
  display: block;
  position: relative;
  background: var(--azahar-white, #ffffff);
  padding: 36px 28px 28px;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--azahar-oxford-10, rgba(5, 37, 76, 0.1)) inset;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sector-ruta:hover,
.sector-ruta:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--accent-color, #0eafa7) inset;
  text-decoration: none;
}

.sector-ruta:active { text-decoration: none; }

.sector-ruta__bar {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--accent-color, #0eafa7) 0%,
    var(--accent-light, #c6faf8) 100%
  );
}

.sector-ruta__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}

.sector-ruta__n {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--azahar-oxford-50, rgba(5, 37, 76, 0.5));
}

.sector-ruta__badge {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  color: var(--azahar-oxford, #05254c);
  background: var(--accent-light, #c6faf8);
}

.sector-ruta__nombre {
  display: block;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--azahar-oxford, #05254c);
  margin-bottom: 12px;
}

.sector-ruta__ej {
  display: block;
  font-size: 15px;
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
  margin-bottom: 18px;
}

.sector-ruta__arrow {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-color, #0eafa7);
}

.sector-ruta:hover .sector-ruta__arrow,
.sector-ruta:focus-visible .sector-ruta__arrow {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}


/* === CASOS === */
.sector-casos__title {
  color: var(--azahar-white, #ffffff);
  margin: 0;
}

.sector-casos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 30px;
  align-items: stretch;
}

.sector-casos__grid--1 { grid-template-columns: repeat(2, 1fr); }
.sector-casos__grid--2 { grid-template-columns: repeat(2, 1fr); }

/* El <a> reserva 16px a derecha y abajo para el rectángulo decorativo, que
   así NO usa offsets negativos y no propaga scroll horizontal (B11). */
.sector-caso {
  display: block;
  position: relative;
  height: 100%;
  padding: 0 16px 16px 0;
  text-decoration: none;
}

.sector-caso__deco {
  position: absolute;
  left: 16px;
  top: 16px;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    var(--accent-color, #0eafa7) 0%,
    var(--accent-light, #c6faf8) 100%
  );
  transition: transform 0.25s ease;
}

.sector-caso:hover .sector-caso__deco,
.sector-caso:focus-visible .sector-caso__deco { transform: translate(6px, 6px); }

.sector-caso:hover,
.sector-caso:focus-visible,
.sector-caso:active { text-decoration: none; }

/* height:100% en el body iguala la altura de todas las tarjetas de la fila. */
.sector-caso__body {
  position: relative;
  z-index: 2;
  display: block;
  height: 100%;
  background: var(--azahar-white, #ffffff);
  padding: 34px 30px 30px;
}

.sector-caso__t {
  display: block;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--azahar-oxford, #05254c);
  margin-bottom: 14px;
}

.sector-caso__p {
  display: block;
  font-size: 15px;
  color: var(--azahar-oxford-70, rgba(5, 37, 76, 0.7));
  margin-bottom: 18px;
}

.sector-caso__arrow {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-color, #0eafa7);
}

.sector-caso:hover .sector-caso__arrow,
.sector-caso:focus-visible .sector-caso__arrow {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

.sector-casos__todos {
  display: inline-block;
  margin-top: 48px;
  font-size: 16px;
  font-weight: 600;
  color: var(--azahar-white, #ffffff);
  text-decoration: none;
  border-bottom: 3px solid var(--accent-color, #0eafa7);
  padding-bottom: 4px;
}

.sector-casos__todos:hover,
.sector-casos__todos:focus-visible { text-decoration: none; }


/* === SOLVENCIA (bloque opcional) === */
.sector-solv__title {
  color: var(--azahar-white, #ffffff);
  margin: 0 0 24px;
}

.sector-solv__intro {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.sector-solv__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 40px;
}

.sector-solv .azh-item-card__title { color: var(--azahar-white, #ffffff); }
.sector-solv .azh-item-card__text { color: rgba(255, 255, 255, 0.85); }


/* === FAQs === */
.sector-faq__list {
  display: flex;
  flex-direction: column;
}

.sector-faq__item {
  border-top: 1px solid var(--azahar-oxford-10, rgba(5, 37, 76, 0.1));
}

.sector-faq__item:last-child {
  border-bottom: 1px solid var(--azahar-oxford-10, rgba(5, 37, 76, 0.1));
}

.sector-faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  font-weight: 600;
  color: var(--azahar-oxford, #05254c);
}

.sector-faq__q::-webkit-details-marker { display: none; }

.sector-faq__item[open] > .sector-faq__q {
  background: linear-gradient(
    90deg,
    var(--accent-light, #c6faf8) 0%,
    var(--azahar-white, #ffffff) 70%
  );
}

.sector-faq__icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.sector-faq__item[open] > .sector-faq__q .sector-faq__icon { transform: rotate(180deg); }

.sector-faq__a { padding: 0 24px 28px; }

.sector-faq__p {
  color: var(--azahar-oxford-90, rgba(5, 37, 76, 0.9));
  max-width: 840px;
  margin: 0 0 16px;
}

.sector-faq__p:last-child { margin-bottom: 0; }


/* === OTROS SECTORES === */
.sector-otros__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sector-otro {
  display: block;
  position: relative;
  background: var(--azahar-white, #ffffff);
  padding: 32px 28px 26px;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--azahar-oxford-10, rgba(5, 37, 76, 0.1)) inset;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sector-otro:hover,
.sector-otro:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px var(--accent-color, #0eafa7) inset;
  text-decoration: none;
}

.sector-otro:active { text-decoration: none; }

.sector-otro__bar {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--accent-color, #0eafa7) 0%,
    var(--accent-light, #c6faf8) 100%
  );
}

.sector-otro__n {
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: var(--azahar-oxford, #05254c);
  margin-bottom: 10px;
}

.sector-otro__a {
  display: block;
  font-size: 24px;
  line-height: 1;
  color: var(--accent-color, #0eafa7);
}


/* === RESPONSIVE === */
/* Todos los @media con prefijo .sector-page (especificidad frente a Bricks). */
@media (max-width: 991px) {
  .sector-page .sector-fit__inner { grid-template-columns: 1fr; gap: 40px; }
  .sector-page .sector-item__row { grid-template-columns: 1fr; gap: 16px; }
  .sector-page .sector-rutas__grid { grid-template-columns: 1fr; gap: 24px; }
  .sector-page .sector-casos__grid,
  .sector-page .sector-casos__grid--1,
  .sector-page .sector-casos__grid--2 { grid-template-columns: 1fr; gap: 44px; }
  .sector-page .sector-solv__grid { grid-template-columns: 1fr; gap: 44px; }
  .sector-page .sector-otros__grid { grid-template-columns: 1fr; gap: 20px; }
  .sector-page .sector-hero { padding-bottom: 64px; }
  .sector-page .sector-lead { padding-top: 64px; padding-bottom: 72px; }
}

@media (max-width: 767px) {
  .sector-page .sector-hero { padding-left: 24px; padding-right: 24px; }
  .sector-page .sector-lead { padding-left: 24px; padding-right: 24px; }
  /* La esquina de color pasa a ocupar la parte superior de la caja. */
  .sector-page .sector-ghead { padding: 100px 24px 28px; }
  .sector-page .sector-item__row { padding-left: 8px; padding-right: 8px; }
  .sector-page .sector-lead__p { font-size: 18px; }
  .sector-page .sector-strip__row--top,
  .sector-page .sector-strip__row--bottom { height: 36px; }
}

@media (max-width: 479px) {
  .sector-page .sector-caso__body { padding: 28px 22px 24px; }
  .sector-page .sector-ghead { padding-left: 20px; padding-right: 20px; }
  .sector-page .sector-ruta { padding-left: 22px; padding-right: 22px; }
}
