/* ============================================
   Gaulin Bygg AS — Clean Nordic Design
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #005CA7;
  --color-primary-dark: #004a87;
  --color-primary-light: #055D98;
  --color-accent: #005CA7;
  --color-accent-dark: #004a87;
  --color-accent-hover: #004a87;
  --color-bg: #f5f5f5;
  --color-white: #ffffff;
  --color-text: #3a3a3a;
  --color-text-light: #4b4f58;
  --color-border: #e0e0e0;
  --color-footer-bg: #171717;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 600;
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* --- Top Bar --- */
.top-bar {
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.top-bar a {
  color: var(--color-white);
  transition: opacity 0.2s;
}

.top-bar a:hover {
  opacity: 0.8;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-bar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header / Nav --- */
.header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.header-logo img {
  height: 50px;
  width: auto;
}

.nav-list {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-list a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  min-height: 48px;
  min-width: 48px;
  position: relative;
  z-index: 110;
}

.nav-toggle .material-symbols-outlined {
  font-size: 28px;
  color: var(--color-text);
}

.nav-icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-icon-close {
  display: block;
}

/* Top bar icons */
.top-bar-icon {
  font-size: 18px;
  vertical-align: middle;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,92,167,0.7) 0%, rgba(0,60,110,0.5) 100%);
}

.hero-content {
  position: relative;
  max-width: 700px;
  padding: 2rem 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 1rem 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  border: none;
  font-family: inherit;
  min-height: 48px;
  min-width: 48px;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-dark {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-dark:hover {
  background: var(--color-primary-light);
}

/* --- Sections --- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-white);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.section-alt .service-card {
  background: var(--color-bg);
}

.service-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.service-card-img {
  height: 200px;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card-body {
  padding: 1.5rem;
}

.service-card h3 {
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* --- About Preview --- */
.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-preview-img {
  border-radius: 6px;
  overflow: hidden;
}

.about-preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.about-preview-text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.about-preview-text p {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

/* --- Stats --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  padding: 3rem 0;
}

.stat-item strong {
  display: block;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--color-primary);
  font-weight: 700;
}

.stat-item span {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* --- CTA Section --- */
.cta-section {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 4rem 0;
}

.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.cta-section p {
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Team Grid --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.team-card {
  text-align: center;
}

.team-card-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1rem;
  border: 3px solid var(--color-border);
}

.team-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.team-card .role {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.team-card .phone {
  font-size: 0.85rem;
  color: var(--color-primary);
}

/* --- Timeline --- */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  padding-left: 2rem;
  border-left: 2px solid var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-white);
  margin-left: -5px;
}

.timeline-item strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* --- Values --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.value-item {
  padding: 2rem 1.5rem;
  background: var(--color-white);
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.section-alt .value-item {
  background: var(--color-bg);
}

.value-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.value-item h3 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.value-item p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* --- Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item--tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

/* --- FAQ --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  background: var(--color-white);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item[open] summary {
  color: var(--color-primary);
}

.faq-item p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-info-item .icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.contact-info-item strong {
  display: block;
  color: var(--color-primary);
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
}

.contact-info-item span,
.contact-info-item a {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.contact-info-item a:hover {
  color: var(--color-primary);
}

/* --- Form --- */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,92,167,0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Footer (Identical to gaulinbygg.no) --- */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-white);
  padding: 3rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand img {
  height: 50px;
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.85rem;
  opacity: 0.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #005CA7;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-mester {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.footer-mester img {
  height: 140px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  opacity: 0.5;
}

.footer-bottom .designblokk {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  opacity: 0.5;
}

.footer-bottom .designblokk img {
  height: 18px;
  width: auto;
  min-width: 140px;
}

/* --- Print --- */
@media print {
  .top-bar, .header, .footer, .cta-section, .nav-toggle {
    display: none;
  }
  .section {
    padding: 1rem 0;
  }
  body {
    color: #000;
    background: #fff;
  }
}

/* --- Page Header --- */
.page-header {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 4rem 0 3rem;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.page-header p {
  opacity: 0.85;
  max-width: 550px;
  margin: 0 auto;
}

/* --- Certifications bar --- */
.cert-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
  flex-wrap: wrap;
}

.cert-bar img {
  height: 60px;
  opacity: 0.8;
}

/* --- Map placeholder --- */
.map-embed {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 6px;
  margin-top: 2rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .services-grid,
  .team-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-preview {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-mester {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  /* Top bar: icons only on mobile, spread evenly */
  .top-bar {
    padding: 0.5rem 0;
  }

  .top-bar .container {
    justify-content: space-between;
  }

  .top-bar-text {
    display: none;
  }

  .top-bar-center {
    position: static;
    transform: none;
  }

  .top-bar-icon {
    font-size: 22px;
  }

  .top-bar-item {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Header */
  .header {
    height: 64px;
    --header-height: 64px;
    z-index: 200;
    position: sticky;
  }

  .header .container {
    position: relative;
  }

  .header-logo img {
    height: 40px;
  }

  /* Nav mobile */
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 0.5rem 1.5rem 1rem;
    gap: 0;
    z-index: 150;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-top: 1px solid var(--color-border);
  }

  .nav-list.active {
    display: flex;
  }

  .nav-list a {
    padding: 1rem 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--color-border);
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Hero */
  .hero {
    min-height: 55vh;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-content .btn {
    display: block;
    margin-bottom: 0.75rem;
  }

  .hero-content .btn + .btn {
    margin-left: 0;
  }

  /* Sections */
  .section {
    padding: 3rem 0;
  }

  .services-grid,
  .team-grid,
  .values-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item--tall {
    grid-row: span 1;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Team */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .team-card-img {
    width: 120px;
    height: 120px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-mester {
    justify-content: flex-start;
  }

  .footer-mester img {
    height: 100px;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }

  /* Page header */
  .page-header {
    padding: 2.5rem 0 2rem;
  }

  /* CTA */
  .cta-section {
    padding: 3rem 0;
  }

  /* Contact */
  .contact-info-item {
    min-height: 48px;
  }

  /* Timeline */
  .timeline {
    padding-left: 1.5rem;
  }
}
