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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* KatapultNRG sektion */
.katapult-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0f1f0f 0%, #1a3320 50%, #0d1f15 100%);
    color: white;
}

.katapult-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.katapult-logo-wrap {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(249,115,22,0.3);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
}

.katapult-logo-wrap img {
    max-width: 100%;
    height: auto;
}

.katapult-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.katapult-text .platform-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.katapult-text p {
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.katapult-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.katapult-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.katapult-feature-item span.icon {
    color: #f97316;
}

.katapult-cta {
    display: inline-block;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.katapult-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(249,115,22,0.4);
}

.katapult-cta-sekundar {
    display: inline-block;
    margin: 0.5rem 0 0 1.2rem;
    color: #fdba74;
    font-weight: 600;
    text-decoration: none;
}

.katapult-cta-sekundar:hover { text-decoration: underline; }

.katapult-text strong { color: white; }

@media (max-width: 768px) {
    .katapult-inner { grid-template-columns: 1fr; gap: 2rem; }
    .katapult-features { grid-template-columns: 1fr; }
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.svg-container {
    width: 33.33%;
    max-width: 100%;
    margin: -40px auto;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: #000;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #007bff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(10,40,20,0.70) 0%, rgba(5,20,10,0.65) 100%),
        url('./hero.jpg') center/cover no-repeat;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* SEO: h1 behåller stil men är nu semantiskt korrekt */
.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: 3px;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.cta-button:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about {
    padding: 5rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    width: 50px;
    height: 3px;
    background: #007bff;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.feature {
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    background-color: #1b2a3d;
    background-size: cover;
    background-position: center;
    color: white;
}

/* Mörk toning över fotot — utan den blir texten oläslig mot
   ljusa partier i bilden. */
.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg, rgba(12,28,48,0.45) 0%, rgba(8,20,36,0.78) 55%, rgba(5,14,26,0.88) 100%);
}

.feature > * {
    position: relative;
    z-index: 1;
}

.feature h3 {
    color: white;
}

.feature p {
    color: rgba(255,255,255,0.82);
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-foto-ai { background-image: url('./modbusOscilloskop.jpg'); }
.feature-foto-oppen { background-image: url('./kort-open-source.jpg'); }
.feature-foto-el { background-image: url('./kort-elbehorighet.jpg'); }
.feature-foto-imd { background-image: url('./piigabElvaco.jpg'); }
.feature-foto-kom { background-image: url('./driftsättnBeckhoff.jpg'); }

.feature-icon {
    width: 60px;
    height: 60px;
    background: #007bff;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Team Section */
.team {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.team-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-8px);
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    object-fit: cover;
    border: 4px solid #007bff;
}

.team-avatar-ai {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    border: 4px solid #007bff;
}

.team-card h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 0.3rem;
}

.team-role {
    color: #007bff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: block;
}

.team-bio {
    color: #666;
    line-height: 1.7;
    font-size: 0.95rem;
}

.ai-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

/* Services Section */
.services {
    padding: 5rem 0;
    /* Ljus slöja över fotot så de vita tjänstekorten fortfarande
       har kontrast mot bakgrunden. */
    background:
        linear-gradient(135deg, rgba(245,247,250,0.84) 0%, rgba(195,207,226,0.82) 100%),
        url('./bg-tjanster.jpg') center/cover no-repeat;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid #007bff;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

/* Projects Gallery Section */
.projects {
    padding: 5rem 0;
    background: white;
}

.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 3rem auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,123,255,0.1) 0%, rgba(102,126,234,0.1) 100%);
}

/* SEO: bildtexter i karusellen */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #007bff;
    transform: scale(1.2);
}

.project-caption {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-style: italic;
}

