/* SIMPUS Core Entry — global foundation only. */
@import url("./variables.css");
@import url("./reset.css");
@import url("./typography.css");
@import url("./layout.css");
@import url("./utilities.css");
@import url("../components/semantic.css");
@import url("./theme.css");


/* =========================================================
   SIMPUS Public Portal — Global Presentation Enhancements
   Functional layer for navigation, hierarchy and rich content.
   ========================================================= */

:root{
  --portal-navbar-height: 76px;
  --portal-topbar-height: 34px;
  --portal-container-max: 1240px;
  --portal-section-y: clamp(3.25rem, 6vw, 5.75rem);
  --portal-radius-sm: .65rem;
  --portal-radius-md: 1rem;
  --portal-radius-lg: 1.35rem;
  --portal-shadow-soft: 0 12px 32px rgba(15, 23, 42, .08);
  --portal-shadow-hover: 0 18px 44px rgba(15, 23, 42, .14);
}

.container{
  width: min(100% - 2rem, var(--portal-container-max));
}

section,
.section{
  padding-block: var(--portal-section-y);
}

.section-sm{ padding-block: 2.25rem; }
.section-lg{ padding-block: 7rem; }

.text-balance{ text-wrap: balance; }
.readable{ max-width: 72ch; }

.card,
.library-card,
.service-card,
.resource-card,
.news-card{
  border-radius: var(--portal-radius-md);
  box-shadow: var(--portal-shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.card:hover,
.library-card:hover,
.service-card:hover,
.resource-card:hover,
.news-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--portal-shadow-hover);
}

.badge{ font-size: .72rem; line-height: 1.2; }
.btn{
  min-height: 42px;
  border-radius: .72rem;
  font-weight: 600;
  letter-spacing: .005em;
}
.btn-sm{ min-height: 36px; }
.btn-lg{ min-height: 48px; }

/* Sticky public navigation */
.portal-topbar{
  min-height: var(--portal-topbar-height);
  position: relative;
  z-index: 1040;
}

.portal-navbar,
.public-navbar,
.navbar.portal-navbar{
  min-height: var(--portal-navbar-height);
  position: sticky;
  top: 0;
  z-index: 1035;
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  transition: box-shadow .2s ease, background-color .2s ease;
}

.portal-navbar.is-scrolled,
.public-navbar.is-scrolled,
.navbar.portal-navbar.is-scrolled{
  box-shadow: 0 8px 28px rgba(15,23,42,.12);
}

.portal-navbar .navbar-brand img,
.public-navbar .navbar-brand img{
  max-height: 44px;
  width: auto;
  object-fit: contain;
}

.portal-navbar .navbar-nav,
.public-navbar .navbar-nav{
  align-items: center;
  gap: .15rem;
}

.portal-navbar .nav-link,
.public-navbar .nav-link{
  padding: .72rem .8rem;
  font-size: .9rem;
  font-weight: 600;
  border-radius: .65rem;
}

.portal-navbar .dropdown-menu,
.public-navbar .dropdown-menu{
  margin-top: .45rem;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: .9rem;
  box-shadow: 0 18px 40px rgba(15,23,42,.12);
  padding: .5rem;
}

.portal-navbar .dropdown-item,
.public-navbar .dropdown-item{
  border-radius: .55rem;
  padding: .62rem .75rem;
  font-size: .875rem;
}

/* Hero hierarchy */
.portal-hero{
  min-height: clamp(520px, 68vh, 720px);
  display:flex;
  align-items:center;
  position:relative;
  overflow:hidden;
}

.portal-hero .hero-content{
  max-width: 760px;
}

.portal-hero h1{
  font-size: clamp(2.15rem, 5vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin-bottom: 1.25rem;
}

.portal-hero .lead{
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
}

/* Search / discovery */
.portal-search{
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(15,23,42,.18);
}

.portal-search .form-control,
.portal-search .form-select{
  min-height: 50px;
}

.quick-access-grid{
  display:grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 1rem;
}

.quick-access-item{
  min-height: 132px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:.55rem;
  padding:1.15rem;
  border-radius:1rem;
  text-decoration:none;
  box-shadow:var(--portal-shadow-soft);
  transition:transform .2s ease, box-shadow .2s ease;
}
.quick-access-item:hover{
  transform:translateY(-4px);
  box-shadow:var(--portal-shadow-hover);
}

/* Rich content */
.content-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1.25rem;
}

.content-grid-4{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1.15rem;
}

.stat-card{
  border-radius:1rem;
  padding:1.35rem;
  box-shadow:var(--portal-shadow-soft);
}
.stat-card .stat-value{
  font-size:clamp(1.75rem,3vw,2.5rem);
  line-height:1;
  font-weight:800;
}

.page-header{
  padding-block:clamp(2.5rem,5vw,4.5rem);
}
.page-header h1{
  font-size:clamp(1.9rem,4vw,3.25rem);
  letter-spacing:-.025em;
}
.breadcrumb{
  font-size:.82rem;
}

.table-responsive{
  border-radius:1rem;
}

