/* =========================================================
   Bodafors Skogstjänst AB - Premium + kommenterad CSS
   Ändra färger i :root. Ändra layout i respektive sektion.
   ========================================================= */

:root {
  --bg: #fbf7ed;
  --bg-2: #efe4d0;
  --surface: #ffffff;
  --ink: #18231c;
  --muted: #607066;
  --green-950: #0d2119;
  --green-900: #143428;
  --green-800: #1f4c3a;
  --green-700: #2f6b51;
  --moss: #91a85b;
  --gold: #d9b45f;
  --line: rgba(13, 33, 25, 0.13);
  --shadow: 0 24px 80px rgba(13, 33, 25, 0.16);
  --radius: 28px;
  --max: 1180px;
}

/* Grundregler */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.container { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 18px; top: 18px; z-index: 9999; background: #fff; padding: 10px 12px; border-radius: 12px; }

/* Toppfält och navigation */
.top { background: var(--green-950); color: #e7f0e6; font-size: 0.92rem; }
.top .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding: 8px 0; }
.top a { font-weight: 850; }
.nav { position: sticky; top: 0; z-index: 80; background: rgba(251,247,237,.82); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.nav-inner { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--green-950); font-weight: 950; letter-spacing: -0.035em; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 17px; color: #fff; background: linear-gradient(135deg, var(--green-900), var(--moss)); box-shadow: 0 14px 34px rgba(13,33,25,.24); }
.brand small { display: block; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.links { display: flex; align-items: center; gap: 22px; color: #334139; font-weight: 850; }
.links a:hover { color: var(--green-700); }
.menu { display: none; border: 0; border-radius: 15px; padding: 11px 15px; background: var(--green-900); color: #fff; font-weight: 950; }

/* Knappar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 999px; padding: 13px 20px; font-weight: 950; cursor: pointer; transition: .22s ease; }
.btn-primary { background: var(--green-900); color: #fff; box-shadow: 0 16px 38px rgba(13,33,25,.24); }
.btn-primary:hover { transform: translateY(-2px); background: var(--green-950); }
.btn-light { background: rgba(255,255,255,.8); border-color: var(--line); color: var(--green-900); }
.btn-light:hover { background: #fff; transform: translateY(-2px); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 94px 0 78px; background: radial-gradient(circle at 78% 12%, rgba(145,168,91,.36), transparent 27%), linear-gradient(135deg, #fffaf0, #edf2dc 52%, #d5e2c2); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; background: rgba(47,107,81,.1); border: 1px solid rgba(47,107,81,.18); color: var(--green-700); font-size: .91rem; font-weight: 950; }
.hero h1, .page-hero h1 { margin: 22px 0 20px; color: var(--green-950); font-size: clamp(2.65rem, 6.3vw, 5.8rem); line-height: .92; letter-spacing: -.075em; }
.lead { max-width: 700px; margin: 0 0 28px; color: #425149; font-size: clamp(1.08rem, 2vw, 1.32rem); }
.small-lead { font-size: 1.08rem; }
.large-title { margin-top: 0; color: var(--green-950); font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1; letter-spacing: -.05em; }
.actions { display: flex; flex-wrap: wrap; gap: 13px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
.trust-card { padding: 16px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 22px; }
.trust-card strong { display: block; color: var(--green-950); font-size: 1.12rem; }
.trust-card span { color: var(--muted); font-size: .91rem; }
.hero-visual { position: relative; min-height: 540px; overflow: hidden; border: 1px solid rgba(255,255,255,.72); border-radius: 40px; background: linear-gradient(160deg, rgba(13,33,25,.12), rgba(13,33,25,.82)), url('images/hero.jpg'), url('forest.svg'); background-position: center; background-size: cover; box-shadow: var(--shadow); }
.hero-badge { position: absolute; top: 24px; right: 24px; padding: 12px 15px; background: rgba(255,255,255,.86); border: 1px solid rgba(255,255,255,.7); border-radius: 999px; color: var(--green-950); font-weight: 950; backdrop-filter: blur(12px); }
.visual-card { position: absolute; right: 28px; bottom: 28px; left: 28px; padding: 24px; background: rgba(251,247,237,.91); border: 1px solid rgba(255,255,255,.72); border-radius: 28px; backdrop-filter: blur(16px); }
.visual-card h2 { margin: 0 0 8px; color: var(--green-950); font-size: 1.28rem; }
.visual-card p { margin: 0; color: #4c5a52; }

/* Generella sektioner */
.section { padding: 96px 0; }
.alt { background: var(--bg-2); }
.page-hero { padding: 70px 0; background: linear-gradient(135deg, #edf2dc, #fffaf0); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 36px; }
.section-head h2 { margin: 0; color: var(--green-950); font-size: clamp(2rem, 4.2vw, 3.55rem); line-height: 1; letter-spacing: -.055em; }
.section-head p { max-width: 575px; margin: 0; color: var(--muted); }
.cards, .process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card, .step { position: relative; overflow: hidden; padding: 27px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 36px rgba(13,33,25,.06); transition: .22s ease; }
.card:hover, .step:hover { transform: translateY(-4px); box-shadow: 0 20px 55px rgba(13,33,25,.11); }
.card::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--green-700), var(--moss), var(--gold)); }
.icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 19px; background: #edf3df; font-size: 1.5rem; }
.card h3, .step h3 { margin: 0 0 10px; color: var(--green-950); }
.card p, .step p { margin: 0; color: #58675f; }
.step-number { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 12px; background: var(--green-900); color: #fff; font-weight: 950; }
.split { display: grid; grid-template-columns: .92fr 1.08fr; gap: 46px; align-items: center; }
.panel-img { position: relative; min-height: 480px; border-radius: 38px; background: linear-gradient(160deg, rgba(13,33,25,.88), rgba(47,107,81,.35)), url('images/skogvard.jpg'), url('forest.svg'); background-position: center; background-size: cover; box-shadow: var(--shadow); }
.panel-img::after { content: 'Skogsvård med precision'; position: absolute; left: 30px; bottom: 30px; color: #fff; font-size: 2rem; font-weight: 950; letter-spacing: -.05em; }
.ticks { display: grid; gap: 13px; margin-top: 24px; }
.tick { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; background: #fff; border: 1px solid var(--line); border-radius: 19px; }
.check { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 999px; background: var(--moss); color: #fff; font-weight: 950; }

/* Maskinpark */
.machine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.machine { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 12px 36px rgba(13,33,25,.06); transition: .22s ease; }
.machine:hover { transform: translateY(-4px); }
.machine-img { height: 190px; background: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('forest.svg'); background-position: center; background-size: cover; }
.machine-content { padding: 23px; }
.machine h3 { margin: 0 0 8px; color: var(--green-950); }
.machine p { margin: 0; color: #58675f; }
.img-bear { background-image: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('images/Ponsse_Bear.jpg'), url('forest.svg'); }
.img-scorpion { background-image: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('images/Ponsse_scorpion.jpg'), url('forest.svg'); }
.img-jd { background-image: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('images/1070.jpg'), url('forest.svg'); }
.img-vimek { background-image: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('images/VIMEK.jpg'), url('forest.svg'); }
.img-komatsu { background-image: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('images/835_1.jpg'), url('forest.svg'); }
.img-elephant { background-image: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('images/Ponsse_elephant.jpg'), url('forest.svg'); }
.img-volvofh16 { background-image: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('images/Volvo_FH16_med_VM-trailer.jpg'), url('forest.svg'); }
.img-giant { background-image: linear-gradient(160deg, rgba(13,33,25,.25), rgba(13,33,25,.08)), url('images/Ponsse_Giant.jpg'), url('forest.svg'); }

/* Kvalitet och certifieringar */
.quality { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 44px; color: #fff; background: linear-gradient(135deg, var(--green-950), var(--green-700)); border-radius: 40px; box-shadow: var(--shadow); }
.quality h2 { margin: 0 0 14px; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; letter-spacing: -.055em; }
.quality p { margin: 0; color: #dfeadd; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { padding: 10px 14px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.12); font-weight: 850; }

/* Dynamiskt galleri */
.gallery-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.filter-btn { border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px; background: #fff; color: var(--green-900); font: inherit; font-weight: 900; cursor: pointer; transition: .2s ease; }
.filter-btn:hover, .filter-btn.active { background: var(--green-900); color: #fff; transform: translateY(-1px); }
.dynamic-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dynamic-gallery-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 30px; box-shadow: 0 12px 36px rgba(13,33,25,.06); transition: .22s ease; }
.dynamic-gallery-card:hover { transform: translateY(-4px); box-shadow: 0 20px 55px rgba(13,33,25,.12); }
.dynamic-gallery-card img { width: 100%; height: 250px; object-fit: cover; background: #dfe9d1; }
.dynamic-gallery-content { padding: 22px; }
.gallery-label { display: inline-flex; margin-bottom: 10px; padding: 6px 10px; border-radius: 999px; background: #edf3df; color: var(--green-800); font-size: .83rem; font-weight: 950; text-transform: capitalize; }
.dynamic-gallery-content h3 { margin: 0 0 8px; color: var(--green-950); }
.dynamic-gallery-content p { margin: 0; color: #58675f; }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 24px; }
.box { padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 32px; box-shadow: 0 12px 36px rgba(13,33,25,.06); }
.box h2 { margin-top: 0; color: var(--green-950); }
.phones { display: grid; gap: 10px; }
.phone-row { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.phone-row a { color: var(--green-800); font-weight: 950; }
.form { display: grid; gap: 12px; }
.form input, .form select, .form textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; font: inherit; }
.form textarea { min-height: 140px; resize: vertical; }
.note { padding: 14px; background: #f4efdf; border: 1px solid var(--line); border-radius: 18px; color: #58675f; }
.map-card { margin-top: 18px; overflow: hidden; padding: 22px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(135deg, #dfe9d1, #f7f0df); }

/* Flytande knappar och sidfot */
.floating-cta { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; gap: 10px; }
.floating-cta a { padding: 13px 16px; border-radius: 999px; background: var(--green-900); color: #fff; font-weight: 950; box-shadow: 0 12px 34px rgba(13,33,25,.25); }
.footer { padding: 46px 0; background: #0b1d16; color: #dbe8dc; }
.footer-grid { display: grid; grid-template-columns: 1.25fr .75fr .75fr; gap: 28px; }
.footer a { color: #fff; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.muted { color: #8fa196; }

/* Scrollanimering */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Responsiv design */
@media (max-width: 980px) {
  .links { display: none; position: absolute; top: 86px; left: 20px; right: 20px; flex-direction: column; align-items: flex-start; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
  .links.open { display: flex; }
  .menu { display: inline-flex; }
  .hero-grid, .split, .quality, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 410px; }
  .cards, .machine-grid, .process, .dynamic-gallery { grid-template-columns: 1fr 1fr; }
  .section-head { display: block; }
  .trust { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 28px, var(--max)); }
  .top .container { display: block; }
  .nav-inner { height: 72px; }
  .brand { font-size: .95rem; }
  .brand-mark { width: 43px; height: 43px; }
  .hero { padding: 68px 0; }
  .hero h1, .page-hero h1 { font-size: clamp(2.45rem, 14vw, 4rem); }
  .cards, .machine-grid, .process, .dynamic-gallery { grid-template-columns: 1fr; }
  .hero-visual { min-height: 360px; border-radius: 30px; }
  .visual-card { left: 18px; right: 18px; bottom: 18px; }
  .dynamic-gallery-card img { height: 220px; }
  .phone-row { display: block; }
  .quality { padding: 28px; }
  .floating-cta { left: 12px; right: 12px; bottom: 12px; }
  .floating-cta a { flex: 1; text-align: center; }
  .footer { padding-bottom: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* Social delning och Facebook-liknande sida-kort på startsidan. */
.social-section {
  padding-top: 76px;
  padding-bottom: 76px;
  background: linear-gradient(135deg, rgba(145, 168, 91, 0.12), rgba(255, 255, 255, 0));
}

.social-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  align-items: stretch;
}

.social-panel,
.fb-page-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: 0 12px 36px rgba(13, 33, 25, 0.07);
}

.social-panel {
  padding: 30px;
}

.social-panel h2 {
  margin: 18px 0 12px;
  color: var(--green-950);
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.social-panel p {
  max-width: 620px;
  margin: 0;
  color: #58675f;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
  transition: 0.2s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  filter: brightness(0.96);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.x { background: #111111; }
.share-btn.linkedin { background: #0a66c2; }

.fb-page-card {
  overflow: hidden;
  align-self: stretch;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 188px;
}

.fb-page-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: #fff;
}

.fb-thumb {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: linear-gradient(160deg, rgba(13, 33, 25, 0.1), rgba(13, 33, 25, 0.25)), url('images/ponsse-scorpion.jpg'), url('forest.svg');
  background-position: center;
  background-size: cover;
}

.fb-title {
  display: inline-block;
  color: #244b9b;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.15;
}

.fb-title:hover {
  text-decoration: underline;
}

.fb-followers {
  margin-top: 2px;
  color: #111;
  font-size: 0.92rem;
}

.fb-page-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  background: #f4f4f4;
  border-top: 1px solid #ddd;
}

.fb-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #d7d9de;
  border-radius: 3px;
  background: #fff;
  color: #333;
  font-size: 0.86rem;
  font-weight: 800;
}

.fb-action:hover {
  background: #f7f7f7;
}

@media (max-width: 980px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .social-section {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .social-panel,
  .fb-page-card {
    border-radius: 24px;
  }

  .share-buttons,
  .fb-page-actions {
    flex-direction: column;
  }

  .share-btn,
  .fb-action {
    width: 100%;
  }
}


/* Justering: mindre Facebook-liknande kort på startsidan. */
.fb-page-card-small {
  max-width: 360px;
  justify-self: end;
  min-height: 138px;
}

.fb-page-card-small .fb-page-top {
  padding: 12px;
}

.fb-page-card-small .fb-thumb {
  width: 42px;
  height: 42px;
}

.fb-page-card-small .fb-title {
  font-size: 1rem;
}

.fb-page-card-small .fb-followers {
  font-size: 0.82rem;
}

.fb-page-card-small .fb-page-actions {
  padding: 8px 10px;
}

.fb-page-card-small .fb-action {
  min-height: 27px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .fb-page-card-small {
    justify-self: stretch;
    max-width: none;
  }
}


/* Företagets logotyp
   Logotypens skogsillustration används som symbol i header och footer.
   Texten bredvid ligger kvar i HTML så den blir läsbar och responsiv. */
.brand-mark {
  overflow: hidden;
  background: #ffffff !important;
  border: 1px solid rgba(13, 33, 25, 0.12);
  box-shadow: 0 10px 30px rgba(13, 33, 25, 0.16) !important;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 4px;
}

.footer .brand-mark {
  background: rgba(255, 255, 255, 0.94) !important;
}

/* Gör företagsnamnet bredvid logotypen mer kompakt och premiumanpassat. */
.brand > span:last-child {
  line-height: 1.05;
}

/* Använd företagets logotyp även i Facebook-liknande kortet. */
.fb-thumb {
  background: #ffffff url('logo-bodafors-mark-gray.png') center / contain no-repeat !important;
}


/* Logotypjustering: svartvit version och mer framträdande placering. */
.brand {
  gap: 14px;
}

.brand-mark-prominent,
.brand-mark {
  width: 64px !important;
  height: 64px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1px solid rgba(13, 33, 25, 0.14) !important;
  box-shadow: 0 14px 38px rgba(13, 33, 25, 0.18) !important;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-name {
  display: block;
  color: var(--green-950);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 1.18rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.footer-brand-text .brand-name {
  color: #ffffff;
}

/* Facebook-kortet använder också den svartvita logomarkeringen. */
.fb-thumb {
  background: #ffffff url('logo-bodafors-mark-gray.png') center / contain no-repeat !important;
}

@media (max-width: 980px) {
  .brand-mark-prominent,
  .brand-mark {
    width: 56px !important;
    height: 56px !important;
  }
  .brand-name {
    font-size: 1.05rem;
  }
}

@media (max-width: 640px) {
  .brand {
    gap: 10px;
  }
  .brand-mark-prominent,
  .brand-mark {
    width: 48px !important;
    height: 48px !important;
    border-radius: 16px !important;
  }
  .brand-name {
    max-width: 180px;
    white-space: normal;
    font-size: 0.98rem;
    line-height: 1.05;
  }
}


/* Logotypjustering: riktig gråskala i stället för platt svartvit konvertering. */
.brand-mark-prominent,
.brand-mark {
  background: #f7f7f3 !important;
}

.fb-thumb {
  background: #f7f7f3 url('logo-bodafors-mark-gray.png') center / contain no-repeat !important;
}
