.school-project-page {
  background: #fff;
  color: #111;
  opacity: 0;
  animation: pageFadeIn 0.45s ease-out forwards;
}

@keyframes pageFadeIn {
  to {
    opacity: 1;
  }
}

/* =========================
   FAILSAFE: skjul gamle back-links
========================= */

.back-link,
.project-back-top,
.project-back-link,
.project-back-inline {
  display: none !important;
}

/* =========================
   NAVBAR
========================= */

.school-project-page .navbar {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  width: auto;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1;
}

.school-project-page .navbar.show {
  transform: translateX(-50%);
}

.school-project-page .navbar.scrolled {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.school-project-page .nav-logo {
  position: static;
  transform: none;
  display: flex;
  align-items: center;
  text-decoration: none;
  pointer-events: auto;
}

.school-project-page .nav-logo img {
  width: 88px;
  height: auto;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.school-project-page .nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 54px;
  margin: 0;
  padding: 18px 34px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  border-radius: 18px;
  pointer-events: auto;
}

.school-project-page .nav-links li {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.school-project-page .nav-links a {
  position: relative;
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 1.5px;
  text-shadow: none !important;
  white-space: nowrap;
}

.school-project-page .nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background: white;
  transition: none !important;
}

.school-project-page .nav-links a:hover::after {
  width: 0 !important;
}

.school-project-page .nav-links a.active::after {
  width: 100% !important;
}

.school-project-page .nav-links a.active {
  font-weight: normal !important;
}

.school-project-page .nav-logo::after,
.school-project-page .nav-logo.home-active::after {
  display: none !important;
  content: none !important;
}

.school-project-page .menu-toggle {
  display: none;
  pointer-events: auto;
}

.school-project-page .menu-overlay {
  display: none;
}

.school-project-page .mobile-only {
  display: none !important;
}

/* =========================
   HERO
========================= */

.project-hero {
  position: relative;
  min-height: 100svh;
  background: black;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.project-hero-media {
  position: absolute;
  inset: 0;
}

.project-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.03);
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.16),
      rgba(0, 0, 0, 0.08) 35%,
      rgba(0, 0, 0, 0.78)
    );
}

.project-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 10% 72px;
  color: white;
  animation: softFadeIn 0.45s ease-out both;
}

.project-hero-content h1 {
  margin: 0;
  font-size: clamp(52px, 9vw, 110px);
  line-height: 0.95;
  letter-spacing: -2px;
}

.project-lead {
  margin: 18px 0 0 0;
  max-width: 700px;
  font-size: 20px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

.project-eyebrow {
  margin: 0 0 14px 0;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.78;
}

/* =========================
   BREADCRUMBS
========================= */

.project-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-shadow: none !important;
  position: relative;
  z-index: 3;
}

.project-breadcrumbs a,
.project-breadcrumbs span {
  color: inherit;
  text-decoration: none;
  text-shadow: none !important;
}

.project-breadcrumbs a:hover {
  opacity: 0.85;
}

.project-breadcrumbs a::after {
  display: none !important;
}

.project-breadcrumbs [aria-current="page"] {
  color: white;
}

/* =========================
   BACK LINK (IN HERO)
========================= */

.project-back-hero {
  display: inline-block;
  margin-top: 22px;
  color: white;
  opacity: 0.75;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.project-back-hero:hover {
  opacity: 1;
  transform: translateX(-3px);
}

/* =========================
   MAIN
========================= */

.project-main {
  background: white;
  animation: softFadeIn 0.45s ease-out both;
  animation-delay: 0.05s;
}

.project-section {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 88px 10% 0;
}

.project-intro-section {
  padding-top: 72px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}

.project-main-text h2,
.project-section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.98;
  letter-spacing: -1px;
}

.project-main-text p,
.project-text-block p {
  margin: 18px 0 0 0;
  font-size: 18px;
  line-height: 1.8;
  color: #202020;
  max-width: 62ch;
}

.project-meta {
  display: grid;
  gap: 14px;
}

.project-meta-item {
  padding: 18px 18px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  background: #fafafa;
}

.project-meta-item span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: #777;
}

.project-meta-item strong {
  display: block;
  font-size: 18px;
  line-height: 1.45;
  color: #111;
}

.project-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.project-section-number {
  margin: 10px 0 0 0;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #7b7b7b;
}

.project-text-block {
  max-width: 760px;
}

/* =========================
   IMAGES
========================= */

.project-image-grid {
  display: grid;
  gap: 22px;
  margin-top: 36px;
}

.project-image-grid.two-col {
  grid-template-columns: 1fr 1fr;
}