@media (max-width: 991.98px){
  :root{ --portal-navbar-height: 68px; }
  .portal-navbar .nav-link,
  .public-navbar .nav-link{
    padding:.65rem .72rem;
  }
  .quick-access-grid,
  .content-grid-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .content-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 575.98px){
  .container{ width:min(100% - 1.25rem, var(--portal-container-max)); }
  section,.section{ padding-block:3rem; }
  .portal-hero{ min-height:560px; }
  .quick-access-grid,
  .content-grid,
  .content-grid-4{
    grid-template-columns:1fr;
  }
  .portal-navbar .navbar-brand img,
  .public-navbar .navbar-brand img{
    max-height:38px;
  }
}



/* Real photographic visual layer */
.portal-photo-page .portal-hero-image{
  background-image:
    linear-gradient(90deg,rgba(5,25,38,.88),rgba(5,25,38,.54),rgba(5,25,38,.20)),
    url("../../images/portal-public/library-hero-dark.jpg");
  background-size:cover;
  background-position:center;
}
.portal-photo-page .section-visual{
  background-image:
    linear-gradient(rgba(247,250,252,.92),rgba(247,250,252,.92)),
    url("../../images/portal-public/library-background-soft.jpg");
  background-size:auto,cover;
  background-position:center;
}
.portal-photo-page .visual-card{
  overflow:hidden;
}
.portal-photo-page .visual-card img,
.portal-photo-page .portal-image-cover{
  object-fit:cover;
  object-position:center;
}
.portal-photo-page .photo-background{
  background:
    linear-gradient(90deg,rgba(5,25,38,.82),rgba(5,25,38,.40)),
    url("../../images/portal-public/library-hero-dark.jpg") center/cover no-repeat;
}



/* Portal Public V44 visual repair */
.portal-photo-page .portal-hero-image{
  position:relative;
  isolation:isolate;
  min-height:clamp(360px,42vw,560px);
  display:flex;
  align-items:center;
  background-position:center center !important;
  background-size:cover !important;
  color:#fff;
}
.portal-photo-page .portal-hero-image::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(90deg,rgba(4,20,32,.92) 0%,rgba(4,20,32,.76) 42%,rgba(4,20,32,.38) 72%,rgba(4,20,32,.22) 100%),
    linear-gradient(180deg,rgba(4,20,32,.18),rgba(4,20,32,.42));
}
.portal-photo-page .portal-hero-image .container,
.portal-photo-page .portal-hero-image .row,
.portal-photo-page .portal-hero-image .hero-content{
  position:relative;
  z-index:2;
}
.portal-photo-page .portal-hero-image h1,
.portal-photo-page .portal-hero-image h2,
.portal-photo-page .portal-hero-image h3,
.portal-photo-page .portal-hero-image p,
.portal-photo-page .portal-hero-image .lead,
.portal-photo-page .portal-hero-image .breadcrumb,
.portal-photo-page .portal-hero-image .breadcrumb a{
  color:#fff !important;
  text-shadow:0 2px 12px rgba(0,0,0,.28);
}
.portal-photo-page .portal-hero-image p,
.portal-photo-page .portal-hero-image .lead{max-width:760px;}
.portal-photo-page .portal-hero-image .btn{
  box-shadow:0 5px 16px rgba(0,0,0,.18);
}
.portal-photo-page .section-visual{
  position:relative;
  isolation:isolate;
}
.portal-photo-page .section-visual::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:rgba(247,250,252,.94);
}
.portal-photo-page .section-visual .container{position:relative;z-index:1;}
.portal-photo-page .visual-card{
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  color:#1f2937;
}
.portal-photo-page .visual-card h1,
.portal-photo-page .visual-card h2,
.portal-photo-page .visual-card h3,
.portal-photo-page .visual-card h4,
.portal-photo-page .visual-card h5,
.portal-photo-page .visual-card h6{color:#172033;}
.portal-photo-page .visual-card p,
.portal-photo-page .visual-card .text-body-secondary{color:#526070 !important;}
.portal-photo-page .portal-image-cover{
  display:block;
  min-height:220px;
  object-fit:cover;
}
.portal-photo-page .content-section{
  position:relative;
}
.portal-photo-page .content-section > .container{position:relative;z-index:1;}
.portal-photo-page .eyebrow{
  display:inline-block;
  font-size:.75rem;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:#176b87;
}
.portal-photo-page .table,
.portal-photo-page .card,
.portal-photo-page .alert,
.portal-photo-page .form-control,
.portal-photo-page .form-select{
  font-size:.92rem;
}
.portal-photo-page .card-title{line-height:1.3;}
@media (max-width:767.98px){
  .portal-photo-page .portal-hero-image{
    min-height:420px;
    background-position:62% center !important;
  }
  .portal-photo-page .portal-hero-image::before{
    background:linear-gradient(180deg,rgba(4,20,32,.88),rgba(4,20,32,.62));
  }
  .portal-photo-page .portal-hero-image h1{font-size:2rem;}
  .portal-photo-page .portal-image-cover{min-height:180px;}
}


/* Unified overlay stacking: overlays must sit above navigation/sidebar. */
body.modal-open .portal-sidebar,
body.modal-open .sidebar,
body.modal-open .sidenav { pointer-events:none; }
.portal-sidebar,.sidebar,.sidenav { z-index:1030; }
.modal-backdrop { z-index:1045 !important; }
.modal { z-index:1055 !important; }
.modal-dialog,.modal-content { position:relative; z-index:1056; }
