/* ---- HERO SECTOR ---- */
.sector-hero {
  position: relative;
  width: 100%;
  /* Mismo alto que .prod-hero de productos (~334px). min-height y no height
     para que en móvil crezca si el título ocupa más líneas. */
  min-height: 334px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* Imagen de fondo */
.sector-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* Overlay más oscuro abajo para que se lea el texto */
.sector-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.55) 60%,
    rgba(0,0,0,0.72) 100%
  );
}

/* Contenido */
.sector-hero__content {
  position: relative;
  z-index: 2;
  padding: var(--navbar-height) 2rem 0;
  max-width: 1100px;
  color: #fff;
  text-align: center;
}

/* Badge pequeña */
.sector-hero__badge {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.9);
}

/* Título grande */
.sector-hero__title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 2rem;
  max-width: 720px;
}

/* Botones */
.sector-hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.sh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  border: 2px solid transparent;
}
.sh-btn:hover  { transform: translateY(-2px); }
.sh-btn:active { transform: translateY(0); }

.sh-btn--green {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.sh-btn--green:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }

.sh-btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.65);
}
.sh-btn--outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.sh-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Responsive hero */
@media (max-width: 600px) {
  .sector-hero__content { padding: 0 1.5rem; }
  .sector-hero__actions { flex-direction: column; }
  .sh-btn { justify-content: center; }
}

/* ---- DIFERENCIADORES ---- */
.diff {
  background: #fff;
  padding: 5rem 10rem;
  text-align: center;
}

.diff__label {
  display: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

.diff__title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.12;
  margin-bottom: 1rem;
}

.diff__sub {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 4rem;
}

/* ---- LAYOUT DIAGRAMA ---- */
.diff__layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
}

.diff__col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.diff-card {
  background: #f5f4ef;
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.diff-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.diff-card__num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}

.diff-card__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.25;
}

.diff-card__text {
  font-size: 0.78rem;
  color: #777;
  line-height: 1.65;
}

/* ---- DIAGRAMA CIRCULAR ---- */
.diff__circle-wrap {
  position: relative;
  width: 420px;
  height: 420px;
  flex-shrink: 0;
}

/* Anillo exterior decorativo */
.diff__circle-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px dashed rgba(0,0,0,0.1);
  animation: spin-slow 30s linear infinite;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.diff__donut {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

/* Máscara interior para efecto donut */
.diff__donut::before {
  content: '';
  position: absolute;
  inset: 38px;
  border-radius: 50%;
  background: #fff;
}

.diff__donut-inner {
  position: relative;
  z-index: 1;
  width: 176px;
  height: 176px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.3);
}

