/* CSS Variables */
:root {
    /* Primary Colors */
    --color-background: #0a192f;
    --color-primary: #ff6b35;
    --color-primary-hover: #ff5722;
    --color-secondary: #4ecdc4;

    /* Text Colors */
    --color-text: #ffffff;
    --color-text-secondary: #a8b2d1;

    /* Background Colors */
    --color-background-light: rgba(255, 255, 255, 0.08);
    --color-background-light-hover: rgba(255, 255, 255, 0.12);
    --color-background-extra-light: rgba(255, 255, 255, 0.2);
    --color-footer: #112240;

    /* Accent Colors */
    --color-primary-transparent: rgba(255, 107, 53, 0.15);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-accent-glow: rgba(255, 107, 53, 0.4);

    /* Scroll Padding */
    --scroll-padding: 100px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--scroll-padding);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* Increased padding from 20px to 40px */
}

/* Header styles */
.header-background {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

header {
    padding: 25px 0;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--color-primary), var(--color-secondary), transparent) 1;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;  /* Konsekvent höjd */
}

.logo {
    max-height: 60px;  /* Begränsa höjd */
    width: auto;       /* Bibehåll proportioner */
    object-fit: contain;
}

nav {
    display: flex;
    align-items: center;
}

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

.nav-item {
    margin-left: 20px;
}

.nav-item a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 3px solid transparent;  /* Pre-allocate space to prevent jumping */
}

.nav-item a:hover {
    color: var(--color-primary);
    background: linear-gradient(90deg, var(--color-primary-transparent), transparent);
    border-left-color: var(--color-primary);  /* Just change color, no layout shift */
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: var(--color-text);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.social-icon:hover {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-text);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
    opacity: 0.9;
}

/* Hamburger menu styles */
.hamburger {
    display: none;  /* Dold som standard */
    position: relative;
    top: 0;  /* Eliminera vertikala förskjutningar */
    transform: none;  /* Undvik oavsiktliga transformationer */
}

.hamburger:hover {
    background-color: var(--color-primary-transparent);
}

.main {
    padding-top: 100px; /* Adjusted to account for fixed header */
    padding-bottom: 40px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-text);
}

/* Hero section styles */
.hero-background {
    background-color: var(--color-background);
}

/* Main hero background (for index.html) - Gradient with subtle background */
.main-hero-background {
    background:
        linear-gradient(135deg,
            rgba(10, 25, 47, 0.88) 0%,
            rgba(17, 34, 64, 0.92) 50%,
            rgba(10, 25, 47, 0.88) 100%
        ),
        url('../images/background_opt.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 500px;
    margin-bottom: 20px;
    width: 100%;
    overflow: hidden;
}

/* Subtle animated gradient overlay for depth */
.main-hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(78, 205, 196, 0.06) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    opacity: 0.7;
    pointer-events: none;
    mix-blend-mode: soft-light;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 20% 50%, 80% 50%;
    }
    50% {
        background-position: 80% 50%, 20% 50%;
    }
}

.hero {
    min-height: 500px; /* Make hero take full viewport height */
    display: flex;
    align-items: center;
    text-align: center;
    padding: 40px 0; /* Reduced from 50px */
    position: relative; /* Add relative positioning */
    z-index: 1; /* Ensure content stays above background */
    background: inherit; /* Ensure the hero section inherits the background */
}

.hero p {
    font-size: 1.2rem; /* Reduced from 1.3rem */
    margin-bottom: 40px; /* Increased from 30px */
    color: var(--color-text-secondary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

/* Blog hero styles */
.blog-hero {
    min-height: 20vh;
}

.blog-hero .hero {
    min-height: 20vh;
    padding: 20px 0;
}

.blog-hero h1 {
    font-size: 2.5rem;
}

.blog-hero p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px; /* Reduced from 20px */
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #ff8c42);
    color: var(--color-text);
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    filter: brightness(1.1);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.6);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}

/* New styles for the "Läs mer" button in blog listing */
.blog-read-more {
    padding: 10px 20px;
    margin-top: 20px;
    font-size: 0.9rem;
}

/* Features section styles */
.features {
    background-color: var(--color-background);
    padding-top: 20px; /* Added padding */
    padding-bottom: 20px; /* Added padding */
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.feature-box {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--color-background-light);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-box:hover {
    background-color: var(--color-background-light-hover);
    border-color: var(--color-primary);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 107, 53, 0.3);
}