.project-image-grid.three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.project-figure {
  margin: 0;
}

.project-figure img {
  width: 100%;
  display: block;
  border-radius: 22px;
  background: #f3f3f3;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.project-figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
}

.project-full-image-section {
  padding-top: 52px;
}

.project-figure.large img {
  max-height: 900px;
  object-fit: cover;
}

/* =========================
   CTA / NEXT
========================= */

.project-navigation-section {
  padding: 88px 10% 60px;
}

.project-next-box {
  padding: 40px 32px;
  border-radius: 28px;
  background: #f7f7f7;
  text-align: center;
}

.project-next-box p {
  margin: 0 0 8px 0;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #666;
}

.project-next-box h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.project-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: black;
  color: white;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.project-button:hover {
  transform: translateY(-2px);
  opacity: 0.96;
}

.project-button:active {
  transform: scale(0.985);
}

/* =========================
   FOOTER
========================= */

.site-footer {
  background: black;
  color: white;
  padding: 48px 56px;
  margin-top: 80px;
  animation: softFadeIn 0.45s ease-out both;
  animation-delay: 0.1s;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  align-items: start;
  gap: 48px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-column h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 700;
}

.footer-column p,
.footer-column a {
  margin: 0 0 6px 0;
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
}

.footer-column a:hover {
  opacity: 0.8;
}

.footer-logo {
  align-self: start;
  justify-self: end;
}

