/*
 * ALTRANS PERÚ - Normativa pública
 * Se evita !important sobre alineaciones y fondos de las celdas
 * para respetar estilos configurados por el administrador.
 */

:root{
  --norm-primary:#172554;
  --norm-primary-soft:#1e3a8a;
  --norm-accent:#f59e0b;
  --norm-accent-soft:#fff7ed;
  --norm-border:#e5e7eb;
  --norm-muted:#64748b;
  --norm-bg:#f8fafc;
  --norm-white:#ffffff;
  --norm-success:#10b981;
}

.norm-public-page{
  min-height:100vh;
}

.norm-public-shell{
  max-width:1500px;
  margin:0 auto;
}

.norm-public-topbar{
  /*background:linear-gradient(135deg,#111827 0%,#172554 55%,#1e3a8a 100%);*/
  background:linear-gradient(135deg,#000 0%,#111 55%,#000 100%);
  color:#fff;
  box-shadow:0 8px 30px rgba(15,23,42,.18);
}

.norm-public-brand{
  display:flex;
  align-items:center;
  gap:12px;
  color:#fff;
  text-decoration:none;
}

.norm-public-brand img{
  max-height:42px;
  max-width:180px;
  object-fit:contain;
}

.norm-breadcrumb{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:center;
  font-size:13px;
  color:#94a3b8;
  margin-bottom:13px;
}

.norm-breadcrumb a{
  color:#64748b;
  text-decoration:none;
}

.norm-breadcrumb a:hover{
  color:var(--norm-accent);
}

.norm-hero{
  position:relative;
  overflow:hidden;
  border:0;
  border-radius:24px;
  background:
    radial-gradient(circle at 85% 15%,rgba(245,158,11,.22),transparent 28%),
    linear-gradient(135deg,#000 0%,#333 58%,#111 135%);
  box-shadow:0 20px 50px rgba(15,23,42,.15);
  color:#fff;
}

.norm-hero::after{
  content:"";
  position:absolute;
  width:320px;
  height:320px;
  border-radius:50%;
  right:-145px;
  bottom:-185px;
  border:52px solid rgba(255,255,255,.055);
}

.norm-hero-content{
  position:relative;
  z-index:2;
}

.norm-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.16);
  color:#fde68a;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.norm-hero h1{
  color:#fff;
  font-size:clamp(27px,3.2vw,46px);
  line-height:1.12;
  margin:16px 0 10px;
}

.norm-hero-description{
  max-width:820px;
  color:rgba(255,255,255,.78);
  font-size:15px;
  line-height:1.8;
}

.norm-hero-stat{
  height:100%;
  border-radius:18px;
  padding:18px;
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.13);
  backdrop-filter:blur(8px);
}

.norm-hero-stat .number{
  font-size:28px;
  font-weight:800;
  color:#fff;
}

.norm-hero-stat .label{
  color:rgba(255,255,255,.66);
  font-size:12px;
}

.norm-main-card{
  border:0;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 12px 38px rgba(15,23,42,.08);
}

.norm-tab-head{
  padding:24px 24px 0;
  background:#fff;
  border-bottom:1px solid var(--norm-border);
}

.norm-tabs-scroll{
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  padding-bottom:0;
}

.norm-tabs-scroll::-webkit-scrollbar{
  height:5px;
}

.norm-tabs-scroll::-webkit-scrollbar-thumb{
  background:#cbd5e1;
  border-radius:10px;
}

.norm-tabs{
  display:flex;
  flex-wrap:nowrap;
  min-width:max-content;
  gap:7px;
  border:0;
  margin:0;
  padding:0 0 1px;
}

.norm-tabs .nav-item{
  margin:0;
}

.norm-tabs .nav-link{
  min-width:122px;
  min-height:94px;
  border:1px solid transparent;
  border-radius:17px 17px 0 0;
  color:#64748b;
  background:transparent;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 15px;
  transition:all .2s ease;
  position:relative;
  font-size:12px;
  font-weight:700;
  white-space:normal;
}

.norm-tabs .nav-link i{
  font-size:30px;
  color:#5C697B;
  transition:transform .2s ease,color .2s ease;
}

