/* Instituții Neamț · Pagina principală și navigarea între portaluri. */
:root {
  --portal-navy: #10273f;
  --portal-gold: #eac280;
  --portal-cream: #f5f5f0;
  --portal-outline: #dce2e4;
  --portal-muted: #526274;
}

body[data-page="home"],
body[data-page="categories"] {
  background: var(--portal-cream);
}

.site-header .nav-wrap {
  min-height: 81px;
  gap: 20px;
}

.site-header .brand b {
  font-family: var(--sans);
  font-size: 22px;
  letter-spacing: -.045em;
}

.site-header .brand small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-header .brand-mark {
  width: 39px;
  height: 46px;
}

#main-nav {
  gap: 18px;
}

#main-nav .portal-external,
.portal-mobile-links .portal-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  color: var(--portal-navy);
  background: #edf2f5;
  border: 1px solid #e3eaee;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

#main-nav .portal-external .icon,
.portal-mobile-links .portal-external .icon {
  width: 15px;
  height: 15px;
}

#main-nav .portal-external:hover,
.portal-mobile-links .portal-external:hover {
  background: #e2ebf0;
  text-decoration: none;
}

.portal-mobile-links {
  display: none;
}

.portal-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: white;
  background: var(--portal-navy);
}

.portal-hero-grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
  padding-block: 52px 56px;
}

.portal-hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #f4d29e;
  letter-spacing: .2em;
}

.portal-hero .eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--portal-gold);
}

.portal-hero h1 {
  margin: 17px 0 18px;
  color: white;
  font-size: clamp(48px, 5.15vw, 76px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.048em;
}

.portal-hero h1 span {
  color: #f2d19f;
}

.portal-hero .hero-description {
  margin: 0;
  max-width: 495px;
  color: #e0e8f0;
  font-size: 17px;
  line-height: 1.55;
}

.portal-hero .hero-search {
  min-height: 56px;
  max-width: 548px;
  margin-top: 25px;
  gap: 8px;
  padding: 6px;
}

.portal-hero .hero-search .search-input {
  padding-left: 11px;
}

.portal-hero .hero-search .search-input > .icon {
  width: 19px;
  height: 19px;
  color: var(--portal-muted);
}

.portal-hero .hero-search .search-location {
  width: min(32%, 175px);
  padding-inline: 9px;
}

.portal-hero .hero-search .button {
  min-height: 44px;
  padding: 9px 17px;
  background: var(--portal-gold);
  border-color: var(--portal-gold);
  color: var(--portal-navy);
}

.portal-hero .hero-search .button:hover {
  background: #f5d699;
  border-color: #f5d699;
}

.portal-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #e0e8f0;
  font-size: 12px;
}

.portal-quick a {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  color: white;
  background: transparent;
  border: 1px solid #6b7b8c;
  border-radius: 4px;
  font-size: inherit;
  line-height: 1.4;
}

.portal-quick a:hover {
  background: #244159;
  border-color: var(--portal-gold);
  text-decoration: none;
}

.portal-hero-visual {
  position: relative;
  align-self: stretch;
  min-height: 368px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #c8d5e457;
  border-radius: 13px;
}

.portal-hero-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

.portal-hero-visual > figcaption {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 37px 18px 13px;
  background: linear-gradient(transparent, #0d1b2cf0);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
}

.portal-hero-visual > figcaption .icon {
  width: 16px;
  height: 16px;
  color: var(--portal-gold);
}

.portal-hero .terrain {
  position: absolute;
  z-index: -1;
  left: -40px;
  bottom: -82px;
  width: min(65%, 610px);
  opacity: .16;
  color: #91a5b8;
  pointer-events: none;
}

.portal-categories {
  padding-block: 47px;
}

.portal-categories .section-heading h2 {
  font-size: clamp(33px, 4vw, 45px);
  font-weight: 500;
  letter-spacing: -.05em;
}

.portal-categories .eyebrow {
  margin-bottom: 7px;
  color: #765323;
}

.portal-category-count {
  padding: 6px 10px;
  border-radius: 5px;
  color: #344f67;
  background: #e8edf0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.portal-category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portal-category-grid .category-tile {
  justify-content: flex-start;
  flex-direction: row;
  text-align: left;
  gap: 11px;
  min-height: 82px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--portal-outline);
  border-radius: 9px;
  box-shadow: none;
}

.portal-category-grid .category-tile:hover {
  transform: none;
  background: #f9fbfc;
  border-color: #a1b0bd;
}

.portal-category-grid .category-icon,
.portal-category-grid .category-tile > .icon:first-child {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 7px;
  background: #edf2f5;
  color: #244865;
}

.portal-category-grid .category-icon .icon,
.portal-category-grid .category-tile > .icon:first-child {
  width: 22px;
  height: 22px;
}

.portal-category-grid .category-tile > .icon:first-child {
  box-sizing: content-box;
  flex-basis: 22px;
  padding: 10px;
}

.portal-category-grid .category-label {
  min-width: 0;
}

.portal-category-grid .category-tile strong,
.portal-category-grid .category-tile small {
  display: block;
}

.portal-category-grid .category-tile strong {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.25;
}

.portal-category-grid .category-tile small {
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.3;
}

.portal-category-grid .category-tile > .icon:last-child:not(:first-child) {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #566d81;
}