.feature-box .icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 8px rgba(255, 107, 53, 0.3));
}

.feature-box h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.feature-box p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
}

.feature-box ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.feature-box li {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.feature-box li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Blog styles */
.blog-posts {
    padding: 40px 0;
    width: 100%;
}

/* Blog listing styles (for blogg.html) */
.blog-posts .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* Increased padding from 20px to 40px */
}

.blog-post {
    width: 97%;
    margin: 2rem auto;
    padding: 1.8rem;
    background-color: var(--color-background-light);
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.blog-post:hover {
    background-color: var(--color-background-light-hover);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.blog-post .blog-post-content {
    display: flex;
    align-items: flex-start;
}

.blog-post .blog-thumbnail {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 20px;
}

.blog-post .blog-text {
    flex: 1;
}

/* New style for blog post titles in the listing */
.blog-post h2 {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

/* Updated styles for post meta information */
.post-meta {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    padding: 5px 10px;
    background-color: var(--color-primary-transparent);
    border-left: 3px solid var(--color-primary);
    display: inline-block;
}

.post-meta i {
    margin-right: 5px;
    color: var(--color-primary);
}

/* Individual blog post styles (for blog-post-template.html) */
.single-blog-post {
    width: 97%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.8rem;
    background-color: var(--color-background-light);
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.single-blog-post:hover {
    background-color: var(--color-background-light-hover);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.blog-title {
    color: var(--color-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-meta {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

.blog-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.blog-content {
    line-height: 1.6;
    color: var(--color-text);
}

.blog-content h2 {
    color: var(--color-primary);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.blog-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.single-blog-post .btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Contact page styles */
main {
    padding: 60px 0;
}

main h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--color-primary);
}

.contact-info {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(78, 205, 196, 0.08));
    border-radius: 16px;
    padding: 35px;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.contact-info::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.4;
    pointer-events: none;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-info i {
    margin-right: 10px;
    color: var(--color-primary);
    font-size: 1.2rem;
}

.contact-info a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--color-primary-hover);
}

.contact-form {
    background-color: var(--color-background-light);
    border-radius: 10px;
    padding: 30px;
}

.contact-form h2 {
    margin-bottom: 20px;
    color: var(--color-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--color-text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-text-secondary);
    border-radius: 5px;
    background-color: var(--color-background-light);
    color: var(--color-text);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.contact-form button {
    background-color: var(--color-primary);
    color: var(--color-text);
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
}

.contact-form button:hover {
    background-color: var(--color-primary-hover);
}

/* "Om mig" sektion */
#about h1 {
    color: var(--color-primary);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.02) 100%);  /* Subtle light gradient */
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.about-content::before {
    display: none;  /* No gradient border needed */
}

/* Removed first duplicate consultant-image definition */

.about-text {
    flex: 1;
    min-width: 350px;
}

.about-text p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.about-content p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Simple about layout without image */
.about-content-simple {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.02) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.02) 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-content-simple p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.about-content-simple p:first-of-type {
    font-size: 1.05rem;
    color: var(--color-text);
    font-weight: 400;
    padding-left: 20px;
    border-left: 4px solid var(--color-primary);
    background: linear-gradient(90deg, rgba(230, 126, 34, 0.1) 0%, transparent 100%);
    padding: 20px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 30px;
}

.about-content-simple p:first-of-type strong {
    color: var(--color-primary);
    font-weight: 500;
}

/* Clients section */
.clients-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.clients-section h3 {
    color: var(--color-text);
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.clients-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.client-badge {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.08) 0%, rgba(78, 205, 196, 0.05) 100%);
    color: var(--color-secondary);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(78, 205, 196, 0.2);
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.client-badge:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: var(--color-secondary);
    box-shadow: 0 6px 16px rgba(78, 205, 196, 0.4);
}

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 40px 0 35px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

#about h1 {
    position: relative;
    font-size: 2.8rem;
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Removed duplicate .about-content definition - consolidated above */

.consultant-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;  /* Circular design */
    object-fit: cover;
    opacity: 0.95;
    border: 3px solid rgba(255, 255, 255, 0.2);  /* Subtle white border */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 107, 53, 0.3);  /* Subtle orange glow */
    transition: all 0.4s ease;
    margin-right: 40px;
    margin-bottom: 30px;
}

