/* CSS propio de la página «Control de Gestión» (grupo 3) */
/* ═══════════════════════════════════
   HERO
═══════════════════════════════════ */
.page-hero-cdg {
  position: relative; z-index: 1;
  padding: 12rem 6% 7rem; text-align: center; overflow: hidden;
  background-image: url('../theme/img/photo-1460925895917-afdab827c52f-1920.jpg');
  background-size: cover; background-position: center 30%;
  background-attachment: fixed;
}
.page-hero-cdg::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70vw 50vh at 50% 0%, rgba(240,117,32,.22) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(13,12,10,.88) 0%, rgba(13,12,10,.55) 55%, rgba(13,12,10,.92) 100%);
}
.page-hero-cdg > * { position: relative; z-index: 1; }
.page-hero-cdg h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 900; line-height: 1.04; letter-spacing: -.03em;
}
.cdg-hero-line {
  width: 60px; height: 3px; margin: 2rem auto;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  border-radius: 2px;
}
.page-hero-cdg .hero-sub { max-width: 560px; margin: 0 auto; }

/* ═══════════════════════════════════
   3 BLOQUES PRINCIPALES
═══════════════════════════════════ */
.cdg-blocks {
  position: relative; z-index: 1;
  background-color: var(--dark2);
  background-image:
    linear-gradient(rgba(20,19,16,.96), rgba(20,19,16,.95)),
    url('../theme/img/photo-1497366216548-37526070297c-1920.jpg');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.cdg-blocks::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand1), transparent);
}
/* Glow de fondo decorativo */
.cdg-blocks::after {
  content: '';
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 300px;
  background: radial-gradient(ellipse, rgba(240,117,32,.07) 0%, transparent 70%);
  pointer-events: none;
}
.cdg-blocks-inner {
  position: relative; z-index: 1;
  max-width: 100%; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.cdg-col-divider {
  border-right: 1px solid rgba(240,117,32,.15);
}
.cdg-col-divider:last-child { border-right: none; }

.cdg-card {
  padding: 5rem 3.5rem 4rem;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 1.5rem;
  transition: background .3s;
}
.cdg-card:hover { background: rgba(240,117,32,.04); }

/* Icono en círculo con borde naranja */
.cdg-card-icon {
  width: 80px; height: 80px; border-radius: 50%;
  border: 1.5px solid rgba(240,117,32,.5);
  background: linear-gradient(145deg, rgba(240,117,32,.12), rgba(224,92,0,.06));
  box-shadow: 0 0 0 10px rgba(240,117,32,.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; flex-shrink: 0;
  transition: box-shadow .3s, border-color .3s;
}
.cdg-card:hover .cdg-card-icon {
  border-color: rgba(240,117,32,.8);
  box-shadow: 0 0 0 12px rgba(240,117,32,.08), 0 0 30px rgba(240,117,32,.2);
}

.cdg-card h3 {
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--text); line-height: 1.6;
}
.cdg-card p {
  font-size: .9rem; color: var(--muted);
  line-height: 1.85; flex: 1;
}
.cdg-card .btn-card {
  display: block; width: 100%; margin-top: .8rem;
  padding: .9rem 1.2rem;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #fff; border-radius: 40px;
  font-size: .82rem; font-weight: 700;
  text-decoration: none; text-align: center;
  transition: box-shadow .25s, transform .25s;
  box-shadow: 0 4px 20px rgba(240,117,32,.35);
}
.cdg-card .btn-card:hover { box-shadow: 0 10px 32px rgba(240,117,32,.55); transform: translateY(-2px); }

/* ═══════════════════════════════════
   BLOQUES DETALLE
═══════════════════════════════════ */
.cdg-detail { position: relative; z-index: 1; padding: 7rem 6%; }
.cdg-detail::before {
  content: '';
  position: absolute; left: 6%; top: 0; width: 40px; height: 3px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
}
.cdg-detail.alt { background: var(--dark2); }
.cdg-detail.alt::before { left: auto; right: 6%; }

.cdg-detail-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6rem; align-items: center;
}
.cdg-detail-inner.reverse { direction: rtl; }
.cdg-detail-inner.reverse > * { direction: ltr; }

.cdg-detail-text .step-label {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand1);
  margin-bottom: 1.2rem;
}
.cdg-detail-text .step-label::before {
  content: '';
  width: 24px; height: 2px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  border-radius: 1px;
}
.cdg-detail-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 900; line-height: 1.12; margin-bottom: 1.4rem;
}
.cdg-detail-text p { font-size: .95rem; color: var(--muted); line-height: 1.85; margin-bottom: .9rem; }

.cdg-list { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.8rem; }
.cdg-list-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .85rem 1.2rem;
  background: rgba(255,255,255,.03); border: 1px solid rgba(240,117,32,.12);
  border-radius: 10px;
  transition: border-color .25s, background .25s;
}
.cdg-list-item:hover { border-color: rgba(240,117,32,.3); background: rgba(240,117,32,.04); }
.cdg-list-item .chk {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: #fff;
}
.cdg-list-item span { font-size: .88rem; color: var(--text); line-height: 1.55; padding-top: 3px; }

/* Tarjeta visual */
.cdg-visual {
  position: relative;
  background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(240,117,32,.06));
  border: 1px solid rgba(240,117,32,.2);
  border-radius: 28px; padding: 3.5rem 3rem;
  backdrop-filter: blur(16px);
  display: flex; flex-direction: column; gap: 1.8rem;
  overflow: hidden;
}
.cdg-visual::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(240,117,32,.2) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.cdg-visual::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  border-radius: 0 0 28px 28px;
}
.cdg-visual-num {
  font-size: 6rem; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--brand1) 0%, rgba(240,117,32,.25) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  font-family: Georgia, serif; letter-spacing: -.04em;
}
.cdg-visual h3 {
  font-size: 1.15rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text);
}
.cdg-visual p { font-size: .9rem; color: var(--muted); line-height: 1.8; }

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 1000px) {
  .cdg-blocks-inner { grid-template-columns: 1fr; }
  .cdg-col-divider { border-right: none; border-bottom: 1px solid rgba(240,117,32,.15); }
  .cdg-col-divider:last-child { border-bottom: none; }
  .cdg-detail-inner, .cdg-detail-inner.reverse { grid-template-columns: 1fr; direction: ltr; gap: 3rem; }
}