.portal-category-grid .portal-external {
  border-color: #c8d9e3;
  background: #edf3f6;
}

.portal-category-grid .portal-external .category-icon {
  background: #e0eaf0;
}

.portal-locality {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 23px;
  padding: 14px 17px;
  border: 1px solid #dce5e9;
  border-radius: 9px;
  background: #e9eff2;
}

.portal-locality .icon {
  width: 19px;
  height: 19px;
}

.portal-locality strong {
  display: block;
}

.portal-locality p,
.portal-locality small {
  color: var(--portal-muted);
  font-size: 13px;
}

.portal-locality > a {
  margin-left: auto;
  color: var(--portal-navy);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 1120px) {
  .site-header .nav-wrap {
    min-height: 74px;
  }

  .site-header .menu-toggle {
    display: block;
  }

  .site-header #main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 16px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 15px #102b4610;
  }

  .site-header #main-nav.open {
    display: flex;
  }

  .site-header #main-nav > a {
    padding: 10px;
  }

  .nav-wrap:has(.portal-mobile-links) {
    flex-wrap: wrap;
    gap: 0;
    padding-block: 9px;
  }

  .portal-mobile-links {
    display: flex;
    flex: 0 0 100%;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #e3eaee;
  }

  .portal-mobile-links .portal-external {
    padding: 6px 9px;
    font-size: 12px;
  }

  .portal-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .portal-hero-grid {
    display: block;
    padding-block: 28px 23px;
  }

  .portal-hero .eyebrow {
    font-size: 10px;
    letter-spacing: .15em;
  }

  .portal-hero h1 {
    margin-block: 13px;
    font-size: clamp(35px, 10.7vw, 58px);
  }

  .portal-hero .hero-description {
    font-size: 15px;
  }

  .portal-hero .hero-search {
    margin-top: 18px;
  }

  .portal-hero .hero-search:not(:has(.search-location)) {
    flex-wrap: nowrap;
  }

  .portal-hero .hero-search:not(:has(.search-location)) .search-input {
    flex: 1;
    width: auto;
    border-bottom: 0;
  }

  .portal-hero .hero-search .search-location {
    flex: 1;
    width: auto;
  }

  .portal-hero .hero-search .search-input > .icon {
    width: 17px;
    height: 17px;
  }

  .portal-hero .hero-search input {
    font-size: 14px;
  }

  .portal-hero .hero-search .button {
    padding-inline: 11px;
    font-size: 13px;
  }

  .portal-quick {
    gap: 6px;
    font-size: 11px;
  }

  .portal-hero-visual {
    min-height: 0;
    margin-top: 18px;
    aspect-ratio: 1.91;
  }

  .portal-hero-visual > figcaption {
    padding: 23px 10px 8px;
    font-size: 11px;
  }

  .portal-hero .terrain {
    width: 95%;
    bottom: 15%;
  }

  .portal-categories {
    padding-block: 28px;
  }

  .portal-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .portal-category-grid .category-tile {
    min-height: 66px;
    padding: 8px;
    gap: 7px;
  }

  .portal-category-grid .category-tile strong {
    font-size: 12px;
  }

  .portal-category-grid .category-tile small {
    font-size: 11px;
  }

  .portal-category-grid .category-icon {
    flex-basis: 29px;
    width: 29px;
    height: 32px;
  }

  .portal-category-grid .category-icon .icon,
  .portal-category-grid .category-tile > .icon:first-child {
    width: 16px;
    height: 16px;
  }

  .portal-category-grid .category-tile > .icon:first-child {
    flex-basis: 16px;
    padding: 7px;
  }

  .portal-category-grid .category-tile > .icon:last-child:not(:first-child) {
    display: none;
  }

  .portal-categories .section-heading:has(.portal-category-count) {
    display: block;
  }

  .portal-category-count {
    display: inline-block;
    margin-top: 8px;
  }

  .portal-locality {
    gap: 8px;
    padding: 10px;
  }

  .portal-locality > .icon {
    display: none;
  }
}

@media (max-width: 365px) {
  .portal-category-grid .category-tile {
    gap: 5px;
    padding-inline: 5px;
  }

  .portal-category-grid .category-icon {
    flex-basis: 24px;
    width: 24px;
  }
}

.detail-image.has-cover,
.card-photo.has-cover {
  aspect-ratio: 16 / 9;
}
.detail-image.has-cover img,
.card-photo.has-cover img {
  object-fit: contain;
  filter: none;
}
.card-photo.has-cover:hover img {
  transform: none;
}
#main-nav [aria-current="page"] {
  box-shadow: inset 0 -2px #a6732d;
}
@media (max-width: 1120px) {
  #main-nav .portal-external {
    display: none;
  }
}
/* Keep the portal shortcuts separate from the collapsible menu. */
.nav-wrap .portal-mobile-links {
  display: none;
}
@media (max-width: 1120px) {
  .nav-wrap .portal-mobile-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 8px;
    padding: 9px 0 0;
    border: 0;
    border-top: 1px solid #e3eaee;
    box-shadow: none;
  }
}


.portal-hero-visual figcaption a {
  color: inherit;
}
.portal-locality-links {
  margin-top: 12px;
}
.portal-locality-links a {
  margin-block: 2px;
}

.portal-hero-map {
  background: #11283f;
}
.portal-hero-map figcaption a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
