/* ================================
   RESET / BAS
==================================*/
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  color: #fff;
  text-align: center;
  min-height: 100vh;

  /* GLOBAL BAKGRUND (undersidor + startsidan) */
  background:
    linear-gradient(rgba(0,0,0,0.90), rgba(0,0,0,0.95)),
    url("bg_robot.png") center/cover fixed no-repeat;
}

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

a, button {
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #ff3030;
}

/* ================================
   GLOBAL KONTAKT-KNAPP (ALLTID UPPE)
==================================*/
.topbar-fixed {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

.contact-link {
  background: #d10000;
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  border: 2px solid #b00000;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  white-space: nowrap;
}

.contact-link:hover {
  background: #ff3030;
  transform: translateY(-2px);
}

/* ================================
   STARTSIDA: HERO (HEADER)
   - bakgrundsbild bg_robot.png
   - logga centrerad
   - 10rem från top
==================================*/

/* STARTSIDANS HERO-HEADER */
header.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  background:
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.75)),
    url("bg_robot.png") center/cover no-repeat;
  display: flex;
  align-items: flex-start; /* Börjar uppifrån */
  justify-content: center;
}

/* Logga centrerad 10rem från top */
.hero-logo-wrap {
  margin-top: 10rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

.hero-logo {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.6));
}

body.index-page header {
  position: relative;
  height: 100vh; /* som innan */
  width: 100%;

  background:
    linear-gradient(rgba(0,0,0,0.40), rgba(0,0,0,0.55)),
    url("bg_robot.png") center/cover no-repeat;

  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* LOGGA I HERO */
body.index-page .header-overlay {
  position: absolute;
  top: 10rem;           /* enligt önskemål */
  left: 50%;
  transform: translateX(-50%);

  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  padding: 0.6rem 1rem;
  border-radius: 15px;
  box-shadow: 0 0 18px rgba(0,0,0,0.5);

  display: flex;
  justify-content: center;
  align-items: center;
}

body.index-page .header-overlay .logo {
  width: 100px;   
  height: auto;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.6));
}

/* Mobilanpassning */
@media (max-width: 600px) {
  body.index-page .header-overlay .logo {
    width: 70px;
  }
}

/* ================================
   INTRO (texten under hero)
==================================*/
.intro {
  max-width: 850px;
  margin: 3rem auto 1rem;
  padding: 0 1.5rem;
  color: #ccc;
  font-size: 1.1rem;
  line-height: 1.6;
}

.intro strong {
  color: #fff;
}

/* ================================
   KNAPP-KORT (KAP, CNC, PLC, CAD)
==================================*/
.buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
  row-gap: 3rem;
  padding: 5rem 8rem;

  background:
    linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.85)),
    url("bg_robot.png") center/cover fixed no-repeat;

  backdrop-filter: blur(4px);
  border-top: 2px solid #d10000;
  border-bottom: 2px solid #d10000;
}

.button-card-link {
  width: 430px;
  max-width: 100%;
  display: block;
  border-radius: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.button-card-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 35px rgba(209,0,0,0.6);
}

.button-card {
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.button-card h3 {
  margin: 0;
  padding: 1rem 0;
  font-size: 1.6rem;
}

.button-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.button-card .card-content {
  padding: 1.2rem 1.2rem 0;
}

.button-card p {
  color: #ccc;
  font-size: 1rem;
  text-align: left;
}

.button-card button {
  width: 100%;
  background: #d10000;
  color: #fff;
  padding: 1rem;
  border: none;
  font-weight: bold;
  font-size: 1.1rem;
}

.button-card button:hover {
  background: #a80000;
}

/* ================================
   UNDERSIDOR HEADER + NAV
   (Hamburgarmeny)
==================================*/
.inner-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(16,16,16,0.85);
  backdrop-filter: blur(6px);
  padding: 0.8rem 2rem 0.8rem 0;
  border-bottom: 2px solid #d10000;
  border-top: 1px solid #d10000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inner-header img {
  height: 70px;
  width: auto;
}

/* ...resten av menyn samma som tidigare (ej ändrat) ... */

/* ================================
   RESPONSIVT
==================================*/
@media (max-width: 900px) {
  .buttons {
    grid-template-columns: 1fr;
    padding: 3rem 1.25rem 4rem;
  }
}
