/* ============================================
   Frogner Dører AS — Felles CSS
   Inspirert av klassisk norsk håndverkstradisjon
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

:root {
  --color-primary: #1a2a3a;
  --color-secondary: #8b7355;
  --color-accent: #c9a96e;
  --color-bg: #faf8f5;
  --color-bg-dark: #1a2a3a;
  --color-text: #2c2c2c;
  --color-text-light: #6b6b6b;
  --color-white: #ffffff;
  --color-border: #e0d8ce;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', sans-serif;
  --max-width: 1200px;
  --transition: 0.3s ease;
  --header-height: 80px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main {
  padding-top: var(--header-height);
}

/* Forsiden: hero fyller hele skjermen, trenger ikke padding */
.hero {
  margin-top: calc(-1 * var(--header-height));
}

/* Fluid typography */
h1 { font-size: clamp(1.8rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.8rem); }

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

a:hover {
  color: var(--color-accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.3;
}

/* ============================================
   Navigation
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 42, 58, 0.95);
  backdrop-filter: blur(10px);
  padding: 0 2rem;
  transition: background var(--transition);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-white);
  font-weight: 600;
  letter-spacing: 1px;
}

.logo img {
  height: 60px;
  width: auto;
  background: #f0ebe4;
  padding: 5px 12px;
  border-radius: 4px;
  transition: background var(--transition);
}

.logo span {
  color: var(--color-accent);
}

header nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

header nav a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.5rem 0;
  position: relative;
}

header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

header nav a:hover {
  color: var(--color-white);
}

header nav a:hover::after {
  width: 100%;
}

/* Dropdown-meny */
header nav li.has-dropdown {
  position: relative;
}

header nav li.has-dropdown > a::before {
  content: ' ▾';
  font-size: 0.7em;
  margin-left: 4px;
}

header nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(26, 42, 58, 0.98);
  backdrop-filter: blur(10px);
  min-width: 200px;
  padding: 0.5rem 0;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  list-style: none;
  z-index: 1001;
}

header nav li.has-dropdown:hover > .dropdown {
  display: block;
}

header nav .dropdown li {
  width: 100%;
}

header nav .dropdown a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.82rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

header nav .dropdown a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-accent);
}

header nav .dropdown a::after {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-white);
  margin: 5px 0;
  transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: #1a2a3a;
  z-index: -2;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to bottom, rgba(26, 42, 58, 0.7) 0%, rgba(26, 42, 58, 0.5) 35%, rgba(26, 42, 58, 0.75) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--color-white);
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero h1 .accent {
  color: var(--color-accent);
  display: block;
  font-style: italic;
  font-size: 2rem;
  margin-top: 0.5rem;
}

.hero p {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--color-accent);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

.btn-dark {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.btn-dark:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

/* ============================================
   Sections — General
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-header .divider {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 1.5rem auto 0;
}

.bg-dark {
  background: var(--color-bg-dark);
  color: var(--color-white);
}

.bg-dark h2,
.bg-dark h3,
.bg-dark h4 {
  color: var(--color-white);
}

.bg-dark p {
  color: rgba(255, 255, 255, 0.8);
}

.bg-alt {
  background: #f0ebe4;
}

/* ============================================
   Intro / Om Oss
   ============================================ */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.intro-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.intro-text p {
  margin-bottom: 1.2rem;
  color: var(--color-text-light);
}

.intro-image {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 4px;
  overflow: hidden;
}

.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   Tjenester / Services
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--color-white);
  padding: 2.5rem;
  border-radius: 4px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--color-border);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.service-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* ============================================
   Galleri / Showcase
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 42, 58, 0.85) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

/* ============================================
   Prosjekter / Projects
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  background: var(--color-white);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.project-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.project-image {
  aspect-ratio: 4/5;
  min-height: 280px;
  object-fit: cover;
}

img.project-image {
  width: 100%;
  height: 100%;
}

.project-info {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-info .tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-info h2 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  line-height: 1.35;
}

.project-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.project-info p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.project-info .link {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-secondary);
}

.project-info .link:hover {
  color: var(--color-accent);
}

/* ============================================
   Samarbeidspartnere / Partners
   ============================================ */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.partner-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  transition: all var(--transition);
}

.partner-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-accent);
}

.partner-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.partner-card p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.partner-card .btn {
  font-size: 0.75rem;
  padding: 0.6rem 1.5rem;
}

/* Partner-varianter for lys bakgrunn */
.partner-card-light {
  background: var(--color-white);
  border-color: var(--color-border);
}

.partner-card-light h3 {
  color: var(--color-primary);
}

.partner-card-light p {
  color: var(--color-text-light);
}

.partner-card-small {
  padding: 1.5rem;
}

.partner-card-small h3 {
  font-size: 1.1rem;
}

.partner-card-small p {
  font-size: 0.85rem;
}

