/* ------------------------------
   GLOBAL
------------------------------ */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700&display=swap");

:root {
  --primary: #333;
  --primary-hover: #000;
  --dark-bg: #f5f6f8;
  --text-dark: #222;
  --text-light: #555;
  --card-bg: #ffffff;
  --border-color: #ddd;
  --accent: #F2C811; 

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-dark);
}

/* ------------------------------
   HEADER
------------------------------ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 1100;
}

header .logo {
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1.2rem;
  text-decoration: none;
}

header ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

header ul li a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

header ul li a:hover {
  color: var(--primary-hover);
}

/* ------------------------------
   HERO
------------------------------ */
.hero-section {
  background-color: var(--dark-bg);
  text-align: center;
  padding: 140px 20px 80px;
}

.hero-section h3 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-section__desc {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-light);
}

.hero-section__tagline {
  margin-top: 20px;
  font-size: 1rem;
  color: var(--text-light);
}

.social-icons {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 30px 0 20px;
}

.social-icons li a {
  color: var(--text-dark);
  font-size: 1.3rem;
  border: 1px solid var(--border-color);
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icons li a:hover {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ------------------------------
   BUTTONS
------------------------------ */
.btn {
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

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

.btn.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-dark-outlined {
  background-color: transparent;
  border: 1px solid var(--text-dark);
  color: var(--text-dark);
}

.btn-dark-outlined:hover {
  background-color: var(--text-dark);
  color: #fff;
}

/* ------------------------------
   ABOUT
------------------------------ */
.about-section {
  padding: 80px 20px;
  text-align: center;
  background-color: #fff;
}

.about-content {
  max-width: 700px;
  margin: 0 auto;
}

.about-content .btn {
  margin-top: 40px;
}

.about-content h2 span {
  color: var(--text-dark);
}

.about-content p {
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 20px;
}

/* ------------------------------
   SERVICES
------------------------------ */
.services-section {
  background-color: var(--dark-bg);
  padding: 80px 20px;
  text-align: center;
}

.services-section h2 span {
  color: var(--text-dark);
}

.services-list {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 30px auto;
  text-align: left;
}

.services-list li {
  margin: 12px 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark);
  transition: transform 0.2s ease;
}

.services-list li:hover {
  transform: translateX(6px);
}

.services-list li i {
  color: var(--accent);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.services-note {
  margin-top: 30px;
  font-size: 1.05rem;
  color: var(--text-light);
  font-style: italic;
}

/* ------------------------------
   PROJECTS
------------------------------ */
.projects-section {
  background-color: #fff;
  padding: 80px 20px;
  text-align: center;
}

.projects-section h2 span {
  color: var(--text-dark);
}

.projects-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
}

.projects-card-box {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 2rem;
  width: 300px;
  padding: 20px;
  text-align: left;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-card-box:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.projects-card-box__icons i {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.projects-card-box__desc h4 {
  font-size: 1.2rem;
  margin: 10px 0 8px;
}

.projects-card-box__desc p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.projects-card-box__desc img {
  margin-top: 15px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  transition: transform 0.4s ease;
  transform-origin: center center;
}

.projects-card-box:hover .projects-card-box__desc img {
  transform: scale(1.15);
}

/* ------------------------------
   CONTACT
------------------------------ */
.contact-section {
  background-color: var(--dark-bg);
  padding: 100px 20px;
  text-align: center;
  width: 100vw;
  position: relative; 
  left: 50%;
  margin-left: -50vw;
  margin-top: 80px;
}

.contact-inner {
  max-width: 800px;
  margin: 0 auto;
}

.contact__links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  display: inline-block;
  margin: 5px 0;
}

.contact__links a:hover {
  text-decoration: underline;
}

/* ------------------------------
   FOOTER
------------------------------ */
footer {
  background-color: #fff;
  color: var(--text-light);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}

footer a {
  color: var(--text-dark);
  text-decoration: underline;
}

/* ------------------------------
   ARTICLES
------------------------------ */
.articles-section {
  padding: 6rem 2rem 4rem 2rem;
  text-align: center;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem auto;
  align-items: start;
  max-width: 1600px;
  width: 100%;
}

.article-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.article-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  width: max-content;
}

/* Tag färger */
.article-tag.dax {
  background-color: #fef08a;
  color: #92400e;
}

.article-tag.filter {
  background-color: #fde68a;
  color: #92400e;
}

.article-tag.prestanda {
  background-color: #dbeafe;
  color: #3730a3;
}

.article-tag.modellering {
  background-color: #bbf7d0;
  color: #065f46;
}

.article-card h3 {
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  color: #111;
  text-decoration: none;
}

.article-card h3 a:hover {
  text-decoration: underline;
}

.article-date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.article-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}


.articles-grid {
  align-items: stretch; 
}


.article-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start; 
  height: 100%;
}


.article-card .btn {
  align-self: flex-start; 
  margin-top: auto; 
}

