/* ===== Contenedor general de la plantilla (solo afecta al contenido) ===== */
.hc-page {
  flex: 1000 0 auto;
  width: 100%;
  padding-top: 30px;
  background-color: #fff;
  font-family: 'Poppins', sans-serif;
  color: #333;
  box-sizing: border-box;
}

.hc-page *,
.hc-page *::before,
.hc-page *::after {
  box-sizing: border-box;
}

/* ===== Hero ===== */
.hc-page .hc-hero {
  position: relative;
  width: 100%;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 20px;
  background-image: url('https://www.huichapan.gob.mx/images/fondo1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
}

.hc-page .hc-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hc-page .hc-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hc-page .hc-hero-titulo {
  display: inline-block;
  margin: 0 0 14px 0;
  padding-bottom: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 45px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  position: relative;
}

.hc-page .hc-hero-titulo::after {
  content: '';
  display: block;
  width: 100%;
  height: 6px;
  margin-top: 4px;
  border-radius: 4px;
  background-color: #BFA184;
}

.hc-page .hc-hero-texto {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Variables y reinicio exclusivos de esta plantilla (especificidad 0, no afectan menú ni footer) ===== */
.hc-page {
  --primary:  #77172f;
  --gold:     #BFA184;
  --dark:     #1a1a1a;
  --mid:      #444444;
  --grey:     #f2f2f2;
  --muted:    #888888;
  --light:    #f7f7f7;
  --white:    #ffffff;
  --border:   rgba(0,0,0,0.08);
  --radius:   14px;
  --shadow:   0 4px 24px rgba(0,0,0,0.07);
  --shadow-h: 0 12px 36px rgba(0,0,0,0.12);
}

:where(.hc-page) *,
:where(.hc-page) *::before,
:where(.hc-page) *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

:where(.hc-page) :is(h1, h2, h3, h4, h5, h6),
:where(.hc-page) input,
:where(.hc-page) button {
  font-family: 'Poppins', sans-serif;
}

/* ===== Hero: texto sup y botones ===== */
.hc-page .trn-hero-sup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 14px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #BFA184;
}

.hc-page .trn-hero-sup::before,
.hc-page .trn-hero-sup::after {
  content: '';
  width: 40px;
  height: 1px;
  background: #BFA184;
  opacity: 0.9;
}

.hc-page .trn-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.hc-page .trn-btn {
  display: inline-block;
  padding: 11px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background-color: #77172F;
  border: 2px solid #77172F;
  border-radius: 10px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.25s ease;
}

.hc-page .trn-btn:hover {
  background-color: #BFA184;
  border-color: #BFA184;
  color: #fff;
  transform: translateY(-2px);
}

.hc-page .trn-btn.trn-btn-alt {
  color: #fff;
  background-color: #BFA184;
  border-color: #BFA184;
}

.hc-page .trn-btn.trn-btn-alt:hover {
  background-color: #77172F;
  border-color: #77172F;
  color: #fff;
}

/* ══════════════════════════════════════════════════
       DIVISOR
    ══════════════════════════════════════════════════ */
    .trn-divider {
      height: 4px;
      background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 50%, var(--primary) 100%);
      opacity: 0.15;
    }

    /* ===== Secciones (márgenes laterales del 8%) ===== */
.trn-section {
  padding: 28px 8% 32px;
  background: #fff;
  scroll-margin-top: 80px;
}

.trn-section-alt {
  padding: 28px 8% 32px;
  background: #fff;
  scroll-margin-top: 80px;
}

.trn-sup {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #555;
}

/* Título (estilo del título de Emergencias) */
.trn-title {
  display: inline-block;
  margin-bottom: 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
}

.trn-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 5px;
  margin-top: 4px;
  border-radius: 4px;
  background-color: #BFA184;
}

.trn-title span {
  color: inherit;
}

.trn-subtitle {
  max-width: 640px;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}

/* Subtítulo con línea vertical izquierda (Fracción I, II, ...) */
.trn-subtitulo-wrap {
  grid-column: 1/-1;
  margin: 10px 0 4px;
}

.trn-subtitulo {
  padding-left: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1a1a1a;
  border-left: 4px solid #BFA184;
}

/* ===== Buscador ===== */
.trn-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  margin-bottom: 36px;
  padding: 0 18px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 12px;
  transition: border-color .3s, box-shadow .3s;
}

.trn-search-wrap:focus-within {
  border-color: #77172F;
  box-shadow: 0 0 0 3px rgba(119, 23, 47, 0.15);
}

.trn-search-icon {
  flex-shrink: 0;
  color: #777;
  transition: color .3s;
}

.trn-search-wrap:focus-within .trn-search-icon {
  color: #77172F;
}

.trn-search-input {
  width: 100%;
  padding: 12px 0;
  font-size: 14px;
  color: #1a1a1a;
  background: transparent;
  border: none;
  outline: none;
}

.trn-search-input::placeholder {
  color: #777;
}