.consultant-image:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 107, 53, 0.5);
    filter: brightness(1.05);  /* No movement, just brightness change */
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.about-text p:first-of-type {
    font-size: 1.0rem; /* Reduced from 1.4rem */
    color: var(--color-text);
    font-weight: 400;
    line-height: 1.8;
    position: relative;
    padding-left: 20px;
    border-left: 4px solid var(--color-primary);
    margin-bottom: 30px;
    background: linear-gradient(90deg, 
        rgba(230, 126, 34, 0.1) 0%, 
        transparent 100%);
    padding: 20px;
    border-radius: 0 10px 10px 0;
}

.about-text p:first-of-type strong {
    color: var(--color-primary);
    font-weight: 500;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .about-content {
        flex-direction: column;
        align-items: center;
        padding: 30px 20px;
    }

    .about-content-simple {
        padding: 30px 20px;
    }

    .consultant-image {
        width: 160px;
        height: 160px;
        margin-bottom: 30px;
        margin-right: 0;  /* Center on mobile */
    }

    .hero-stats {
        flex-direction: column;
        gap: 25px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .clients-list {
        justify-content: center;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-text p:first-of-type {
        font-size: 1.1rem;
    }
}

/* Footer styles */
footer {
    margin-top: 0px;
    background-color: var(--color-footer);
    padding: 60px 0 20px;
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 5px; /* Reduced from 10px */
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 3px 8px; /* Reduced from 5px 10px */
    border-radius: 5px;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--color-primary);
    background-color: var(--color-primary-transparent);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.footer-bottom p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* Error message styles */
.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Stilar för h1-rubriker */
h1 {
    margin-top: 60px;
    margin-bottom: 30px;
    color: var(--color-primary);
    position: relative;
    padding-bottom: 15px;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), transparent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.6);
}

/* Stilar för h2-rubriker */
h2 {
    margin-bottom: 30px;
    color: var(--color-primary);
}

/* Justera marginaler för sektioner */
section {
    margin-top: 0;
    margin-bottom: 40px;
}