.btn-small {
  font-size: 0.7rem;
  padding: 0.5rem 1.2rem;
}

/* Partner grid-varianter */
.partners-main {
  max-width: 1000px;
  margin: 0 auto 3rem;
  grid-template-columns: repeat(3, 1fr);
}

.partners-suppliers {
  max-width: 1000px;
  margin: 0 auto;
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================
   Verdier / Values
   ============================================ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.value-item {
  padding: 2rem;
}

.value-item .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.value-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.value-item p {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ============================================
   Kontakt / Contact
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.contact-detail {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-detail .icon {
  font-size: 1.2rem;
  color: var(--color-accent);
  min-width: 24px;
}

.contact-detail p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.contact-detail a {
  color: var(--color-secondary);
}

.contact-form h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  border-radius: 4px;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

#form-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 1.5em;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: #111d2a;
  color: rgba(255, 255, 255, 0.6);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  display: inline-flex;
}

.footer-brand .logo img {
  height: 48px;
  background: #f0ebe4;
  padding: 4px 10px;
  border-radius: 4px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.site-footer h4 {
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
}

.site-footer ul {
  list-style: none;
}

.site-footer li {
  margin-bottom: 0.6rem;
}

.site-footer li a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.site-footer li a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ============================================
   Animations
   ============================================ */

/* Header shrink ved scroll */
.site-header.scrolled {
  background: rgba(26, 42, 58, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.site-header.scrolled .container {
  height: 65px;
}

.site-header.scrolled .logo img {
  height: 48px;
  padding: 4px 10px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Breadcrumb (SEO)
   ============================================ */
.breadcrumb {
  padding: 0 0 0.5rem;
  text-align: left;
}

.breadcrumb ol {
  display: flex;
  list-style: none;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb .separator {
  margin: 0 0.5rem;
}

.breadcrumb .current {
  color: var(--color-accent);
}

/* ============================================
   Page Hero (undersider)
   ============================================ */
.page-hero {
  padding: 1.5rem 0;
  text-align: center;
  background: var(--color-bg-dark);
  color: var(--color-white);
}

.page-hero h1 {
  color: var(--color-white);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Responsive — Omnichannel
   PC (1440+), Laptop (1024-1439), Tablet (768-1023),
   Mobil (480-767), Liten mobil (<480)
   ============================================ */

/* --- Stor skjerm / Desktop XL (1440px+) --- */
@media (min-width: 1440px) {
  :root {
    --max-width: 1320px;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .hero h1 .accent {
    font-size: 2.4rem;
  }

  .section-header h2 {
    font-size: 3rem;
  }

  .gallery-grid {
    gap: 1.5rem;
  }
}

/* --- Laptop / Desktop (1024–1439px) --- */
@media (max-width: 1439px) and (min-width: 1025px) {
  .hero h1 {
    font-size: 3.2rem;
  }

  .projects-grid {
    gap: 1.5rem;
  }
}

/* --- Tablet Landscape (1024px) --- */
@media (max-width: 1024px) {
  .services-grid,
  .partners-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .partners-main,
  .partners-suppliers {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero h1 .accent {
    font-size: 1.8rem;
  }

  .section-header h2 {
    font-size: 2.2rem;
  }

  header nav ul {
    gap: 1.2rem;
  }

  header nav a {
    font-size: 0.8rem;
  }
}

/* --- Tablet Portrait (768–1023px) --- */
@media (max-width: 1023px) and (min-width: 769px) {
  .container {
    padding: 0 1.5rem;
  }

  section {
    padding: 5rem 0;
  }

  .intro-grid {
    gap: 2.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .contact-grid {
    gap: 3rem;
  }

  .service-detail {
    gap: 2.5rem;
  }

  .service-detail-text h2,
  .service-detail-text h3 {
    font-size: 1.5rem;
  }
}

/* --- Mobil + Tablet Portrait (768px og under) --- */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .site-header {
    padding: 0 1rem;
    height: 70px;
  }

  .site-header .container {
    height: 70px;
  }

  .logo img {
    height: 48px;
  }

  /* Hamburger-meny */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    z-index: 1010;
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-white);
    margin: 3px 0;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  /* Hamburger → X animasjon */
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Mobilmeny */
  header nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1005;
    background: #1a2a3a;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }

  header nav.active {
    max-height: 400px;
  }

  header nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0 1rem;
    width: 100%;
  }

  header nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
  }

  header nav li:last-child {
    border-bottom: none;
  }

  header nav a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    min-height: 48px;
    color: rgba(255, 255, 255, 0.9);
    width: 100%;
    letter-spacing: 1px;
    text-transform: uppercase;
    touch-action: manipulation;
  }

  header nav a:hover,
  header nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-accent);
  }

  header nav a::after {
    display: none;
  }

  /* Mobil dropdown */
  header nav li.has-dropdown > a::before {
    content: ' ▾';
  }

  header nav li.has-dropdown:hover > .dropdown {
    display: none;
  }

  header nav .dropdown {
    position: static;
    display: none;
    background: rgba(255, 255, 255, 0.03);
    min-width: 100%;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  header nav li.has-dropdown.open > .dropdown {
    display: block;
  }

  header nav .dropdown a {
    padding-left: 2.5rem;
    font-size: 0.85rem;
    min-height: 44px;
  }

  /* Hero */
  .hero {
    min-height: 500px;
    height: 85vh;
  }

  .hero-content {
    padding: 1.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
    letter-spacing: 1px;
  }

  .hero h1 .accent {
    font-size: 1.3rem;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  /* Sections */
  section {
    padding: 3.5rem 0;
  }

  .container {
    padding: 0 1.25rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  /* Grids → single column */
  .intro-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .intro-text h2,
  .intro-text h3 {
    font-size: 1.5rem;
  }

  .intro-image {
    aspect-ratio: 16/10;
    order: -1;
  }

  .services-grid,
  .partners-grid,
  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .partners-main,
  .partners-suppliers {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .service-card {
    padding: 2rem 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Tekst under bildet på mobil i stedet for overlay */
  .gallery-item {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
  }

  .gallery-item .gallery-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    flex-shrink: 0;
  }

  .gallery-overlay {
    position: static;
    opacity: 1;
    background: none;
    padding: 0.75rem 1rem;
    flex-direction: column;
    justify-content: flex-start;
  }

  .gallery-overlay h4 {
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
  }

  .gallery-overlay p {
    color: var(--color-text-light);
    font-size: 0.8rem;
  }

  .project-card {
    grid-template-columns: 1fr;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  }

  .project-image,
  img.project-image {
    aspect-ratio: 16/10;
    min-height: auto;
    max-height: none;
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .project-info {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .project-info h2,
  .project-info h3 {
    font-size: 1.15rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand .logo img {
    height: 42px;
  }

  /* Service detail — se dedikert @media etter base-stiler */

  /* Page hero */
  .page-hero h1 {
    font-size: 1.8rem;
  }

  .page-hero p {
    font-size: 0.95rem;
  }

  /* Buttons — touch-friendly */
  .btn {
    padding: 1rem 2rem;
    font-size: 0.8rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Contact form — touch-friendly */
  .form-group input,
  .form-group textarea {
    padding: 1rem;
    font-size: 1rem;
    min-height: 48px;
  }

  /* Partner cards */
  .partner-card {
    padding: 2rem 1.5rem;
  }
}



/* --- Mobil Landscape --- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    height: auto;
    padding: 5rem 0 3rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero h1 .accent {
    font-size: 1.2rem;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .page-hero {
    padding-bottom: 1rem;
  }

  header nav {
    top: 70px;
    bottom: 0;
  }
}

/* --- Touch device hover fix --- */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover {
    transform: none;
  }

  .gallery-item:hover .gallery-img {
    transform: none;
  }

  header nav a:hover::after {
    width: 0;
  }

  .btn:hover {
    opacity: 0.9;
  }
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .hero-content {
    animation: none;
  }
}

/* --- High contrast mode --- */
@media (prefers-contrast: high) {
  :root {
    --color-text-light: #444;
    --color-border: #999;
  }

  .gallery-overlay {
    background: rgba(0, 0, 0, 0.85);
  }

  header nav a {
    color: #fff;
  }
}

/* ============================================
   Subpage Specific — Prosjekter
   ============================================ */

/* ============================================
   Subpage — Tjenester detail
   ============================================ */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--color-border);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.service-detail:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.service-detail:nth-child(even) {
  direction: rtl;
}

.service-detail:nth-child(even) > * {
  direction: ltr;
}

.service-detail-image {
  aspect-ratio: 4/3;
  border-radius: 4px;
  overflow: hidden;
}

img.service-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-detail-text h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  line-height: 1.35;
}

.service-detail-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.service-detail-text p {
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

.service-detail-text ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-detail-text ul li {
  padding: 0.3rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.service-detail-text ul li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.7rem;
  top: 0.5rem;
}

@media (max-width: 768px) {
  .service-detail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .service-detail:nth-child(even) {
    direction: ltr;
  }

  .service-detail-image,
  img.service-detail-image {
    aspect-ratio: 16/9;
    width: 100%;
    border-radius: 6px;
  }

  .service-detail-text h2,
  .service-detail-text h3 {
    font-size: 1.3rem;
  }

  .service-detail-text ul li {
    font-size: 0.9rem;
  }
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Skip to content (Accessibility + SEO)
   ============================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 0.8rem 1.5rem;
  z-index: 9999;
  font-weight: 700;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   Print styles (SEO best practice)
   ============================================ */
@media print {
  .site-header,
  .menu-toggle,
  .hero-bg,
  .hero-overlay {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