.norm-tabs .nav-link:hover{
  background:#f8fafc;
  color:#0f172a;
}

.norm-tabs .nav-link:hover i{
  transform:translateY(-2px);
}

.norm-tabs .nav-link.active{
  color:#0f172a;
  background:#fff;
  border-color:var(--norm-border) var(--norm-border) #fff;
  box-shadow:0 -9px 25px rgba(15,23,42,.055);
}

.norm-tabs .nav-link.active i{
  color:var(--norm-accent);
}

.norm-tabs .nav-link.active::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:-2px;
  height:4px;
  border-radius:10px 10px 0 0;
  background:linear-gradient(90deg,#f59e0b,#fbbf24);
}

.norm-content{
  padding:28px;
  background:#fff;
}

.norm-panel-header{
  padding-bottom:20px;
  border-bottom:1px solid #edf2f7;
  margin-bottom:23px;
}

.norm-panel-title{
  color:#0f172a;
  font-size:clamp(21px,2.2vw,31px);
  font-weight:800;
  margin:0 0 7px;
}

.norm-panel-subtitle{
  color:#475569;
  margin:0;
  font-size:14px;
}

.norm-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

.norm-meta-item{
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:999px;
  padding:7px 11px;
  color:#475569;
  font-size:11px;
}

.norm-meta-item i{
  color:var(--norm-accent);
}

.norm-meta-item a{
  color:#5C697B;
  text-decoration:none;
  font-weight:700;
}

.norm-rich-text{
  color:#334155;
  font-size:14px;
  line-height:1.82;
}

.norm-rich-text:empty{
  display:none;
}

.norm-rich-text h1,
.norm-rich-text h2,
.norm-rich-text h3,
.norm-rich-text h4,
.norm-rich-text h5,
.norm-rich-text h6{
  color:#0f172a;
  font-weight:800;
  margin-top:1.25em;
}

.norm-rich-text a{
  color:#5C697B;
}

.norm-rich-text img{
  max-width:100%;
  height:auto;
}

.norm-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  margin:22px 0 14px;
}

.norm-search{
  position:relative;
  flex:1 1 320px;
  max-width:520px;
}

.norm-search i{
  position:absolute;
  top:50%;
  left:15px;
  transform:translateY(-50%);
  color:#94a3b8;
  z-index:2;
}

.norm-search input{
  width:100%;
  min-height:44px;
  border:1px solid #dbe3ec;
  border-radius:13px;
  padding:10px 15px 10px 42px;
  background:#fff;
  color:#0f172a;
  outline:none;
  transition:border-color .2s ease,box-shadow .2s ease;
}

.norm-search input:focus{
  border-color:#f59e0b;
  box-shadow:0 0 0 4px rgba(245,158,11,.12);
}

.norm-row-count{
  color:#64748b;
  font-size:12px;
  white-space:nowrap;
}

.norm-table-card{
  border:1px solid transparent;
  border-radius:0px;
  overflow:hidden;
  background:#fff;
}

.norm-table-wrap{
  width:100%;
  overflow:auto;
  max-height:none;
}

.norm-table-wrap table{
  width:100%;
  min-width:940px;
  margin:0;
  border-collapse:collapse;
  background:#fff;
}

.norm-table-wrap th,
.norm-table-wrap td{
  border:1px solid #dbe3ec;
  padding:12px 11px;
  vertical-align:middle;
  line-height:1.55;
  font-size:12.5px;
}

