/* ============================================================
   ÄNGELSBERGS BYGGTEKNIK AB — Stylesheet
   ============================================================ */

:root {
  --blue:        #1a3a5c;
  --blue-dark:   #122840;
  --blue-light:  #2a5a8c;
  --orange:      #e07820;
  --orange-dark: #c06010;
  --grey-light:  #f5f5f3;
  --grey-mid:    #ddd;
  --grey-text:   #555;
  --white:       #fff;
  --black:       #1a1a1a;
  --font-display: 'Montserrat', sans-serif;
  --font-body:    'Open Sans', sans-serif;
  --radius:  5px;
  --shadow:  0 2px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 6px 28px rgba(0,0,0,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--black); background: var(--white); line-height: 1.65; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--orange); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  text-align: center;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); text-decoration: none; transform: translateY(-1px); color: var(--white); box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.6); }
.btn-secondary:hover { background: rgba(255,255,255,0.15); text-decoration: none; color: var(--white); }

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--grey-mid);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}
.logo { flex-shrink: 0; display: flex; align-items: center; }
.logo img {
  height: 52px;
  width: auto;
  max-width: calc(100vw - 80px);
}

/* NAV */
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav > a {
  color: var(--black);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.site-nav > a:hover,
.site-nav > a.active { color: var(--white); background: var(--blue); text-decoration: none; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--black);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active { color: var(--white); background: var(--blue); }
.nav-arrow { font-size: 0.7rem; transition: transform 0.2s; }
.nav-dropdown-toggle.open .nav-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  overflow: hidden;
  z-index: 200;
}
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--black);
  transition: background 0.15s, color 0.15s;
  border-bottom: 1px solid var(--grey-light);
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active { background: var(--blue); color: var(--white); text-decoration: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-light) 100%);
  color: var(--white);
  padding: clamp(3rem, 8vw, 6rem) 1.25rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { max-width: 1100px; margin: 0 auto; position: relative; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.hero h1 span { color: var(--orange); display: block; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); opacity: 0.85; margin-bottom: 2.5rem; }
.hero-contact { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── SECTIONS ── */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section:nth-child(even) { background: var(--grey-light); }
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: var(--blue-dark);
  margin-bottom: 0.5rem;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  height: 4px;
  width: 50px;
  background: var(--orange);
  margin-top: 8px;
  border-radius: 2px;
}
.section-sub { color: var(--grey-text); margin-bottom: 2rem; margin-top: 0.5rem; }

/* ── TJÄNSTER ── */
.tjanster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.tjanst-card {
  background: var(--white);
  border: 1px solid var(--grey-mid);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  border-top: 3px solid var(--orange);
}
.tjanst-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tjanst-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.tjanst-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--blue-dark);
  margin-bottom: 0.5rem;
}
.tjanst-card p { font-size: 0.9rem; color: var(--grey-text); }

/* ── PROJEKT (startsida) ── */
.projekt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.projekt-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  display: block;
}
.projekt-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
.projekt-img { height: 180px; overflow: hidden; }
.projekt-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.projekt-card:hover .projekt-img img { transform: scale(1.05); }
.projekt-label {
  background: var(--blue-dark);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.6rem 1rem;
  text-align: center;
}

/* ── GALLERY PAGE ── */
.gallery-page { padding: clamp(2rem, 4vw, 3.5rem) 1.25rem clamp(3rem, 6vw, 5rem); }
.gallery-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 2rem;
  align-items: start;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.gallery-item {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  background: var(--grey-light);
  transition: box-shadow 0.2s, transform 0.2s;
}
.gallery-item:hover { box-shadow: var(--shadow-lg); transform: scale(1.02); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-item:hover img { transform: scale(1.04); }

/* Gallery sidebar */
.gallery-sidebar h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange);
}
.sidebar-links { display: flex; flex-direction: column; gap: 0.75rem; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--grey-mid);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
}
.sidebar-link:hover { box-shadow: var(--shadow-lg); border-color: var(--blue); text-decoration: none; }
.sidebar-link.active { border-color: var(--orange); background: #fff8f2; }
.sidebar-link img {
  width: 52px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}
.sidebar-link span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--blue-dark);
}

/* PAGE HERO */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  padding: clamp(2rem, 4vw, 3rem) 1.25rem;
}
.page-hero .container {}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--white);
  margin-bottom: 0.25rem;
}
.page-hero p { color: rgba(255,255,255,0.75); font-size: 0.95rem; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.lightbox-caption { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 0.75rem; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--white);
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 1.25rem; right: 1.25rem; font-size: 1rem; }
.lightbox-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

/* ── FOOTER ── */
.site-footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.75);
  padding: clamp(2.5rem, 5vw, 4rem) 1.25rem 0;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-inner h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}
.footer-inner p { font-size: 0.88rem; line-height: 1.8; }
.footer-inner a { color: rgba(255,255,255,0.75); }
.footer-inner a:hover { color: var(--orange); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  padding: 1rem 0;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .tjanster-grid { grid-template-columns: repeat(2, 1fr); }
  .projekt-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-layout { grid-template-columns: 1fr; }
  .gallery-sidebar { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
  .gallery-sidebar h3 { grid-column: 1/-1; }
  .sidebar-links { flex-direction: row; flex-wrap: wrap; }
  .sidebar-link { flex: 1; min-width: 120px; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--grey-mid);
    border-bottom: 3px solid var(--blue);
    flex-direction: column;
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    align-items: stretch;
    z-index: 99;
  }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 0.65rem 0.75rem; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 0.65rem 0.75rem; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--orange);
    border-radius: 0;
    background: var(--grey-light);
    margin-left: 0.75rem;
  }

  .hero-contact { flex-direction: column; }
  .hero-contact .btn { text-align: center; }

  .tjanster-grid { grid-template-columns: 1fr 1fr; }
  .projekt-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-sidebar { display: block; }
  .sidebar-links { flex-direction: column; }

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

  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

@media (max-width: 400px) {
  .tjanster-grid { grid-template-columns: 1fr; }
  .projekt-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}
