.page-header {
  background: linear-gradient(rgba(24,29,56,0.7), rgba(24,29,56,0.7)), url('../img/banner7.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;

  position: relative;
  overflow: hidden;
  padding-top: 4.25rem;
  padding-bottom: 4.25rem;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,12,32,0.12) 0%, rgba(6,12,32,0.18) 100%);
  pointer-events: none;
}

.page-title {
  position: relative;
  z-index: 2;
  font-family: 'Heebo', 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 10px 30px rgba(6,12,32,0.45);
  font-size: clamp(1.8rem, 2.4rem + 1.6vw, 3.6rem);
  margin-bottom: .5rem;
}

.page-title .text-accent {
  display: inline-block;
  padding: 0 .14rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.page-subtitle {
  position: relative;
  z-index: 2;
  max-width: 840px;
  margin: 0 auto 1rem;
  color: rgba(255,255,255,0.92);
  font-size: clamp(.98rem, .95rem + .6vw, 1.05rem);
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 6px 18px rgba(6,12,32,0.28);
}

.page-header .btn-lg {
  position: relative;
  z-index: 2;
  border-radius: 8px;
  padding: .65rem 1.15rem;
  box-shadow: 0 8px 24px rgba(11,42,102,0.12);
  font-weight: 700;
}

.btn-outline-light {
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.06);
}

.breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.28); }
.breadcrumb a { color: rgba(255,255,255,0.72); }
.breadcrumb .active { color: #fff; }

@media (max-width: 576px) {
  .page-header { padding-top: 2.25rem; padding-bottom: 2.25rem; }
  .page-subtitle { padding: 0 1rem; font-size: .95rem; }
  .page-title { font-size: 1.5rem; }
  .btn-lg { padding: .5rem .9rem; font-size: .95rem; }
}

/*----------------------------------------------------------------------------------------------*/

:root{
  --eduroam-purple: #06BBCC;
  --eduroam-accent: #06BBCC;
  --eduroam-lite: rgba(102,42,153,0.06);
  --muted: #6c757d;
  --card-bg: #ffffff;
  --glass: rgba(255,255,255,0.72);
}

#docs-sidebar .card{ border-radius: 12px; background: var(--card-bg); }
#docs-viewer-area .card{ border-radius: 12px; overflow: hidden; background: var(--card-bg); }

#docs-sidebar .accordion-button{
  background: linear-gradient(90deg, var(--eduroam-lite), rgba(75,47,166,0.02));
  color: var(--eduroam-purple);
  font-weight: 700;
  border-radius: 8px;
}
#docs-sidebar .accordion-button:not(.collapsed){
  box-shadow: 0 6px 20px rgba(75,47,166,0.08);
}
#docs-sidebar .list-group-item{
  cursor: pointer;
  padding: .55rem .9rem;
  border: 0;
  transition: background .12s ease, transform .06s ease;
  font-size: .95rem;
  color: #222;
}
#docs-sidebar .list-group-item:hover{
  background: rgba(102,42,153,0.04);
  transform: translateX(2px);
}
#docs-sidebar .list-group-item.active{
  background: linear-gradient(90deg, var(--eduroam-purple), var(--eduroam-accent));
  color: #fff;
  box-shadow: 0 8px 30px rgba(75,47,166,0.12);
}

#docs-sidebar small.meta{
  display:inline-block;
  margin-left:.5rem;
  font-weight:600;
  color:rgba(0,0,0,0.45);
  font-size:.78rem;
}

#viewer-title{ font-weight:700; font-size:1.02rem; color:#111; }
#viewer-sub{ color:var(--muted); font-size:.88rem; }
#pdf-container{ background: #fff; position:relative; }

#pdf-container iframe{
  width:100%;
  height:100%;
  min-height:420px;
  border:0;
  transition: opacity .18s ease;
  background:#f8f9fb;
}

#pdf-loading{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2));
  z-index:40;
}
#pdf-loading.d-none{ display:none; }

.empty-state{
  position:absolute;
  inset:0;
  z-index:30;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  padding:1.75rem;
  text-align:center;
  background: transparent;
}
.empty-state h5{ margin-top: .6rem; margin-bottom: .2rem; color:#222; font-weight:700; }
.empty-state p{ margin:0; font-size:.95rem; color:var(--muted); }

#doc-notfound{
  border-radius:10px;
  padding:1rem 1.25rem;
  box-shadow: 0 8px 24px rgba(11,42,102,0.06);
  background: #fff;
  max-width:520px;
}

.doc-item:focus{ outline: 3px solid rgba(102,42,153,0.12); outline-offset: 3px; }
.text-truncate{ max-width: 60vw; }

#docs-sidebar .accordion-body{
  max-height: 52vh;
  overflow:auto;
  padding-right:8px;
}
#docs-sidebar .accordion-body::-webkit-scrollbar{ width:8px }
#docs-sidebar .accordion-body::-webkit-scrollbar-thumb{ background: rgba(0,0,0,0.07); border-radius:6px }

@media (max-width: 767.98px){
  #docs-sidebar{ order:2; }
  #docs-viewer-area{ order:1; }
  #emptyState img{ max-width:140px; }
  #docs-sidebar .accordion-body{ max-height: 30vh; }
}

#docs-sidebar .card-body{ padding: 1rem; }
#docs-viewer-area .card-body{ padding: 0; }

#docs-sidebar .btn{ border-radius:8px; }

#pdf-container iframe[hidden] { display:none; }

.btn-primary{
  background: linear-gradient(180deg,var(--eduroam-accent),var(--eduroam-purple));
  border: none;
  box-shadow: 0 8px 20px rgba(102,42,153,0.12);
  font-weight:700;
}
.btn-outline-primary{
  border-color: rgba(102,42,153,0.12);
  color: var(--eduroam-purple);
}

@media (min-width: 992px){
  #viewer-title{ max-width: 50vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
}


#pdf-container {
  min-height: calc(100vh);
  height: auto;
}

#pdf-container iframe {
  min-height: calc(100vh);
  height: 100%;
}

@media (min-width: 1500px) and (max-width:2560px){
  #pdf-container { min-height: calc(100vh - 385px); }
  #pdf-container iframe { min-height: calc(100vh - 385px); }
}

@media (min-width:996px) and (max-width:1500px) {
#pdf-container { min-height: calc(100vh - 150px); }
#pdf-container iframe { min-height: calc(100vh - 150px); }
}

@media (min-width: 350px) and (max-width:996px){
  #pdf-container { min-height: 45vh; }
  #pdf-container iframe { min-height: 45vh; }
  #viewer-title {display: none !important;}
  #viewer-sub {font-size: 10px;}
}