/* ══════════════════════════════════════════════════
       GRID DE FRACCIONES (Art. 69 y 70) — 6 por fila
    ══════════════════════════════════════════════════ */
    .trn-grid {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 14px;
    }

    /* Tarjeta vertical: número → ícono → título */
    .trn-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 10px;
      background: #f5f2f2;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px 14px 18px;
      text-decoration: none;
      color: inherit;
      transition: transform .3s cubic-bezier(.4,0,.2,1),
                  box-shadow .3s cubic-bezier(.4,0,.2,1),
                  border-color .3s;
      position: relative;
      overflow: hidden;
    }
    .trn-card::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--primary), var(--gold));
      transform: scaleX(0);
      transform-origin: left;
      transition: transform .35s cubic-bezier(.4,0,.2,1);
    }
    .trn-card:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-h);
      border-color: rgba(119,23,47,.15);
    }
    .trn-card:hover::before { transform: scaleX(1); }
    .trn-card.trn-hidden { display: none; }

    /* Número romano */
    .trn-card-num {
      font-family: 'Poppins', sans-serif;
      font-size: 15px;
      font-weight: 900;
      color: var(--primary);
      background: rgba(119,23,47,.07);
      border-radius: 4px;
      padding: 3px 8px;
      letter-spacing: 0.06em;
      text-align: center;
      line-height: 1.5;
      align-self: center;
    }

    /* Ícono PNG */
    .trn-card-icon {
      width: 80px;
      height: 80px;
      object-fit: contain;
      flex-shrink: 0;
      transition: transform .3s ease, opacity .3s ease;
      opacity: 0.88;
    }
    .trn-card:hover .trn-card-icon {
      transform: scale(1.1);
      opacity: 1;
    }

    /* Título */
    .trn-card-body { width: 100%; }
    .trn-card-name {
      font-family: 'Poppins', sans-serif;
      font-size: 15px;
      font-weight: 500;
      color: var(--dark);
      line-height: 1.4;
      transition: color .2s;
    }
    .trn-card:hover .trn-card-name { color: var(--primary); }

    /* Flecha — oculta en layout vertical */
    .trn-card-arrow { display: none; }

    /* Mensaje sin resultados */
    .trn-no-results {
      display: none;
      text-align: center;
      padding: 48px 20px;
      color: var(--muted);
      font-size: 15px;
      grid-column: 1/-1;
    }
    .trn-no-results strong {
      display: block;
      font-family: 'Montserrat', sans-serif;
      font-size: 20px;
      color: var(--dark);
      margin-bottom: 6px;
    }

    /* ══════════════════════════════════════════════════
       SECCIÓN ACCESO A INFORMACIÓN (formulario)
    ══════════════════════════════════════════════════ */
    .trn-access-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 48px;
      align-items: start;
    }
    .trn-access-info { }
    .trn-access-info p {
      font-size: 15px;
      color: var(--mid);
      line-height: 1.8;
      margin-bottom: 20px;
    }
    .trn-access-info strong { color: var(--dark); }

    .trn-contact-items {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-top: 8px;
    }
    .trn-contact-item {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .trn-contact-ico {
      width: 36px; height: 36px;
      border-radius: 8px;
      background: rgba(119,23,47,.07);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      color: var(--primary);
    }
    .trn-contact-data { line-height: 1.3; }
    .trn-contact-lbl {
      font-size: 11px; font-weight: 600;
      letter-spacing: .04em;
      color: #555;
    }
    .trn-contact-val {
      font-size: 15px; font-weight: 500; color: var(--mid);
    }
    .trn-contact-val a { color: inherit; text-decoration: none; }
    .trn-contact-val a:hover { color: #000; }

    /* Formulario */
    .trn-form {
      background: #fff;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 32px 28px;
      box-shadow: var(--shadow);
    }
    .trn-form-title {
      font-family: 'Poppins', sans-serif;
      font-size: 16px;
      font-weight: 700;
      color: var(--dark);
      margin-bottom: 6px;
    }
    .trn-form-subtitle {
      font-size: 12px;
      color: var(--muted);
      margin-bottom: 24px;
      line-height: 1.6;
    }
    .trn-field { margin-bottom: 16px; }
    .trn-field label {
      display: block;
      font-size: 10px;
      font-weight: 600;
      letter-spacing: .12em;
     
      color: var(--muted);
      margin-bottom: 6px;
    }
    .trn-field input,
    .trn-field textarea {
      width: 100%;
      padding: 11px 14px;
      font-size: 13px;
      color: var(--dark);
      background: var(--light);
      border: 1.5px solid transparent;
      border-radius: var(--radius);
      outline: none;
      transition: border-color .3s, background .3s;
      resize: none;
    }
    .trn-field input:focus,
    .trn-field textarea:focus {
      border-color: var(--primary);
      background: #fff;
    }
    .trn-field textarea { height: 100px; }
    .trn-form-btn {
      width: 100%;
      padding: 13px;
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: var(--radius);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .15em;
     
      cursor: pointer;
      transition: background .25s, transform .2s;
      margin-top: 4px;
    }
    .trn-form-btn:hover {
      background: #5a1123;
      transform: translateY(-1px);
    }
    .trn-form-note {
      font-size: 10.5px;
      color: var(--muted);
      margin-top: 10px;
      line-height: 1.6;
      text-align: center;
    }

    /* ══════════════════════════════════════════════════
       ENLACES EXTERNOS (INAI, ITAIH, etc.)
    ══════════════════════════════════════════════════ */
    .trn-links-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 14px;
      margin-top: 8px;
    }
    .trn-ext-card {
      display: flex;
      align-items: center;
      gap: 14px;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 18px;
      text-decoration: none;
      color: inherit;
      transition: transform .3s, box-shadow .3s, border-color .3s;
    }
    .trn-ext-card:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow-h);
      border-color: rgba(0,0,0,.25);
    }
    .trn-ext-ico {
      width: 40px; height: 40px;
      border-radius: 8px;
      background: rgba(119,23,47,.07);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
      color: var(--primary);
    }
    .trn-ext-name {
      font-family: 'Poppins', sans-serif;
      font-size: 15px;
      font-weight: 700;
      color: var(--dark);
      line-height: 1.35;
      transition: color .2s;
    }
    .trn-ext-card:hover .trn-ext-name { color: #000; }
    .trn-ext-sub {
      font-size: 15px;
      color: #333;
      margin-top: 2px;
    }

    /* ══════════════════════════════════════════════════
       ORNAMENTO
    ══════════════════════════════════════════════════ */
    .trn-ornament {
      text-align: center;
      padding: 16px 0 32px;
    }
    .trn-ornament span {
      display: inline-block;
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--gold);
      margin: 0 4px; opacity: .5;
    }
    .trn-ornament span:nth-child(2) {
      opacity: 1; background: var(--primary);
      width: 8px; height: 8px; vertical-align: middle;
    }
    /* ===== Responsivo ===== */