/* Responsive background images for better performance */
@media screen and (max-width: 768px) {
    .main-hero-background {
        background:
            linear-gradient(135deg,
                rgba(10, 25, 47, 0.88) 0%,
                rgba(17, 34, 64, 0.92) 50%,
                rgba(10, 25, 47, 0.88) 100%
            ),
            url('../images/background_opt_small.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
}

/* Responsive design */
@media screen and (max-width: 1200px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        left: -100%;
        top: 100px;
        gap: 0;
        flex-direction: column;
        background-color: var(--color-background);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        border-top: 4px solid var(--color-background-light);
        border-bottom: 4px solid var(--color-background-light);
    }

    .nav-item {
        margin: 16px 0;
    }

    .nav-links.active {
        left: 0;
    }

    .social-icons {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-logo, .footer-links, .footer-social {
        margin-bottom: 30px;
    }

    .hero h1 {
        font-size: 3rem; /* Adjust font size for medium screens */
    }
}

@media screen and (max-width: 768px) {
    .container,
    .blog-posts .container {
        padding: 0 30px; /* Adjusted padding for smaller screens */
    }

    .hero-container {
        padding: 0 10px;
    }

    .hero {
        padding: 30px 0;
    }

    .hero h1 {
        font-size: 2.5rem; /* Adjust font size for smaller screens */
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 20px;
        margin-bottom: 35px; /* Added specific margin for medium screens */
    }

    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        max-width: 200px;
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .features .container {
        grid-template-columns: 1fr;
    }

    .feature-box {
        max-width: 100%;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        margin-bottom: 15px;
    }

    .blog-post,
    .single-blog-post {
        width: 95%;
        margin-left: auto;
        margin-right: auto;
        border-radius: 10px;
    }

    .blog-post .blog-post-content,
    .single-blog-post .blog-post-content {
        flex-direction: column;
    }

    .blog-post .blog-thumbnail,
    .single-blog-post .blog-thumbnail {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .blog-post .blog-text,
    .single-blog-post .blog-text {
        padding: 0;
    }

    .blog-post,
    .single-blog-post {
        padding: 1.5rem;
    }

    .blog-title {
        font-size: 2rem;
    }

    .contact-form,
    .contact-info {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .container,
    .blog-posts .container {
        padding: 0 20px; /* Further adjusted padding for mobile screens */
    }

    .hero h1 {
        font-size: 2rem; /* Adjust font size for the smallest screens */
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 30px; /* Added specific margin for smaller screens */
    }

    .cta-buttons {
        padding: 0 10px; /* Add padding to ensure buttons stay within the hero section */
    }

    .btn {
        width: 100%;
        max-width: 180px; /* Reduce max-width to ensure buttons fit within the hero section */
    }

    .blog-hero h1 {
        font-size: 1.8rem;
    }

    .blog-hero p {
        font-size: 0.9rem;
    }

    .feature-box h3 {
        font-size: 1.4rem;
    }

    .feature-box p {
        font-size: 0.9rem;
    }

    .blog-title {
        font-size: 1.8rem;
    }

    .blog-post,
    .single-blog-post {
        width: 98%;
        margin-left: auto;
        margin-right: auto;
        padding: 1rem;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .footer-links li {
        margin-bottom: 0;
    }

    .contact-form button {
        width: 100%;
    }

    .logo {
        max-height: 50px;  /* Mjuk reducering */
    }

    .about-text {
        min-width: unset; /* Remove min-width constraint */
        padding-right: 15px; /* Add right padding */
    }

    .expertise-item {
        padding: 12px;  /* Reduce from 30px */
    }
    
    .expertise-content {
        padding-left: 45px;  /* Reduce from 68px */
    }
    
    .expertise-header {
        gap: 10px;  /* Reduce from 20px */
    }
    
    .expertise-number {
        min-width: 35px;  /* Reduce from 48px */
        font-size: 1.5rem;  /* Reduce from 1.8rem */
    }

    .expertise-header h3 {
        font-size: 1rem;  /* Further reduce from 1.1rem */
        hyphens: auto;  /* Enable hyphenation */
        overflow-wrap: break-word;  /* Ensure words break if needed */
    }
    
    .expertise-item p {
        font-size: 0.85rem; 
        word-wrap: break-word;
    }
    
    .tools-category {
        padding: 12px;  /* Reduce from 20px */
    }

    .tools-header h3 {
        font-size: 0.85rem;  /* Reduce from 0.9rem */
    }
    .expertise-grid {
        gap: 20px;  /* Reduce from 30px */
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    }
    
    .tools-grid {
        gap: 20px;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    }
    
    .tools-list {
        gap: 8px;  /* Reduce from 10px */
    }

    .tool-tag {
        padding: 4px 8px;  /* Reduce padding */
        font-size: 0.8rem;  /* Reduce font size */
    }
    .skills-content {
        padding: 15px;  /* Reduce from 25px */
    }

}


@media screen and (max-width: 360px) {
    .expertise-number {
        min-width: 30px;  /* Further reduce from 35px */
        font-size: 1.3rem;  /* Further reduce from 1.5rem */
    }
    
    .expertise-content {
        padding-left: 35px;  /* Further reduce from 45px */
    }

    .container {
        padding: 0 12px;  /* Further reduce from 20px */
    }
    
    .expertise-grid,
    .tools-grid {
        gap: 10px;  /* Further reduce from 20px */
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));  
    }

    .tools-category {
        padding: 8px;  /* Further reduce from 12px */
        margin: 0 -40px; /* Add small margin to prevent edge touching */
        box-sizing: border-box;
        width: calc(100% - 10px);  /* Account for margins */
        margin: 0 5px;
    }

    .tools-container {
        margin: 0 -10px;  /* Compensate for edge spacing */
        padding: 10px 5px; 
    }

    .tools-list {
        gap: 6px;  /* Further reduce from 8px */
    }

    .tool-tag {
        padding: 3px 6px;  /* Further reduce padding */
        font-size: 0.75rem;  /* Further reduce font size */
        margin: 2px;  /* Add small margin between tags */
    }

    .tools-header {
        gap: 8px;  /* Reduce from 12px */
    }

    .tools-header i {
        font-size: 1.2rem;  /* Reduce from 1.5rem */
    }

    .tools-header h3 {
        font-size: 0.8rem;  /* Further reduce from 0.85rem */
    }

    .tools-list {
        justify-content: flex-start;  /* Ensure consistent left alignment */
    }

}


/* Specifika justeringar för services-heading */
#services-heading {
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Justera avstånd i "Om mig"-sektionen */
#about {
    margin-bottom: 60px;
}

/* Justera avstånd i "Kontakta mig"-sektionen */
#contact {
    margin-top: 60px;
}

/* Removed second duplicate consultant-image definition */

/* Scroll-based Fade-in Animation - No movement, only opacity */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
}