.footer-logo img {
  width: 140px;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-logo img:hover {
  transform: rotate(360deg);
}

/* =========================
   SOCIAL ICONS
========================= */

.social-icons {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

.social-icons a {
  display: inline-block;
}

.social-icons img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition:
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease;
}

.social-icons:hover img {
  opacity: 0.4;
}

.social-icons img:hover {
  transform: translateY(-4px) scale(1.12);
  opacity: 1;
}

/* =========================
   ANIMATION
========================= */

@keyframes softFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* =========================
   TABLET
========================= */

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-image-grid.two-col,
  .project-image-grid.three-col {
    grid-template-columns: 1fr;
  }

  .project-hero-content {
    width: calc(100% - 40px);
    padding: 0 0 54px 0;
  }

  .project-section {
    width: calc(100% - 40px);
    padding: 72px 0 0;
  }

  .project-navigation-section {
    padding: 72px 20px 48px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-logo {
    justify-self: start;
    margin-top: 20px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .school-project-page .navbar {
    position: fixed;
    top: 10px;
    left: 0;
    width: 100%;
    padding: 0;
    justify-content: flex-end;
    align-items: center;
    z-index: 120;
    background: transparent;
    transform: none;
  }

  .school-project-page .navbar.show {
    transform: none;
  }

  .school-project-page .nav-logo-item {
    display: none !important;
  }

  .school-project-page .mobile-only {
    display: list-item !important;
  }

  .school-project-page .menu-toggle {
    display: block;
    position: absolute;
    right: 16px;
    top: 14px;
    transform: none;
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(0, 0, 0, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 130;
    opacity: 1 !important;
    pointer-events: auto;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
  }

  .school-project-page .menu-toggle:hover,
  .school-project-page .menu-toggle:focus,
  .school-project-page .menu-toggle:focus-visible,
  .school-project-page .menu-toggle:active {
    background: rgba(0, 0, 0, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
    outline: none;
  }

  .school-project-page .menu-toggle span {
    position: absolute;
    left: 50%;
    width: 15px;
    height: 2px;
    background: white;
    border-radius: 999px;
    transform: translateX(-50%);
    transition: transform 0.28s ease, opacity 0.28s ease, top 0.28s ease;
  }

  .school-project-page .menu-toggle span:nth-child(1) {
    top: 13px;
  }

  .school-project-page .menu-toggle span:nth-child(2) {
    top: 20px;
  }

  .school-project-page .menu-toggle span:nth-child(3) {
    top: 27px;
  }

  .school-project-page .menu-toggle.active span:nth-child(1) {
    top: 20px;
    transform: translateX(-50%) rotate(45deg);
  }

  .school-project-page .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .school-project-page .menu-toggle.active span:nth-child(3) {
    top: 20px;
    transform: translateX(-50%) rotate(-45deg);
  }

  .school-project-page .menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
  }

  .school-project-page .menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .school-project-page .nav-links {
    position: absolute;
    top: 52px;
    right: 12px;
    width: 208px;
    margin: 0;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px);
    transform-origin: top right;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 120;
  }

  .school-project-page .nav-links.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .school-project-page .nav-links li {
    width: 100%;
  }

  .school-project-page .nav-links a {
    display: block;
    width: 100%;
    padding: 10px 16px;
    color: white !important;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    text-shadow: none;
    line-height: 1.25;
    white-space: nowrap;
  }

  .school-project-page .nav-links a:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .school-project-page .nav-links a::after {
    display: none !important;
  }

  .project-hero {
    min-height: 78svh;
  }

  .project-hero-content {
    width: calc(100% - 32px);
    padding: 0 0 36px 0;
  }

  .project-back-hero {
    margin-top: 18px;
    font-size: 12px;
    letter-spacing: 1px;
  }

  .project-section {
    width: calc(100% - 32px);
    padding: 56px 0 0;
  }

  .project-intro-section {
    padding-top: 48px;
  }

  .project-eyebrow {
    font-size: 11px;
    letter-spacing: 1.7px;
  }

  .project-lead {
    font-size: 16px;
    line-height: 1.75;
  }

  .project-main-text p,
  .project-text-block p {
    font-size: 16px;
    line-height: 1.75;
  }

  .project-meta-item strong {
    font-size: 16px;
  }

  .project-section-heading {
    gap: 12px;
    margin-bottom: 18px;
  }

  .project-section-number {
    margin-top: 8px;
    font-size: 11px;
  }

  .project-image-grid {
    gap: 16px;
    margin-top: 28px;
  }

  .project-figure img {
    border-radius: 16px;
  }

  .project-navigation-section {
    padding: 56px 16px 36px;
  }

  .project-next-box {
    padding: 30px 18px;
    border-radius: 20px;
  }

  .site-footer {
    padding: 36px 24px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-column h3 {
    font-size: 17px;
    margin-bottom: 8px;
  }

  .footer-column p,
  .footer-column a {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 4px;
  }

  .footer-logo {
    justify-self: start;
    margin-top: 6px;
  }

  .footer-logo img {
    width: 78px;
  }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {
  .project-hero {
    min-height: 72svh;
  }

  .project-hero-content h1 {
    font-size: clamp(38px, 12vw, 56px);
    letter-spacing: -1px;
  }

  .project-lead {
    font-size: 15px;
  }

  .project-main-text h2,
  .project-section-heading h2 {
    font-size: 30px;
  }

  .project-main-text p,
  .project-text-block p {
    font-size: 15px;
  }

  .project-meta-item {
    border-radius: 14px;
    padding: 16px;
  }

  .school-project-page .menu-toggle {
    right: 14px;
    top: 14px;
    width: 40px;
    height: 40px;
  }

  .school-project-page .menu-toggle span:nth-child(1) {
    top: 13px;
  }

  .school-project-page .menu-toggle span:nth-child(2) {
    top: 20px;
  }

  .school-project-page .menu-toggle span:nth-child(3) {
    top: 27px;
  }

  .school-project-page .menu-toggle.active span:nth-child(1),
  .school-project-page .menu-toggle.active span:nth-child(3) {
    top: 20px;
  }

  .school-project-page .nav-links {
    top: 52px;
    right: 10px;
    width: 212px;
    padding: 12px 0;
  }

  .school-project-page .nav-links a {
    padding: 10px 15px;
    font-size: 15px;
  }
}

/* =========================
   SMALL DESKTOP / LAPTOP
========================= */

@media (min-width: 769px) and (max-width: 1500px) {
  .school-project-page .navbar {
    top: 55px;
  }

  .school-project-page .nav-links {
    gap: 32px;
    padding: 12px 22px;
    border-radius: 15px;
  }

  .school-project-page .nav-logo img {
    width: 66px;
  }

  .school-project-page .nav-links a {
    font-size: 14px;
    letter-spacing: 0.8px;
  }
}

@media (max-width: 768px) {
  .project-breadcrumbs {
    flex-wrap: wrap;
    line-height: 1.4;
  }

  .project-breadcrumbs span,
  .project-breadcrumbs a {
    min-width: 0;
  }

 .project-breadcrumbs span[aria-current="page"] {
  overflow-wrap: break-word;
  word-break: normal;
}

  .project-hero-content h1 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.5px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 480px) {
  .project-hero-content h1 {
    font-size: clamp(28px, 8.5vw, 36px);
  }
}

/* skjul på desktop */
.mobile-back {
  display: none;
  color: white;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 1px;
  opacity: 0.8;
}

/* mobil */
@media (max-width: 768px) {
  .project-breadcrumbs {
    display: none;
  }

  .mobile-back {
    display: inline-block;
    margin-bottom: 14px;
  }

  .mobile-back:hover {
    opacity: 1;
    transform: translateX(-3px);
  }
}