@media (max-width: 900px) {
  .hc-page {
    padding-top: 50px;
    overflow-x: hidden;
  }

  .hc-page .hc-hero-titulo {
    font-size: 36px;
  }

  .hc-page .hc-hero-texto {
    font-size: 16px;
  }

  .trn-access-grid { grid-template-columns: 1fr; gap: 32px; }
  .trn-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .trn-section, .trn-section-alt { padding: 24px 28px 28px; }
}

@media (max-width: 600px) {
  .hc-page .hc-hero {
    min-height: 200px;
    padding: 35px 16px;
  }

  .hc-page .hc-hero-titulo {
    font-size: 30px;
  }

  .hc-page .hc-hero-texto {
    font-size: 15px;
  }

  .hc-page .trn-hero-sup {
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .trn-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .trn-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Barra: buscador general (izquierda) y botones de artículo (derecha) ===== */
.hc-page .trn-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 8% 0;
  background: #fff;
}

.hc-page .trn-barra .trn-search-wrap {
  flex: 1 1 360px;
  max-width: 520px;
  margin-bottom: 0;
}

.hc-page .trn-barra .trn-nav-buttons {
  margin-top: 0;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .hc-page .trn-barra {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 28px 0;
  }

  .hc-page .trn-barra .trn-search-wrap {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .hc-page .trn-barra .trn-nav-buttons {
    justify-content: center;
  }
}

/* ===== Artículo 69 pegado a la barra de búsqueda ===== */
#articulo69 {
  padding-top: 24px;
}

/* ===== Resultados de búsqueda: se muestran juntos, sin encabezados ===== */
.hc-page.trn-buscando .trn-sup,
.hc-page.trn-buscando .trn-title,
.hc-page.trn-buscando .trn-subtitle,
.hc-page.trn-buscando .trn-divider {
  display: none;
}

.hc-page.trn-buscando #articulo69,
.hc-page.trn-buscando #articulo70 {
  background: #fff;
  padding-top: 24px;
  padding-bottom: 0;
}

.hc-page.trn-buscando #articulo70 {
  padding-top: 14px;
}

@media (max-width: 768px) {
  #articulo69 {
    padding-top: 20px;
  }

  .hc-page.trn-buscando #articulo69,
  .hc-page.trn-buscando #articulo70 {
    padding-left: 28px;
    padding-right: 28px;
  }
}

/* ===== Título "Artículo" visible solo en resultados de búsqueda (formato de Fracción I) ===== */
.trn-resultado-titulo {
  display: none;
  margin: 10px 0 14px;
}

.hc-page.trn-buscando .trn-resultado-titulo {
  display: block;
}

/* ===== Mapa en Solicitud de Información ===== */
.trn-access-mapa {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.trn-access-mapa iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

@media (max-width: 900px) {
  .trn-access-mapa iframe {
    height: 320px;
  }
}

@media (max-width: 480px) {
  .trn-access-mapa iframe {
    height: 260px;
  }
}