.contact {
    padding: 5rem 0;
    background: #333;
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

.submit-btn {
    background: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: #000;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1.1rem; }
    .hero-content { padding: 0 1.5rem; max-width: 100%; }
    .about-content,
    .contact-content { grid-template-columns: 1fr; gap: 2rem; }
    .about-features { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; letter-spacing: 1px; }
    .hero p { font-size: 1rem; }
    .hero-content { padding: 0 1rem; }
}

html { scroll-behavior: smooth; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.8s ease forwards; }

/* ==========================================================================
   Undersidor (tjänstesidor m.fl.) — genereras av build.py
   ========================================================================== */

/* Sidhuvudet under den fasta menyraden, som är 128 px hög vid alla bredder
   (uppmätt 320–1280 px). 10rem = 160 px ger 32 px luft under den. */
.sidhuvud {
    padding: 10rem 0 3rem;
    background:
        linear-gradient(135deg, rgba(12,28,48,0.82) 0%, rgba(8,20,36,0.90) 100%),
        url('./hero.jpg') center/cover no-repeat;
    color: white;
}

/* Den globala nav-regeln ovan (flex + space-between) är till för menyraden
   och skulle annars sprida ut brödsmulorna över hela bredden. */
.brodsmulor {
    display: block;
    padding: 0;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    color: rgba(255,255,255,0.7);
}

.brodsmulor a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

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

.sidhuvud h1 {
    font-size: 2.6rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    max-width: 820px;
}

.ingress {
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 760px;
    color: rgba(255,255,255,0.88);
}

.tjanst {
    padding: 4rem 0 5rem;
    background: white;
}

.tjanst-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 4rem;
    align-items: start;
}

.tjanst-text h2 {
    font-size: 1.6rem;
    color: #333;
    margin: 2.5rem 0 1rem;
}

.tjanst-text h2:first-child { margin-top: 0; }

.tjanst-text p,
.tjanst-text li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

.tjanst-text p { margin-bottom: 1rem; }

.tjanst-text ul,
.tjanst-text ol {
    margin: 0 0 1rem 1.4rem;
}

.tjanst-text li { margin-bottom: 0.5rem; }

.tjanst-text strong { color: #333; }

.tjanst-text a { color: #007bff; }

.tjanst-sida {
    position: sticky;
    top: 7rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tjanst-sida img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cta-ruta {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4ebf5 100%);
    border-top: 4px solid #007bff;
    border-radius: 15px;
    padding: 1.8rem;
}

.cta-ruta h2 {
    font-size: 1.25rem;
    color: #333;
    margin-bottom: 0.6rem;
}

.cta-ruta p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

/* Grundknappen är vit och genomskinlig för det mörka hero-fotot och
   försvinner på ljus botten — sidokolumnen får en solid variant. */
.tjanst-sida .cta-button {
    display: block;
    text-align: center;
    background: #007bff;
    border-color: #007bff;
    color: white;
    font-weight: 600;
    backdrop-filter: none;
}

.tjanst-sida .cta-button:hover {
    background: #0062cc;
    border-color: #0062cc;
    color: white;
}

.cta-ruta .cta-button { margin-bottom: 1rem; }

.cta-ruta .kontaktrad {
    font-size: 0.95rem;
    color: #555;
    margin: 0.3rem 0;
}

.cta-ruta .kontaktrad a { color: #007bff; text-decoration: none; }

.relaterat h2 {
    font-size: 1.05rem;
    color: #333;
    margin-bottom: 0.8rem;
}

.relaterat ul { list-style: none; }

.relaterat li { border-bottom: 1px solid #e9ecef; }

.relaterat a {
    display: block;
    padding: 0.6rem 0;
    color: #007bff;
    text-decoration: none;
}

.relaterat a:hover { padding-left: 0.3rem; transition: padding 0.2s ease; }

/* "Läs mer" på tjänstekorten, både på startsidan och på tjänsteöversikten */
.service-card .las-mer {
    display: inline-block;
    margin-top: 1rem;
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
}

.service-card .las-mer:hover { text-decoration: underline; }

a.service-card-lank {
    color: inherit;
    text-decoration: none;
    display: block;
}

@media (max-width: 900px) {
    .tjanst-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .tjanst-sida { position: static; }
    .sidhuvud h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .sidhuvud h1 { font-size: 1.6rem; }
    .ingress { font-size: 1.05rem; }
}

/* ==========================================================================
   Mobilmeny — länkraden döljs under 768 px (se regeln längre upp)
   ========================================================================== */

.meny-knapp {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.meny-knapp span {
    display: block;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Tre streck blir ett kryss när menyn är öppen. */
.meny-knapp[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.meny-knapp[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.meny-knapp[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 768px) {
    .meny-knapp { display: flex; }

    .nav-links.oppen {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 0.5rem 20px 1rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.oppen a {
        display: block;
        padding: 0.9rem 0;
        border-bottom: 1px solid #eee;
        font-size: 1.05rem;
    }

    .nav-links.oppen li:last-child a { border-bottom: none; }

    /* Understrykningsanimationen är gjord för den horisontella raden. */
    .nav-links.oppen a::after { display: none; }
}