.diff__donut-inner svg {
  width: 52px;
  height: 52px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.diff__node {
  position: absolute;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: transform 0.2s, box-shadow 0.2s;
}

.diff__node:hover {
  transform: scale(1.15);
  box-shadow: 0 10px 28px rgba(0,0,0,0.2);
}

.diff__node svg { width: 26px; height: 26px; }

.diff__node--top    { top: -32px;  left: 50%; transform: translateX(-50%); }
.diff__node--right  { right: -32px; top: 50%; transform: translateY(-50%); }
.diff__node--bottom { bottom: -32px; left: 50%; transform: translateX(-50%); }
.diff__node--left   { left: -32px;  top: 50%; transform: translateY(-50%); }

.diff__node--top:hover    { transform: translateX(-50%) scale(1.15); }
.diff__node--right:hover  { transform: translateY(-50%) scale(1.15); }
.diff__node--bottom:hover { transform: translateX(-50%) scale(1.15); }
.diff__node--left:hover   { transform: translateY(-50%) scale(1.15); }

@media (max-width: 1100px) {
  .diff__layout { grid-template-columns: 1fr; }
  .diff__circle-wrap { margin: 0 auto; }
}

@media (max-width: 600px) {
  /* El diagrama mide 420px y en móvil se sale de la pantalla: se escala
     todo. El ajuste de los íconos de las esquinas está en style.css. */
  .diff__circle-wrap { width: 260px; height: 260px; }
  .diff__donut        { width: 260px; height: 260px; }
  .diff__donut::before { inset: 23px; }
  .diff__donut-inner   { width: 110px; height: 110px; }
  .diff__donut-inner svg { width: 32px; height: 32px; }
  .diff__node          { width: 44px; height: 44px; }
  .diff__node svg      { width: 18px; height: 18px; }
}

/* ---- PRODUCTOS CARRUSEL ---- */
.products { background: #f5f4ef; padding: 4rem 0 5rem; }
.products__header { padding: 0 10rem; margin-bottom: 2rem; }
.products__pretitle { font-size: 1.05rem; font-weight: 700; color: #1a1a1a; }
.products__track-wrap { overflow: hidden; position: relative; }
.products__track-wrap::before,
.products__track-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none; }
.products__track-wrap::before { left: 0; background: linear-gradient(to right, #f5f4ef, transparent); }
.products__track-wrap::after  { right: 0; background: linear-gradient(to left, #f5f4ef, transparent); }

/* Flechas indicadoras. Solo decoran (pointer-events: none), el movimiento
   por hover lo hace js/sector-productos.js. */
.products__nav-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.products__track-wrap:hover .products__nav-hint { opacity: 0.92; }
.products__nav-hint--left  { left: 1.5rem; }
.products__nav-hint--right { right: 1.5rem; }
.products__nav-hint svg { width: 20px; height: 20px; }
@media (max-width: 768px) { .products__nav-hint { display: none; } }
/* La animación la maneja js/sector-productos.js con requestAnimationFrame */
.products__track { display: flex; gap: 1.25rem; padding: 1rem 4rem; width: max-content; will-change: transform; }
.pslide { background: #fff; border-radius: 1.1rem; width: 340px; flex-shrink: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.pslide:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.1); }
.pslide__img { height: 200px; background: #edecea; display: flex; align-items: center; justify-content: center; color: #bbb; overflow: hidden; }
.pslide__img svg { width: 36px; height: 36px; }
.pslide__body { padding: 1.1rem 1.25rem 1.4rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.pslide__cat { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-primary); }
.pslide__name { font-size: 0.95rem; font-weight: 800; color: #1a1a1a; line-height: 1.25; }
.pslide__desc { font-size: 0.75rem; color: #777; line-height: 1.6; flex: 1; }
.pslide__btn { display: inline-block; margin-top: 0.75rem; font-size: 0.78rem; font-weight: 700; color: var(--color-primary); text-decoration: none; transition: opacity 0.15s; }
.pslide__btn:hover { opacity: 0.7; }
@media (max-width: 1400px) { .products__header { padding-left: 4rem; padding-right: 4rem; } }
@media (max-width: 768px)  { .products__header { padding-left: 1.5rem; padding-right: 1.5rem; } }

/* ---- METODOLOGÍA ---- */
.method {
  background: #fff;
  padding: 5rem 16rem 6rem;
}

.method__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

.method__title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.12;
  margin-bottom: 1.25rem;
}

.method__sub {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 4rem;
}

/* Timeline */
.method__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: relative;
}

/* Línea horizontal que conecta los círculos */
.method__steps::before {
  content: '';
  position: absolute;
  top: 26px; /* mitad del círculo (52px / 2) */
  left: calc(12.5%);
  right: calc(12.5%);
  height: 2px;
  background: var(--color-primary);
  z-index: 0;
}

.mstep {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.mstep__circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mstep__circle svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mstep__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
}

.mstep__text {
  font-size: 0.78rem;
  color: #666;
  line-height: 1.65;
  max-width: 200px;
}

@media (max-width: 768px) {
  .method__steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
  .method__steps::before { display: none; }
}
@media (max-width: 480px) {
  .method__steps { grid-template-columns: 1fr; }
}

/* ---- NORMATIVAS ---- */
.norms {
  background: #f5f4ef;
  padding: 5rem 16rem 6rem;
}

.norms__label {
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #444;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.5rem;
}

.norms__title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  max-width: 700px;
}

.norms__sub {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 3.5rem;
}

.norms__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.ncard {
  background: #fff;
  border-radius: 1.1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ncard:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ncard__icon {
  color: var(--color-primary);
  width: 28px;
  height: 28px;
  margin-bottom: 0.25rem;
}

.ncard__icon svg { width: 100%; height: 100%; }

.ncard__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a1a;
}

.ncard__text {
  font-size: 0.78rem;
  color: #777;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .norms__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .norms__grid { grid-template-columns: 1fr; }
}

/* ---- CTA FINAL ---- */
.sector-cta {
  background: var(--color-primary-dark);
  padding: 5rem 16rem;
  text-align: center;
}

.sector-cta__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}

.sector-cta__sub {
  font-size: 0.975rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  max-width: 440px;
  margin: 0 auto 2.5rem;
}

.sector-cta__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  border: 2px solid transparent;
}
.cta-btn:hover  { transform: translateY(-2px); }
.cta-btn:active { transform: translateY(0); }

.cta-btn--white {
  background: #fff;
  color: #1a1a1a;
  border-color: #fff;
}
.cta-btn--white:hover { background: #f0f0f0; }

.cta-btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.cta-btn--outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.cta-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---- RESPONSIVE GLOBAL ---- */
@media (max-width: 1400px) {
  .diff, .products, .method, .norms, .sector-cta { padding-left: 8rem; padding-right: 8rem; }
}
@media (max-width: 1100px) {
  .diff, .products, .method, .norms, .sector-cta { padding-left: 4rem; padding-right: 4rem; }
  .diff__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .diff, .products, .method, .norms, .sector-cta { padding-left: 2rem; padding-right: 2rem; }
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .method__steps { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
  .method__steps::before { display: none; }
  .norms__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .diff, .products, .method, .norms, .sector-cta { padding-left: 1.25rem; padding-right: 1.25rem; }
  .diff__grid { grid-template-columns: 1fr; }
  .products__grid { grid-template-columns: 1fr; }
  .method__steps { grid-template-columns: 1fr; }
  .norms__grid { grid-template-columns: 1fr; }
}