.norm-table-wrap thead th{
  background:linear-gradient(180deg,#FFF,#FFF);
  color:#5C697B;
  font-weight:800;
  /*border-color:rgba(255,255,255,.22);*/
  border:1px solid #dbe3ec;
}

.norm-table-wrap tbody tr:nth-child(even){
  background:#f8fafc;
}

.norm-table-wrap tbody tr{
  transition:background .16s ease;
}

.norm-table-wrap tbody tr:hover{
  background:#fff7ed;
}

.norm-table-wrap tbody tr.norm-filter-hidden{
  display:none;
}

.norm-empty-table{
  padding:32px;
  color:#64748b;
  text-align:center;
  border:1px dashed #cbd5e1;
  border-radius:16px;
  background:#f8fafc;
}

.norm-after-table{
  margin-top:24px;
  padding-top:22px;
  border-top:1px solid #edf2f7;
}

.norm-side-card{
  border:0;
  border-radius:20px;
  box-shadow:0 10px 30px rgba(15,23,42,.07);
}

.norm-side-title{
  font-size:14px;
  color:#0f172a;
  font-weight:800;
}

.norm-side-link{
  display:flex;
  gap:11px;
  align-items:center;
  padding:11px 12px;
  border-radius:12px;
  color:#475569;
  text-decoration:none;
  transition:all .18s ease;
}

.norm-side-link:hover{
  background:#fff7ed;
  color:#0f172a;
}

.norm-side-link.active{
  background:#fff7ed;
  color:#92400e;
  font-weight:700;
}

.norm-side-link .icon{
  width:34px;
  height:34px;
  border-radius:10px;
  background:#eff6ff;
  color:#5C697B;
  display:flex;
  align-items:center;
  justify-content:center;
}

.norm-side-link.active .icon{
  background:#FFFFFF;
  color:#d97706;
}

.norm-public-card{
  border:0;
  border-radius:20px;
  box-shadow:0 10px 30px rgba(15,23,42,.07);
  transition:transform .2s ease,box-shadow .2s ease;
}

.norm-public-card:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 42px rgba(15,23,42,.11);
}

.norm-public-card-icon{
  width:54px;
  height:54px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff7ed;
  color:#f59e0b;
  font-size:26px;
}

.norm-guest-action{
  display:flex;
  align-items:center;
  gap:8px;
}

@media (max-width:991.98px){
  .norm-content{
    padding:20px;
  }

  .norm-tab-head{
    padding:18px 18px 0;
  }

  .norm-tabs .nav-link{
    min-width:105px;
    min-height:86px;
  }

  .norm-hero{
    border-radius:19px;
  }
}

@media (max-width:575.98px){
  .norm-content{
    padding:16px;
  }

  .norm-tab-head{
    padding:14px 14px 0;
  }

  .norm-tabs .nav-link{
    min-width:90px;
    min-height:82px;
    padding:11px 9px;
    font-size:10.5px;
  }

  .norm-tabs .nav-link i{
    font-size:25px;
  }

  .norm-table-wrap th,
  .norm-table-wrap td{
    padding:10px 8px;
    font-size:11.5px;
  }

  .norm-toolbar{
    align-items:stretch;
  }

  .norm-search{
    max-width:none;
  }
}

@media print{
  .norm-no-print{
    display:none!important;
  }
}




/*
 * ============================================================
 * PROTECCIÃ“N VISUAL DE CONTENIDO NORMATIVO
 * Agregar al FINAL de normativa-publica.css
 * ============================================================
 */

/*
 * Impide selecciÃ³n visual del contenido publicado.
 * Inputs/buscadores se mantienen utilizables.
 */
.norm-protected-content,
.norm-protected-content *{
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}

.norm-protected-content input,
.norm-protected-content textarea,
.norm-protected-content select,
.norm-protected-content [contenteditable="true"]{
  -webkit-user-select:text;
  -moz-user-select:text;
  -ms-user-select:text;
  user-select:text;
}

/*
 * Evita el arrastre de imÃ¡genes dentro del contenido.
 */
.norm-protected-content img{
  -webkit-user-drag:none;
  user-drag:none;
  pointer-events:none;
}

/*
 * Si alguien intenta imprimir normativa.php desde el menÃº
 * del navegador, no se entrega el contenido como impresiÃ³n.
 *
 * La descarga autorizada se realiza desde normativa-imprimir.php.
 */
@media print{
  body.norm-copy-protected .norm-public-shell,
  body.norm-copy-protected .main-content,
  body.norm-copy-protected .norm-public-topbar{
    display:none !important;
  }

  body.norm-copy-protected::before{
    content:"ImpresiÃ³n directa deshabilitada. Utilice la opciÃ³n Guardar PDF de ALTRANS PERÃš.";
    display:block;
    padding:30px;
    font-family:Arial,Helvetica,sans-serif;
    font-size:14px;
    color:#111827;
    background:#fff;
  }

  @page{
    margin:0;
  }
}