/* ------------------------------
   HERO UPGRADE
------------------------------ */
.hero-section {
  background: linear-gradient(180deg, #f5f6f8 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

.hero-section h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.hero-section h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* ------------------------------
   SCROLL ANIMATIONS
------------------------------ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------
   HOVER EFFECTS
------------------------------ */
.btn.btn-primary {
  background-color: var(--primary);
  color: #fff;
  transition: all 0.3s ease;
}

.btn.btn-primary:hover {
  background-color: var(--accent);
  color: #111;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.article-card h3 a:hover,
.projects-card-box__desc h4:hover {
  color: var(--accent);
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

main.article-page {
  padding: 10rem 2rem 4rem;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.75;
  text-align: center;
}


main.article-page .article-hero h1 {
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 2rem;
  color: #111;
  letter-spacing: -0.3px;
  position: relative;
  display: inline-block;
}

main.article-page .article-hero h1::after {
  content: "";
  display: block;
  width: 100px;
  height: 3px;
  background-color: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
  opacity: 0.9;
}


main.article-page .article-date {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 2rem;
}


main.article-page .article-content h2,
main.article-page .article-content h3 {
  margin: 2.5rem auto 1rem;
  font-weight: 600;
  color: #111;
  display: inline-block;
  position: relative;
  text-align: center;
}

main.article-page .article-content h2 {
  font-size: 1.4rem;
}

main.article-page .article-content h3 {
  font-size: 1.2rem;
}

main.article-page .article-content h2::after,
main.article-page .article-content h3::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  margin: 8px auto 0;
  background: repeating-linear-gradient(
    to right,
    var(--accent),
    var(--accent) 5px,
    transparent 5px,
    transparent 10px
  );
  border-radius: 1px;
  opacity: 0.9;
}


main.article-page .article-content {
  text-align: center;
}

main.article-page .article-content p,
main.article-page .article-content ul {
  max-width: 680px;
  margin: 0.75rem auto;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text-dark);
}

main.article-page .article-content ul {
  padding-left: 0;
  list-style-position: inside;
}

main.article-page .article-content li {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  line-height: 1.65;
  text-align: center;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  z-index: 1100; 
  position: relative;
}

/* ===========================
   MOBILMENY
=========================== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  @media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }


.helskärmbild {
  display: block;
  max-width: 600px;
  width: 100%;
  height: auto;
  margin: 2rem auto;
}
}

  nav {
    position: fixed;
    top: 0;
    right: -260px;
    height: 100%;
    width: 240px;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease-in-out;
    z-index: 1200; 
  }

  nav.active {
    right: 0;
  }

  nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 4rem 2rem;
    margin: 0; 
    list-style: none;
  }

  nav ul li {
    text-align: left;
  }

  nav ul li a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
  }
}

/* ===========================
   DESKTOP HOVER-EFFEKT
=========================== */
@media (min-width: 769px) {
  nav ul li a {
    transition: color 0.3s ease;
  }

  nav ul li a:hover {
    color: var(--accent); /* guldhover */
  }
}

/* ===========================
   OVERLAY
=========================== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000; 
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}


.h1-style {
  font-family: var(--heading-font); 
  font-size: 2.5rem; 
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.solution-btn {
  margin-top: 1rem; /* Justerar luft mellan text/taggar och knappen */
}

.tags {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem; /* detta skapar mer luft ner mot texten */
}

.tag {
  display: inline-block;
  background-color: #f2f2f2;
  color: black;
  padding: 3px 8px;
  margin-right: 5px;
  margin-bottom: 5px;
  font-size: 0.75rem;
  border-radius: 3px;
  font-weight: 500;
}

.article-hero h1,
.dax-hero h2 {
  font-size: 2.8rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #1f2937, #6b7280);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.article-hero p,
.dax-hero p {
  font-size: 1.1rem;
  color: #6b7280;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem auto;
}

.dax-hero {
  padding-top: 5rem;
  padding-bottom: 2rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 4rem;
}

.card-tag {
  background-color: #f3f4f6;
  color: #374151;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  display: inline-block;
  margin-right: 0.4rem;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.dax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  align-items: stretch;
}

.dax-card-grid {
  align-items: stretch; /* Så att alla kort får samma höjd */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.dax-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Viktigt för att hålla knappen i botten */
  height: 100%;
}

.dax-card h3 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #111827;
  border-bottom: 2px solid #facc15; /* gul linje */
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.dax-card p {
  flex-grow: 1; /* Gör att texten tar plats men inte knappen */
}

.projects-card-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Container för text + bild */
.projects-card-box__desc {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Låt textdelen ta all "extra" höjd */
.projects-card-box__desc p {
  flex-grow: 1;
}

/* Bilden hamnar alltid efter texten, strax ovanför knappen */
.projects-card-box__desc img {
  margin-top: 1.5rem;      /* justera upp/ned tills det känns rätt */
  max-height: 160px;
  width: 100%;
  object-fit: contain;
}

/* Knappen alltid längst ned i kortet */
.projects-card-box a.btn {
  margin-top: 1.5rem;      /* luft mellan bild och knapp */
}
