/* Encabezado común de los micrositios de Teincop (sitio institucional, Ayuda económica y Proveeduría)
   y ventana de ingreso de asociados.
   Un solo nivel: encabezado blanco, texto verde y dorado solo para el sitio actual y el botón Asociate.
   El logo (SVG oficial, 40 px de alto) y la tipografía del menú (Manrope, tamaños fijos) son los mismos en todos
   los micrositios: este archivo no usa las variables ni las fuentes de cada sitio.
   Lo copia scripts/generar_web.py. Todas las clases llevan el prefijo tc-. */

.tc-header { position: sticky; top: 0; z-index: 70; background: #FFFFFF; border-bottom: 1px solid #DCE6E3; }
.tc-enc { position: relative; display: flex; align-items: center; gap: 10px; max-width: 1200px; height: 72px; margin: 0 auto; padding: 0 20px; font-family: 'Manrope', Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.3; color: #1A4B5C; -webkit-font-smoothing: antialiased; }
.tc-enc *, .tc-enc *::before, .tc-enc *::after, .tc-modal * { box-sizing: border-box; }
.tc-enc ul { margin: 0; padding: 0; list-style: none; }
.tc-logo { display: flex; align-items: center; flex: none; margin-right: auto; }
.tc-logo img { display: block; width: auto; height: 44px; max-width: none; }

/* Botones */
.tc-acciones { display: flex; align-items: center; gap: 8px; }
/* Hasta saber si hay sesión, los botones de cuenta no se muestran (evita el salto de "Ingresar" a "Hola") */
.tc-enc:not(.tc-listo) .tc-acciones { visibility: hidden; }
.tc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 42px; padding: 0 18px; border: 0; border-radius: 999px; font-family: 'Manrope', Arial, Helvetica, sans-serif; font-size: 14.5px; font-weight: 800; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.tc-btn svg { width: 17px; height: 17px; flex: none; }
.tc-btn-borde { background: #FFFFFF; color: #1A4B5C; box-shadow: inset 0 0 0 1.5px #C9D6D3; }
.tc-btn-borde:hover { box-shadow: inset 0 0 0 1.5px #1A4B5C; }
.tc-btn-dorado { background: #7DB54C; color: #1A4B5C; }
.tc-btn-dorado:hover { background: #8CC25A; }
.tc-btn-verde { background: #1A4B5C; color: #FFFFFF; }
.tc-btn-verde:hover { background: #22607A; }
.tc-solo-escritorio { display: none; }
.tc-ingresar span { display: none; }
.tc-ingresar[hidden] { display: none; }

/* Asociado con sesión iniciada */
.tc-usuario { display: flex; align-items: center; gap: 6px; }
.tc-usuario[hidden] { display: none; }
.tc-hola { display: none; font-weight: 700; color: #1A4B5C; white-space: nowrap; }
.tc-avatar { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #1A4B5C; color: #7DB54C; font-weight: 800; font-size: 15px; }
/* Carrito con contador */
.tc-carrito { position: relative; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: #1A4B5C; text-decoration: none; }
.tc-carrito:hover { background: #F3F7F5; }
.tc-carrito svg { width: 23px; height: 23px; }
.tc-contador { position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #7DB54C; color: #1A4B5C; font-size: 11px; font-weight: 800; line-height: 19px; text-align: center; }
.tc-contador[hidden] { display: none; }
/* Menú de la cuenta del asociado */
.tc-cuenta { position: relative; }
.tc-cuenta-btn { display: flex; align-items: center; gap: 8px; height: 42px; padding: 2px; border: 0; border-radius: 999px; background: none; font-family: inherit; font-size: 14.5px; cursor: pointer; }
.tc-cuenta-btn:hover { background: #F3F7F5; }
.tc-cuenta-btn .tc-flecha { display: none; margin: 0 8px 4px 0; color: #1A4B5C; }
.tc-cuenta-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 90; width: 230px; padding: 8px; border: 1px solid #DCE6E3; border-radius: 16px; background: #FFFFFF; box-shadow: 0 20px 44px rgba(26, 75, 92, .16); }
.tc-cuenta-menu[hidden] { display: none; }
.tc-cuenta-nombre { margin: 4px 10px 8px; padding-bottom: 8px; border-bottom: 1px solid #EAF1EE; font-size: 13px; font-weight: 700; color: #5A6D74; }
.tc-cuenta-menu a, .tc-cuenta-menu .tc-salir { display: block; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: none; font-family: inherit; font-size: 14.5px; font-weight: 700; color: #1A4B5C; text-align: left; text-decoration: none; cursor: pointer; }
.tc-cuenta-menu a:hover, .tc-cuenta-menu .tc-salir:hover { background: #F3F7F5; }
.tc-cuenta-menu a[hidden] { display: none; }
.tc-cuenta-menu .tc-cuenta-admin { margin-top: 4px; border-top: 1px solid #EAF1EE; border-radius: 0 0 10px 10px; }
.tc-cuenta-menu .tc-salir { margin-top: 4px; border-top: 1px solid #EAF1EE; border-radius: 0 0 10px 10px; color: #4A8529; }

/* Hamburguesa (celular) */
.tc-hamburguesa { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: #F3F7F5; cursor: pointer; }
.tc-hamburguesa span, .tc-hamburguesa span::before, .tc-hamburguesa span::after { content: ""; position: relative; display: block; width: 18px; height: 2px; border-radius: 2px; background: #1A4B5C; transition: transform .2s, background-color .2s; }
.tc-hamburguesa span::before { position: absolute; top: -6px; }
.tc-hamburguesa span::after { position: absolute; top: 6px; }
.tc-hamburguesa[aria-expanded="true"] span { background: transparent; }
.tc-hamburguesa[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.tc-hamburguesa[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Menú: en el celular, panel debajo del encabezado con acordeones */
.tc-menu { display: none; }
.tc-enc.tc-abierto .tc-menu { display: block; position: absolute; top: 72px; left: 0; right: 0; max-height: calc(100vh - 72px); overflow: auto; padding: 4px 20px 24px; background: #FFFFFF; border-top: 1px solid #DCE6E3; box-shadow: 0 24px 40px rgba(26, 75, 92, .12); }
.tc-item > a, .tc-item-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px 0; border: 0; border-bottom: 1px solid #EAF1EE; background: none; font-family: 'Manrope', Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 700; color: #1A4B5C; text-align: left; text-decoration: none; cursor: pointer; }
.tc-actual > a, .tc-actual > .tc-item-btn { color: #4A8529; }
.tc-flecha { display: inline-block; flex: none; width: 8px; height: 8px; margin: 0 4px 4px 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.tc-sub-abierto .tc-flecha { margin-bottom: -2px; transform: rotate(-135deg); }
.tc-sub { display: none; padding: 6px 0 12px; }
.tc-sub-abierto > .tc-sub { display: block; }
.tc-sub a { display: block; padding: 9px 12px; border-radius: 12px; color: #1A4B5C; text-decoration: none; }
.tc-sub a:hover { background: #F3F7F5; }
.tc-sub b { display: block; font-size: 15px; font-weight: 700; }
.tc-sub small { display: block; margin-top: 1px; font-size: 13px; font-weight: 500; color: #5A6D74; }
.tc-sub h4 { margin: 10px 12px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #4A8529; }
.tc-sub-col a { padding: 7px 12px; font-weight: 600; }
.tc-sub a.tc-sub-inicio { margin-top: 4px; font-size: 14px; font-weight: 800; color: #4A8529; }
.tc-menu-pie { padding-top: 18px; }
.tc-menu-pie .tc-btn { width: 100%; height: 48px; font-size: 15px; }

@media (min-width: 420px) {
  .tc-ingresar span { display: inline; }
}

@media (min-width: 1060px) {
  .tc-enc { gap: 14px; padding: 0 32px; }
  .tc-logo { margin-right: 16px; }
  .tc-hamburguesa, .tc-menu-pie { display: none; }
  .tc-solo-escritorio { display: inline-flex; }
  .tc-con-sesion .tc-acciones > .tc-btn-dorado { display: none; }  /* con sesión ya es asociado */
  .tc-item > a, .tc-item-btn { white-space: nowrap; }
  .tc-menu, .tc-enc.tc-abierto .tc-menu { display: flex; position: static; flex: 1; max-height: none; overflow: visible; padding: 0; border: 0; box-shadow: none; background: none; }
  .tc-items { display: flex; align-items: stretch; gap: 2px; height: 72px; }
  .tc-item { position: relative; display: flex; }
  .tc-item > a, .tc-item-btn { width: auto; height: 72px; padding: 0 12px; border: 0; font-size: 15px; }
  .tc-item > a:hover, .tc-item-btn:hover { color: #4A8529; }
  /* Sitio actual: línea dorada abajo, sin cambiar el color del texto */
  .tc-actual > a, .tc-actual > .tc-item-btn { color: #1A4B5C; box-shadow: inset 0 -3px 0 #7DB54C; }
  .tc-flecha { margin-left: 8px; }
  .tc-sub { position: absolute; top: calc(100% - 8px); left: -6px; z-index: 80; width: 330px; padding: 10px; border: 1px solid #DCE6E3; border-radius: 18px; background: #FFFFFF; box-shadow: 0 24px 50px rgba(26, 75, 92, .14); }
  .tc-sub b { font-size: 14.5px; }
  .tc-sub small { font-size: 12.5px; }
  .tc-sub a.tc-sub-inicio { margin-top: 6px; padding-top: 12px; border-top: 1px solid #EAF1EE; border-radius: 0 0 12px 12px; }
  /* Servicios: desplegable ancho con una columna por categoría */
  .tc-sub-ancho { width: 820px; }
  .tc-sub-ancho .tc-columnas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 8px; }
}
@media (min-width: 1240px) {
  .tc-hola { display: inline; }
  .tc-cuenta-btn .tc-flecha { display: inline-block; }
}
@media (min-width: 1060px) and (hover: hover) {
  .tc-con-sub:hover > .tc-sub { display: block; }
  .tc-con-sub:hover .tc-flecha { margin-bottom: -2px; transform: rotate(-135deg); }
}

/* ---------- Ventana de ingreso de asociados ---------- */
.tc-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; background: rgba(18, 52, 63, .55); font-family: 'Manrope', Arial, Helvetica, sans-serif; color: #1F3A45; }
.tc-modal[hidden] { display: none; }
.tc-modal-caja { position: relative; width: 100%; max-height: 92vh; overflow: auto; padding: 28px 22px 26px; border-radius: 24px 24px 0 0; background: #FFFFFF; }
.tc-modal-cerrar { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #F3F7F5; color: #1A4B5C; font-size: 22px; line-height: 1; cursor: pointer; }
.tc-modal-caja img { height: 40px; width: auto; margin-bottom: 16px; }
.tc-modal-caja h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; color: #1A4B5C; letter-spacing: -.4px; }
.tc-modal-caja p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.5; color: #5A6D74; }
.tc-campo { display: grid; gap: 6px; margin-bottom: 14px; }
.tc-campo label { font-size: 14px; font-weight: 700; color: #1A4B5C; }
.tc-campo input { width: 100%; height: 52px; padding: 0 16px; border: 2px solid #DCE6E3; border-radius: 14px; background: #FFFFFF; font-family: inherit; font-size: 16px; color: #1F3A45; }
.tc-campo input:focus { border-color: #1A4B5C; outline: none; }
.tc-error { min-height: 20px; margin: -4px 0 10px; font-size: 13.5px; font-weight: 600; color: #B3261E; }
.tc-modal-caja .tc-btn { width: 100%; height: 52px; font-size: 15.5px; }
.tc-modal-pie { margin-top: 16px; font-size: 13.5px; color: #5A6D74; text-align: center; }
.tc-modal-pie a { color: #1A4B5C; font-weight: 700; }
.tc-modal-caja .tc-ok { padding: 14px 16px; border-radius: 14px; background: #EEF6E7; color: #2F5A18; font-weight: 600; }
.tc-vista[hidden], .tc-modal-caja form[hidden], .tc-modal-caja .tc-ok[hidden] { display: none; }
@media (min-width: 640px) {
  .tc-modal { align-items: center; padding: 24px; }
  .tc-modal-caja { max-width: 420px; border-radius: 24px; padding: 34px 32px 28px; }
}