/* Skills section styles */
#skills {
    margin-top: 30px; /* Reduced from 60px */
    margin-bottom: 60px;
}

.skills-content {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05), rgba(255, 107, 53, 0.05));
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.skills-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    pointer-events: none;
}

.skills-content h2 {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    filter: drop-shadow(0 2px 8px rgba(255, 107, 53, 0.3));
}

.skills-content h2:first-of-type {
    margin-top: 0; /* Remove top margin for first h2 since we removed the intro */
}

.skills-content h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-top: 50px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.skills-content h2 i {
    font-size: 1.8rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.expertise-item {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.expertise-item:hover {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 107, 53, 0.3);
    border-color: var(--color-primary);
    background-color: rgba(255, 255, 255, 0.06);
}

.expertise-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}

.expertise-number {
    font-size: 2.2rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: monospace;
    min-width: 58px;
    padding: 5px;
    border-right: 3px solid var(--color-primary);
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.expertise-header h3 {
    color: var(--color-text);
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.4;
}

.expertise-content {
    padding-left: 68px; /* Aligns with the number width + gap */
}

.expertise-progress {
    margin-bottom: 15px;
}

.progress-label {
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.progress-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 10px;
    transition: width 1.5s ease-out;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.6);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 107, 53, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    }
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

.expertise-item p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

@media screen and (max-width: 768px) {
    .skills-content {
        padding: 25px;
    }
    
    .expertise-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .expertise-item {
        padding: 25px;
    }

    .skills-content h2 {
        font-size: 1.6rem;
    }

    .expertise-header i {
        font-size: 1.5rem;
    }

    .expertise-number {
        font-size: 1.5rem;
        min-width: 40px;
    }

    .expertise-content {
        padding-left: 60px;
    }

    .expertise-header h3 {
        font-size: 1.2rem;
    }

    .expertise-item h3 {
        font-size: 1.2rem;
    }
}

.tools-container {
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 30px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tools-category {
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
}

.tools-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.tools-header i {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.tools-header h3 {
    margin: 0;
    color: var(--color-text);
    font-size: 1.2rem;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tool-tag {
    background-color: var(--color-primary-transparent);
    color: var(--color-text);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--color-primary);
    transition: all 0.3s ease;
    cursor: default;
}

.tool-tag:hover {
    background-color: var(--color-primary);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
    border-color: var(--color-primary);
}

/* Removed pulse and slideIn keyframes - they caused unwanted jumping effects */

/* FAQ section styles */
#faq {
    margin-top: 40px;
    margin-bottom: 60px;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.05), rgba(255, 107, 53, 0.05));
    border-radius: 12px;
    margin-bottom: 20px;
    padding: 0;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.faq-item:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.faq-item summary {
    padding: 25px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    list-style: none;
    position: relative;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    padding: 0 30px 25px 30px;
    color: var(--color-text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

.faq-answer p {
    margin: 0;
}

@media screen and (max-width: 768px) {
    .faq-item summary {
        padding: 20px;
        font-size: 1rem;
    }

    .faq-item summary::after {
        right: 20px;
        font-size: 1.5rem;
    }

    .faq-answer {
        padding: 0 20px 20px 20px;
        font-size: 0.9rem;
    }
}

/* Case studies / Tidigare projekt section styles */
#case-studies {
    margin-top: 60px;
    margin-bottom: 60px;
}

.case-study {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(78, 205, 196, 0.05));
    border-left: 4px solid var(--color-primary);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    border-left-color: var(--color-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.case-study:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 107, 53, 0.3);
    border-color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.case-study h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.case-study p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 0;
}

.case-tech {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.case-tech strong {
    color: var(--color-secondary);
}

.case-studies-note {
    text-align: center;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 40px;
    font-size: 0.9rem;
}

@media screen and (max-width: 768px) {
    .case-study {
        padding: 25px;
    }

    .case-study h3 {
        font-size: 1.2rem;
    }
}
