/* --- 1. GRUNDLÄGGANDE & TEMA --- */
:root {
    --bg-color: #0D0D0D; 
    --bg-secondary: #111111;
    --text-primary: #FFFFFF; 
    --text-secondary: #A0A0A0;
    --header-bg: rgba(22, 22, 22, 0.5); 
    --header-border: rgba(255, 255, 255, 0.1);
    --accent-color: #00C2FF; 
    --accent-text: #FFFFFF;
    --cta-bg: #FFFFFF; 
    --cta-text: #000000;
    --video-overlay: rgba(10, 10, 10, 0.9); 
    --slider-bg: #333;
}

body.light-mode {
    --bg-color: #F9F7F3; 
    --bg-secondary: #FFFFFF;
    --text-primary: #1D1D1F; 
    --text-secondary: #555555;
    --header-bg: rgba(249, 247, 243, 0.6); 
    --header-border: rgba(0, 0, 0, 0.1);
    --accent-color: #007BFF; 
    --accent-text: #FFFFFF; 
    --cta-bg: #1D1D1F; 
    --cta-text: #FFFFFF;
    --video-overlay: rgba(249, 247, 243, 0.85); 
    --slider-bg: #ccc; 
    --card-bg: rgba(255, 255, 255, 0.6);
    background: linear-gradient(-45deg, #e4f2fe, #fdeff9, #e7fef4, #fdeff9);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { 
    color: var(--text-primary); 
    font-family: 'Sora', sans-serif; 
    overflow-x: hidden; 
    background: linear-gradient(-45deg, var(--bg-color), #001a33, var(--bg-color), #001a33);
    background-size: 400% 400%;
    animation: animated-gradient 10s ease infinite; 
}
body.no-scroll { overflow: hidden; }

/* Global wrapper för att förhindra horisontell scroll */
.site-wrapper {
    width: 100%;
    overflow-x: clip; 
}

/* --- 2. HEADER (STABIL LAYOUT) --- */
.site-header { 
    position: fixed; 
    top: 1rem; 
    left: 1rem; 
    right: 1rem; 
    max-width: 1200px; 
    margin: 0 auto; 
    z-index: 100; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0.5rem 1.5rem; 
    background: var(--header-bg); 
    backdrop-filter: blur(12px); 
    border: 1px solid var(--header-border); 
    border-radius: 50px; 
}
.logo { font-weight: 700; font-size: 1.2rem; } 
.logo a { text-decoration: none; color: inherit; display: flex; align-items: center; }
.logo img {
    height: 90px;
    width: auto;
    display: block;
}
.site-nav-desktop { display: flex; gap: 0.5rem; }
.header-controls { display: flex; align-items: center; gap: 1rem; }

.menu-toggle { display: none; }
.site-nav-desktop a { color: var(--text-secondary); text-decoration: none; padding: 0.75rem 1.25rem; border-radius: 50px; transition: all 0.3s ease; }
.site-nav-desktop a:hover { color: var(--text-primary); background-color: rgba(128, 128, 128, 0.1); }
.site-nav-desktop a.active { color: var(--text-primary); }
.header-cta-desktop { background-color: var(--cta-bg); color: var(--cta-text); padding: 0.75rem 1.5rem; border-radius: 50px; text-decoration: none; font-weight: 700; white-space: nowrap; transition: all 0.3s ease; }

.has-dropdown { 
    position: relative;
    display: flex; 
}
.submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--header-bg);
    backdrop-filter: blur(12px); 
    border: 1px solid var(--header-border);
    border-radius: 16px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 110;
}
.has-dropdown:hover .submenu, .has-dropdown.is-active .submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.submenu a { 
    width: 100%; 
    justify-content: flex-start;
    color: var(--text-primary);
}

.header-cta-desktop:hover { transform: scale(1.05); background-color: var(--accent-color); color: var(--accent-text); }
.language-switch { display: flex; align-items: center; background: rgba(128, 128, 128, 0.1); border-radius: 50px; padding: 4px; }
.language-switch button { background: transparent; border: none; cursor: pointer; padding: 5px; border-radius: 50%; display: flex; transition: background-color 0.3s ease; }
.language-switch button svg { display: block; width: 20px; height: 20px; border-radius: 50%; pointer-events: none; }
.language-switch button.active { background-color: rgba(128, 128, 128, 0.2); }
.theme-switch { 
    position: relative; 
    display: inline-block; 
    width: 50px; 
    height: 28px; 
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-switch .slider { 
    position: absolute; 
    cursor: pointer; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background-color: var(--slider-bg); 
    transition: .4s; 
    border-radius: 34px; 
}
.theme-switch .slider:before { 
    position: absolute; 
    content: ""; 
    height: 20px; 
    width: 20px; 
    left: 4px; 
    bottom: 4px; 
    background-color: white; 
    transition: .4s; 
    border-radius: 50%; 
    background-image: var(--icon-sun); 
    background-size: 16px; 
    background-repeat: no-repeat; 
    background-position: center; 
}
body.light-mode .theme-switch .slider:before { background-image: var(--icon-moon); }
.theme-switch input:checked + .slider:before { transform: translateX(22px); }

/* --- 3. RESPONSIVITET FÖR HEADER --- */
@media (max-width: 1024px) {
    .site-nav-desktop { display: none; }
    .header-controls { display: none; }
    .site-header { padding: 0.75rem 1rem; }
    .header-cta-mobile { display: block; background-color: var(--cta-bg); color: var(--cta-text); padding: 0.6rem 1.2rem; border-radius: 50px; text-decoration: none; font-weight: 600; font-size: 0.9rem; white-space: nowrap; margin-right: 0.5rem; }
    .header-cta-desktop { display: none; }
    .menu-toggle { display: block; background: none; border: none; cursor: pointer; z-index: 102; }
    .menu-toggle .bar { display: block; width: 25px; height: 2px; margin: 5px auto; background-color: var(--text-primary); }
    .logo img { height: 32px; } 
}

/* --- 4. HJÄLTE-SEKTION --- */
.hero { 
    min-height: 100vh; 
    display: grid; 
    place-items: center; 
    text-align: center; 
    padding: 2rem; 
    position: relative; 
    overflow: hidden; 
}
.video-container { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: -1; 
}
.video-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: var(--video-overlay); 
}
#bg-video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.hero-content { 
    z-index: 2; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1.5rem; 
    max-width: 100%; 
} 

/* Ny stil för att positionera Lottie-animationen i hero-sektionen */
.hero-lottie-animation {
    position: absolute;
    right: 0;
    top: 60%; /* Flyttar ner animationen ytterligare */
    transform: translateY(-50%);
    width: 400px;      /* Minskad bredd */
    max-width: 35%;    /* Minskad max-bredd */
    z-index: 1; /* Lägger den bakom texten */
    opacity: 0.7;
    pointer-events: none; /* Gör den icke-klickbar */
}

h1 { 
    font-size: clamp(2.5rem, 7vw, 6rem); 
    font-weight: 700; 
    letter-spacing: -3px; 
    line-height: 1.05; 
    max-width: 14ch; 
    background: linear-gradient(90deg, var(--text-primary) 40%, var(--text-secondary) 100%); 
    -webkit-background-clip: text; 
    background-clip: text; 
    color: transparent; 
}
p { 
    font-size: clamp(1.1rem, 2.5vw, 1.25rem); 
    max-width: 50ch; 
    color: var(--text-secondary); 
    line-height: 1.6; 
}
.cta-button { 
    background-color: var(--accent-color); 
    color: var(--accent-text); 
    padding: clamp(1rem, 2vw, 1.2rem) clamp(2rem, 4vw, 2.5rem); 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: clamp(1rem, 2vw, 1.1rem); 
    display: inline-flex; 
    align-items: center; 
    gap: 0.75rem; 
    margin-top: 1rem; 
    transition: all 0.3s ease; 
}
.cta-button:hover { 
    transform: translateY(-5px) scale(1.05); 
    box-shadow: 0 10px 30px rgba(0, 194, 255, 0.25); 
}

/* --- 5. BANBRYTANDE SEKTIONER --- */
.content-section { 
    padding: clamp(80px, 15vh, 150px) 0; 
    position: relative; 
}
.container { 
    width: calc(100% - 2rem); 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 1rem; 
}
.section-header {
    position: relative; 
    z-index: 3; 
    text-align: center; 
    max-width: 700px;
    margin: 0 auto 4rem auto;
}
.section-title { 
    font-size: clamp(2.5rem, 5vw, 3.5rem); 
    letter-spacing: -1.5px; 
    line-height: 1.1; 
    margin-bottom: 1rem; 
}
.section-subtitle { 
    color: var(--text-secondary); 
    font-size: clamp(1rem, 2vw, 1.1rem); 
    line-height: 1.6; 
}

/* Tjänster-sektion med 3D-effekt */
/* ====== Services Grid ====== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    perspective: 1200px;
    align-items: stretch;
    margin-top: 2rem;
}

/* ====== Service Cards ====== */
.service-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--header-border);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none; /* Tar bort understrykning från texten inuti länken */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    
    /* Animation startläge */
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

/* Liten delay mellan varje kort */
.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Hover-effekt */
.service-card:hover {
    transform: translateY(-6px) rotateX(2deg);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    background: var(--bg-hover, rgba(255, 255, 255, 0.05));
}

/* Titel */
.service-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Text */
.service-card p {
    flex-grow: 1;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Ikon eller bild */
.service-card img, 
.service-card svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

/* Länk/knapp */
.service-card a,
.service-card button {
    align-self: flex-start;
    background: var(--accent);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.service-card a:hover,
.service-card button:hover {
    background: var(--accent-hover, #e63946);
    transform: translateY(-2px);
}

/* ====== Fade-in animation ====== */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

}
body.light-mode .card-background-animation {
    opacity: 0.1; 
}
body.light-mode .service-card:hover .card-background-animation { 
    opacity: 0.15; 
}
.service-card h3, .service-card p {
    position: relative; 
    z-index: 1;
}
.service-card p {
    color: var(--text-primary); 
    font-weight: 500; 
    opacity: 0.9; 
}
.service-card h3 { 
    font-size: 1.5rem; 
    margin-bottom: 1rem; 
    color: var(--text-primary); 
}
.service-card p { 
    flex-grow: 1; 
    color: var(--text-secondary); 
}

/* Anpassning för ljust läge med "glassmorphism"-effekt */
body.light-mode .service-card,
body.light-mode .process-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
}
.process-grid { 
    display: grid; 
    gap: 2rem; 
}
.process-card { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    align-items: center; 
    gap: clamp(2rem, 8vw, 6rem); 
    background: var(--bg-secondary); 
    border: 1px solid var(--header-border); 
    border-radius: 32px; 
    overflow: hidden; 
}
.process-card:nth-child(even) .process-image { order: 2; }
.process-image { 
    aspect-ratio: 1 / 1; 
    overflow: hidden; 
}
.process-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transform: scale(1.15); 
}
.process-text { 
    padding: 4rem; 
}
.process-text h3 { 
    font-size: clamp(1.5rem, 4vw, 2rem); 
    margin-bottom: 1rem; 
}
.contact-section { 
    text-align: center; 
    isolation: isolate; 
}
@keyframes animated-gradient {
	0% { background-position: 0% 50%; } 
    50% { background-position: 100% 50%; } 
    100% { background-position: 0% 50%; }
}
.contact-section .container { 
    border-top: 1px solid var(--header-border); 
    padding-top: 100px; 
}
.large-title { 
    font-size: clamp(3rem, 8vw, 6rem); 
    letter-spacing: -3px; 
}
.contact-section p { 
    max-width: 50ch; 
    margin: 0 auto 2.5rem auto; 
    font-size: 1.25rem; 
}

/* Kontaktformulär */
.contact-form { 
    max-width: 700px; 
    margin: 4rem auto 0; 
    text-align: left; 
}
.form-group { 
    position: relative; 
    margin-bottom: 1.5rem; 
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--header-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-color); outline: none; }
.form-group label { 
    position: absolute; 
    left: 1rem; 
    top: 1rem; 
    color: var(--text-secondary); 
    pointer-events: none; 
    transition: all 0.3s ease; 
    padding: 0 0.25rem; 
}
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label,
.form-group input:focus + label,
.form-group textarea:focus + label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.85rem;
    color: var(--accent-color);
    text-shadow: 0 0 2px var(--bg-color), 0 0 4px var(--bg-color), 0 0 6px var(--bg-color);
}
body.light-mode .form-group input:not(:placeholder-shown) + label,
body.light-mode .form-group textarea:not(:placeholder-shown) + label {
    text-shadow: 0 0 0.5px #fff, 0 0 1px #fff, 0 0 2px #fff;
}
.contact-form .cta-button { 
    width: 100%; 
    justify-content: center; 
}

/* Stil för meddelande efter formulärinskickning */
.form-success-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 3rem 1rem;
}

/* --- NY KONTAKTSIDA --- */
.contact-page-main { 
    min-height: 100vh; 
    display: grid; 
    place-items: center; 
    padding: 8rem 1rem; 
    width: 100%; 
}
.contact-page-grid { 
    position: relative; 
    display: grid; 
    grid-template-columns: 1fr 1.2fr 1.2fr; 
    gap: clamp(1rem, 4vw, 3rem); 
    align-items: center; 
}
.contact-page-info {
    position: relative;
    padding: 0 1rem;
    isolation: isolate;
}
.contact-page-animation {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}
.contact-page-title { 
    font-size: clamp(2.5rem, 6vw, 5rem); 
    letter-spacing: -2.5px; 
    line-height: 1.1; 
    margin-bottom: 1.5rem; 
}
.contact-page-subtitle { 
    font-size: 1.2rem; 
    color: var(--text-secondary); 
    max-width: 40ch; 
    line-height: 1.6; 
}
.contact-details { 
    margin-top: 3rem; 
    font-size: 1.1rem; 
    line-height: 1.8; 
}
.contact-details strong { 
    color: var(--text-primary); 
}
.contact-details a { 
    color: var(--text-secondary); 
    text-decoration: none; 
    transition: color 0.3s ease; 
}
.contact-details a:hover { 
    color: var(--accent-color); 
}
.contact-page-form .contact-form { 
    margin: 0; 
    max-width: none; 
    background: var(--card-bg); 
    backdrop-filter: blur(20px); 
    padding: 2.5rem; 
    border-radius: 24px; 
    border: 1px solid var(--header-border); 
}

/* Responsivitet för nya kontaktsidan */
@media (max-width: 992px) {
    .contact-page-grid { 
        grid-template-columns: 1fr; 
        gap: 4rem; 
    }
    .contact-page-animation { order: 1; }
    .contact-page-info {
        text-align: center;
        order: 2;
    }
    .contact-page-form { order: 3; }
    .contact-page-subtitle, .contact-details { 
        margin-left: auto; 
        margin-right: auto; 
    }
}
@media (max-width: 480px) {
    .contact-page-title { 
        font-size: clamp(2.5rem, 10vw, 3rem); 
    }
    .contact-page-form .contact-form { 
        padding: 2rem 1.5rem; 
    }
}

/* --- NY FAQ-SEKTION --- */
.faq-filter {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 4rem auto 0;
    flex-wrap: wrap;
}
.filter-btn {
    background: none;
    border: 1px solid var(--header-border);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.filter-btn:hover { 
    color: var(--text-primary); 
    border-color: var(--text-primary); 
}
.filter-btn.active { 
    color: var(--cta-text); 
    background-color: var(--cta-bg); 
    border-color: var(--cta-bg); 
}
.faq-accordion {
    max-width: 800px; 
    margin: 2rem auto 0; 
    border-top: 1px solid var(--header-border);
}
.faq-item {
    border-bottom: 1px solid var(--header-border);
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.75rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}
.faq-icon { 
    transition: transform 0.3s ease; 
}
.faq-item.active .faq-icon { 
    transform: rotate(180deg); 
}
.faq-answer { 
    overflow: hidden; 
    max-height: 0; 
    transition: max-height 0.5s ease-out, padding 0.5s ease-out; 
}
.faq-item.active .faq-answer {
    max-height: 300px; 
}
.faq-item.hidden { display: none; }
.faq-answer p { 
    color: var(--text-secondary); 
    padding: 0 0 1.75rem 0; 
    line-height: 1.7; 
    max-width: 100%; 
}
@media (max-width: 850px) {
    .process-card { grid-template-columns: 1fr; }
    .process-card:nth-child(even) .process-image { order: 0; }
    .process-image { aspect-ratio: 16 / 10; }
    .process-text { padding: 2.5rem; }
}

/* --- NY TJÄNSTESIDA (WEBB) --- */
.service-hero { 
    min-height: 90vh; 
    display: grid; 
    align-items: center; 
    padding: 10rem 1rem 4rem; 
    position: relative; 
    overflow: hidden; 
}
.service-hero-grid { 
    display: grid; 
    grid-template-columns: 1.2fr 1fr; 
    align-items: center; 
    gap: clamp(2rem, 8vw, 6rem); 
    max-width: 100%; 
}
.service-hero-animation { 
    max-width: 500px; 
    margin: 0 auto; 
}
.service-hero-animation lottie-player { 
    width: 100%; 
    height: auto; 
}
.service-hero-text h1 { 
    color: var(--text-primary); 
}
.service-hero-text p { 
    color: var(--text-secondary); 
    max-width: 55ch; 
}
.service-hero-text .cta-button { 
    margin-top: 2rem; 
}

.features-section { background-color: transparent; }
.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1.5rem; 
    align-items: stretch; /* Nyckelrad: Tvingar alla kort i en rad att ha samma höjd */
}
.feature-card { 
    position: relative; 
    background: var(--card-bg); 
    backdrop-filter: blur(20px); 
    border: 1px solid var(--header-border); 
    border-radius: 24px; 
    padding: 2rem; 
    /* Nya rader för att säkerställa samma höjd */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
.feature-card::before, .web-process-card::before, .problem-card::before {
    content: ''; 
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 24px; 
    padding: 1px;
    background: linear-gradient(145deg, var(--accent-color), transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    opacity: 0; 
    transition: opacity 0.5s ease;
}
.feature-card:hover, .web-process-card:hover, .problem-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
}
.feature-card:hover::before, .web-process-card:hover::before, .problem-card:hover::before { 
    opacity: 1; 
}
.feature-card h4 { 
    font-size: 1.25rem; 
    margin-bottom: 1rem; 
}
.feature-card p { 
    font-size: 1rem; 
    color: var(--text-secondary); 
    flex-grow: 1; /* Nyckelrad: Låter p-elementet växa och fylla utrymmet */
    max-width: 100%; 
}

@media (max-width: 992px) {
    .service-hero { 
        min-height: auto; 
        text-align: center; 
    }
    .service-hero-grid { 
        grid-template-columns: 1fr; 
    }
    .web-service-page .service-hero-text,
    .support-service-page .service-hero-text,
    .smarthome-service-page .service-hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }    
    .hero-lottie-animation {
        /* Återställ till att vara ett block ovanför texten */
        position: relative;
        display: block;
        order: -1; /* Placerar den före .hero-content i flex-flödet */
        width: 90%;
        max-width: 250px; /* Minskad storlek för mobil */
        margin: 0 auto 2rem auto; /* Centrerar och lägger till avstånd under */
        opacity: 1; /* Återställer opaciteten */
    }
    .service-hero-animation { 
        order: -1; 
        margin-bottom: 2rem; 
        max-width: 350px; 
    }
}
@media (max-width: 480px) {
    .service-hero-text h1 { 
        font-size: clamp(2.5rem, 10vw, 3.5rem); 
    }
}

/* Problem-sektion */
.problems-section { background-color: transparent; }
.problems-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 1.5rem; 
}
.problem-card { 
    position: relative; 
    text-align: center; 
    background: var(--card-bg); 
    backdrop-filter: blur(20px); 
    border: 1px solid var(--header-border); 
    border-radius: 24px; 
    padding: 2.5rem 2rem; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
.problem-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(128, 128, 128, 0.1);
    margin-bottom: 1.5rem;
}
.problem-icon svg { 
    width: 28px; 
    height: 28px; 
    color: var(--accent-color); 
}
.problem-card h4 { 
    font-size: 1.25rem; 
    margin-bottom: 0.75rem; 
}
.problem-card p { 
    font-size: 1rem; 
    color: var(--text-secondary); 
    max-width: 100%; 
}
body.light-mode .problem-card { 
    background: var(--card-bg); 
    backdrop-filter: blur(20px); 
}

/* Support-process-sektion */
.support-process-timeline-section { background-color: transparent; }
.support-timeline { 
    position: relative; 
    max-width: 750px; 
    margin: 4rem auto 0; 
}
.support-timeline::after { 
    content: ''; 
    position: absolute; 
    width: 2px; 
    background-color: var(--header-border); 
    top: 0; 
    bottom: 0; 
    left: 50%; 
    margin-left: -1px; 
}
.timeline-item { 
    padding: 10px 40px; 
    position: relative; 
    background-color: inherit; 
    width: 50%; 
}
.timeline-item-left { left: 0; }
.timeline-item-right { left: 50%; }
.timeline-item::after { 
    content: ''; 
    position: absolute; 
    width: 25px; 
    height: 25px; 
    right: -13px; 
    background-color: var(--bg-color); 
    border: 2px solid var(--accent-color); 
    top: 25px; 
    border-radius: 50%; 
    z-index: 1; 
}
.timeline-item-right::after { left: -13px; }
.timeline-content { 
    padding: 2rem; 
    background: var(--card-bg); 
    backdrop-filter: blur(20px); 
    border: 1px solid var(--header-border); 
    border-radius: 24px; 
    position: relative; 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
}
.timeline-content:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
}
.timeline-step { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--accent-color); 
    margin-bottom: 1rem; 
}
.timeline-content h4 { 
    font-size: 1.25rem; 
    margin-bottom: 1rem; 
}
.timeline-content p { 
    font-size: 1rem; 
    color: var(--text-secondary); 
    max-width: 100%; 
}

@media (max-width: 768px) {
    .support-timeline::after { left: 20px; }
    .timeline-item { 
        width: 100%; 
        padding-left: 60px; 
        padding-right: 15px; 
    }
    .timeline-item-left, .timeline-item-right { 
        left: 0 !important; 
    }
    .timeline-item::after, .timeline-item-right::after { 
        left: 8px; 
    }
}

/* Support-tools-sektion */
.support-tools-section { background-color: transparent; }
/* Återställer till grid för en mer robust och förutsägbar layout */
.support-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; 
    max-width: 1000px; 
    margin: 4rem auto 0; 
}

.checklist-item {
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    background: var(--bg-secondary); 
    backdrop-filter: blur(20px); 
    border: 1px solid var(--header-border); 
    border-radius: 16px; 
    padding: 1.5rem; 
    font-size: 1.1rem; 
    font-weight: 600; 
    transition: transform 0.3s ease, background-color 0.3s ease; 
    /* Tar bort fast bredd och låter grid hantera det */
}

/* Media Queries för responsiv design */
@media (max-width: 768px) {
    /* Döljer de två sista korten på mindre skärmar för en renare layout */
    .support-checklist-grid .checklist-item:nth-child(n+5) {
        display: none;
    }
}

.checklist-item:hover {
    transform: translateX(10px);
    background-color: rgba(0, 194, 255, 0.05);
}
.checklist-item svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Smarthome process-sektion */
.smarthome-process-section { background-color: var(--bg-secondary); }
.smarthome-process-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    margin-top: 4rem;
    flex-wrap: wrap; 
    justify-content: center;
}
.smarthome-process-card { text-align: center; }
.smarthome-process-icon {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 700; color: var(--accent-color);
    margin-bottom: 1.5rem;
}
.smarthome-process-card h4 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.smarthome-process-card p { font-size: 1rem; color: var(--text-secondary); max-width: 100%; }
.smarthome-process-arrow svg { width: 32px; height: 32px; color: var(--text-secondary); }

@media (max-width: 992px) {
    .smarthome-process-grid { 
        grid-template-columns: 1fr; 
        gap: 1.5rem; 
        flex-direction: column;
        gap: 2.5rem;
    }
    .smarthome-process-arrow {
        transform: rotate(90deg);
        justify-self: center; /* Centrerar pilen horisontellt */
    }
}


/* --- NY KREATIV STACK-SEKTION (SMARTA HEM) --- */
/* Justering för att minska avståndet mellan rubrik och animation */
.creative-stack-section .section-header {
    margin-bottom: 0;
}

.creative-stack-section { padding-bottom: 10vh; position: relative; background-color: var(--bg-color); }
.creative-stack-wrapper {
    /* Höjden sätts dynamiskt av JS baserat på antal kort */
    position: relative;
}
.creative-stack-cards-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Denna rad centrerar korten horisontellt */
    justify-content: center;
}
.stacked-card {
    position: absolute;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 50%), var(--bg-secondary);
    border: 1px solid var(--header-border);
    border-radius: 32px;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    width: 90%;
    max-width: 700px;
    aspect-ratio: 4 / 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
    transform-origin: center center;
}
.stacked-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 32px;
    padding: 1px;
    background: linear-gradient(145deg, var(--card-color, var(--accent-color)), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
}
.stacked-card .card-icon { margin-bottom: 1.5rem; }
.stacked-card .card-icon svg { width: 32px; height: 32px; color: var(--card-color, var(--accent-color)); }
.stacked-card h3 { font-size: clamp(1.2rem, 4vw, 1.5rem); margin-bottom: 1rem; }
.stacked-card p { color: var(--text-secondary); max-width: 40ch; font-size: clamp(0.9rem, 2.5vw, 1rem); }

/* Säkerställer att sektioner EFTER stack-animationen hamnar ovanpå */
.stacked-cards-section + .content-section {
    position: relative;
    background-color: var(--bg-secondary); /* Nödvändigt för att täcka över det pinnade elementet */
    z-index: 3;
}

/* Ny animerad scroll-indikator */
.scroll-down-indicator {
    position: absolute;
    bottom: 10vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4; /* Säkerställer att den ligger överst */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0; /* Dold från start, styrs av JS */
    animation: bounce 2s infinite;
}
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); } 40% { transform: translate(-50%, -10px); } 60% { transform: translate(-50%, -5px); } }

.interactive-tabs-section { background-color: transparent; }
.interactive-tabs-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: center; }
.tabs-nav { display: flex; flex-direction: column; gap: 1rem; }
.tab-button { background: none; border: none; text-align: left; padding: 1.5rem; border-radius: 16px; cursor: pointer; transition: background-color 0.3s ease; }
.tab-button:hover { background-color: rgba(128, 128, 128, 0.05); }
.tab-button.active { background-color: rgba(128, 128, 128, 0.1); }
.tab-button-title { display: block; font-size: 1.2rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.5rem; }
.tab-button-desc { font-size: 1rem; color: var(--text-secondary); font-family: inherit; }
.tabs-content { position: relative; min-height: 400px; }
.tab-pane { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s; }
.tab-pane.active { opacity: 1; visibility: visible; }

@media (max-width: 992px) {
    .interactive-tabs-grid { grid-template-columns: 1fr; }
    .tabs-content { margin-top: 2rem; }
}

.why-choose-us-section { background-color: var(--bg-secondary); }
.why-choose-us-grid {
    position: relative;
    max-width: 800px;
    height: 500px;
    min-height: 500px; /* Säkerställer att containern inte kollapsar */
    margin: 4rem auto 0;
}
.why-card {
    position: absolute;
    background: var(--bg-color);
    backdrop-filter: blur(20px);
    border: 1px solid var(--header-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
#why-card-1 { top: 0; left: 0; width: 60%; z-index: 1; transform: rotate(-2deg); }
#why-card-2 { top: 25%; right: 0; width: 55%; z-index: 2; transform: rotate(1.5deg); }
#why-card-3 { bottom: 0; left: 20%; width: 65%; z-index: 3; transform: rotate(-1deg); }
@media (max-width: 768px) {
    .why-choose-us-grid { height: auto; min-height: unset; position: static; display: flex; flex-direction: column; gap: 1.5rem; }
    .why-card { position: static; width: 100% !important; transform: rotate(0) !important; }
}

/* =====================
   Tech Stack Section
   ===================== */
.tech-stack-section { 
    background-color: transparent; 
}

.tech-stack-grid {
    display: flex;
    flex-wrap: wrap;          /* Tillåt radbrytning */
    justify-content: center;  /* Centrera korten horisontellt */
    gap: 1.5rem;
    margin-top: 2rem;
}

/* =====================
   Tech Cards
   ===================== */
.tech-card {
    flex: 0 0 190px;              /* Samma bredd på alla kort */
    background: var(--bg-secondary);
    border: 1px solid var(--header-border);
    border-radius: 50px;
    padding: 0.75rem 1rem;        /* Lite mindre padding för att minska höjd */
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    height: 60px;                 /* Exakt höjd som matchar tidigare design */
    box-sizing: border-box;       /* Inkludera padding i höjd */
    text-align: center;
}

.tech-card-icon {
    width: 24px;                   
    height: 24px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-card-icon svg {
    width: 100%;
    height: 100%;
}

.tech-card:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(0, 194, 255, 0.3);
}

/* =====================
   Animation (om behövs)
   ===================== */
@keyframes scroll {
    to { transform: translate(calc(-50% - 0.75rem)); }
}





/* --- NY PRIS-SEKTION --- */
.pricing-section { background-color: transparent; }
.pricing-toggles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}
.pricing-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.pricing-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.pricing-toggle-switch input { opacity: 0; width: 0; height: 0; }
.pricing-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--slider-bg);
    transition: .4s;
    border-radius: 34px;
}
.pricing-slider:before {
    /* Korrigering för att säkerställa att slider-knappen är korrekt positionerad */
    box-sizing: content-box;
}
.pricing-slider:before {
    position: absolute; content: ""; height: 20px; width: 20px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.pricing-toggle-switch input:checked + .pricing-slider { background-color: var(--accent-color); }
.pricing-toggle-switch input:checked + .pricing-slider:before { transform: translateX(22px); }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: start;
}
.pricing-card {
    position: relative; background: var(--card-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--header-border); border-radius: 24px;
    padding: 2.5rem; text-align: center;
    display: flex; flex-direction: column; height: 100%;
}
.pricing-card.popular { border-color: var(--accent-color); transform: scale(1.03); }
.pricing-card-header { margin-bottom: 2rem; }
.pricing-card-header h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.pricing-card-header p { font-size: 1rem; color: var(--text-secondary); max-width: 100%; }
.pricing-card-price { margin-bottom: 2rem; }
.pricing-card-price .price-amount { font-size: clamp(2.5rem, 8vw, 3.5rem); font-weight: 700; display: block; line-height: 1.1; }
.pricing-card-price .price-period { color: var(--text-secondary); font-weight: 600; }
.pricing-features { list-style: none; margin-bottom: 2.5rem; flex-grow: 1; }
.pricing-features li { padding: 0.75rem 0; border-bottom: 1px solid var(--header-border); }
.pricing-features li:first-child { border-top: 1px solid var(--header-border); }
.pricing-card .cta-button { width: 100%; justify-content: center; }

body.light-mode .pricing-card { background: var(--card-bg); }

@media (max-width: 768px) {
    .pricing-toggles {
        flex-direction: column;
        gap: 1.5rem;
    }
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card.popular { transform: scale(1); }
}

/* --- NYA KLIENTER-SEKTIONEN (LOGO SCROLLER) --- */
.clients-section .container { margin-bottom: 0; }
.logo-scroller { max-width: 100%; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent); mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent); }
.scroller-inner { display: flex; flex-wrap: nowrap; gap: 4rem; }
.logo-scroller[data-animated="true"] .scroller-inner { width: max-content; flex-wrap: nowrap; animation: scroll 40s linear infinite; }
.scroller-inner img { 
    height: 40px; 
    transition: transform 0.3s ease; /* Behåller en mjuk övergång för hover-effekten */
}
.scroller-inner img:hover { transform: scale(1.05); } /* Lägger till en subtil förstoring vid hover */

@keyframes scroll {
    to { transform: translate(calc(-50% - 2rem)); }
}

@media (prefers-reduced-motion) {
    .logo-scroller[data-animated="true"] .scroller-inner { animation-play-state: paused; }
}

@media (max-width: 1200px) {
    .portfolio-carousel-wrapper { overflow: visible; } /* Tillåt "peek" på mindre skärmar */
}


body.light-mode .feature-card,
body.light-mode .feature-card {
    backdrop-filter: blur(20px);
}

/* --- NY PORTFÖLJ-SEKTION --- */
.portfolio-section { background-color: transparent; position: relative; }
.portfolio-carousel-wrapper {
    position: relative;
    margin-top: 4rem;
    overflow: hidden;
    /* Ta bort cursor-stilar som inte längre behövs */
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.portfolio-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--header-border);
    border-radius: 24px; overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.portfolio-card .card-image { height: 220px; overflow: hidden; }
.portfolio-card .card-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.portfolio-card:hover .card-image img {
    transform: scale(1.05);
}
.portfolio-card .card-content { padding: 1.5rem; }
.portfolio-card h3 { font-size: 1.2rem; line-height: 1.4; }

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr; /* En kolumn på mobil */
    }
}

/* --- NYTT PORTFÖLJ-MODAL (POPUP) --- */
.portfolio-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 200; display: flex; align-items: center; justify-content: center;
    padding: 1rem; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s;
}
.portfolio-modal.is-visible { opacity: 1; visibility: visible; }
.modal-container {
    background: var(--bg-secondary); border: 1px solid var(--header-border);
    border-radius: 24px; max-width: 800px; width: 100%;
    max-height: 90vh; overflow-y: auto; position: relative;
}
.modal-close-btn {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(128, 128, 128, 0.2); border: none; border-radius: 50%;
    width: 40px; height: 40px; cursor: pointer; display: flex;
    align-items: center; justify-content: center; color: var(--text-primary);
    transition: background-color 0.3s ease;
}
.modal-close-btn:hover { background: rgba(128, 128, 128, 0.4); }
.modal-image { width: 100%; height: 350px; object-fit: cover; border-radius: 24px 24px 0 0; }
.modal-text-content { padding: 2rem 2.5rem 3rem; }
.modal-text-content h2 { font-size: 2rem; margin-bottom: 1.5rem; }
.modal-body p, .modal-body ul { color: var(--text-secondary); line-height: 1.7; }
.modal-body p + p, .modal-body ul + p, .modal-body p + ul { margin-top: 1rem; }
.modal-body ul { padding-left: 1.5rem; }

/* --- NY KONTAKT-MODAL (FÖR PRISER) --- */
.contact-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 200; display: flex; align-items: center; justify-content: center;
    padding: 1rem; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s;
}
.contact-modal.is-visible { opacity: 1; visibility: visible; }
.contact-modal .modal-content { padding: 2rem 2.5rem 3rem; }
.contact-modal .section-header { text-align: left; margin-bottom: 2rem; }
.contact-modal .section-title { font-size: 1.8rem; }
.contact-modal .section-subtitle { font-size: 1rem; }
.contact-modal .contact-form { margin-top: 0; }

.tech-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 200; display: flex; align-items: center; justify-content: center;
    padding: 1rem; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s;
    /* Lägg till en subtil animation för modalens bakgrund */
    animation: fadeInBackground 0.4s ease forwards;
}
.tech-modal.is-visible { opacity: 1; visibility: visible; }
.tech-modal .modal-container {
    max-width: 550px;
    background: var(--bg-secondary);
    border: 1px solid var(--header-border);
    border-radius: 24px; /* Lite större radie */
    box-shadow: 0 20px 50px rgba(0,0,0,0.4); /* Mer framträdande skugga */
    max-height: 90vh; /* Säkerställer att den inte flödar över viewporten */
    overflow-y: auto; /* Tillåter scrollning om innehållet är för långt */
}
.tech-modal .modal-content { padding: 2.5rem 3rem 3rem; } /* Ökad padding */
.modal-title-wrapper {
    display: flex;
    align-items: center; /* Behåller vertikal centrering */
    gap: 1rem;
    margin-bottom: 1.5rem; /* Ökat avstånd till texten */
}
.tech-modal .modal-content h3 { font-size: 1.8rem; color: var(--accent-color); margin: 0; }
.modal-icon {
    color: var(--accent-color);
    opacity: 0.4; /* Gör den ännu mer subtil */
    flex-shrink: 0; /* Förhindrar att ikonen krymper */
}
.modal-icon svg { width: 28px; height: 28px; } /* Minskad storlek för att matcha rubriken bättre */
.tech-modal .modal-content p { font-size: 1.1rem; line-height: 1.7; color: var(--text-secondary); max-width: 100%; }
/* Lägg till en subtil animation för modalens bakgrund */
@keyframes fadeInBackground {
    from { background: rgba(10, 10, 10, 0); }
    to { background: rgba(10, 10, 10, 0.7); }
}
.tech-modal .modal-close-btn {
    background: rgba(128, 128, 128, 0.3); /* Lite mörkare för bättre kontrast */
    width: 44px; /* Lite större */
    height: 44px; /* Lite större */
    top: 1.2rem;
    right: 1.2rem;
}
.tech-modal .modal-close-btn:hover {
    background: var(--accent-color); /* Accentfärg vid hover */
    color: var(--accent-text);
}


/* --- 6. ÖVRIGT --- */
.cursor-glow { position: fixed; top: 0; left: 0; width: 600px; height: 600px; background: radial-gradient(circle, rgba(0, 194, 255, 0.1) 0%, rgba(0, 194, 255, 0) 50%); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 999; opacity: 0; transition: opacity 0.3s ease; }
@media (pointer: fine) { body:hover .cursor-glow { opacity: 1; } }
.mobile-nav {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color);
    display: flex; flex-direction: column; justify-content: center; /* Centrera allt vertikalt */
    padding: 2rem;
    opacity: 0; visibility: hidden; /* Dold från start */
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 99;
}
.mobile-nav.is-active { 
    opacity: 1; 
    visibility: visible; 
}

.mobile-nav-main {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1.5rem; 
    margin-bottom: 4rem; 
    width: 100%;
}

.mobile-nav .has-dropdown {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    position: relative; /* Lägg till position relative */
}

.mobile-nav a { 
    color: var(--text-primary); 
    text-decoration: none; 
    font-size: clamp(1.8rem, 8vw, 2.2rem);
    font-weight: 700; 
    padding: 0.5rem 1rem; 
    transition: color 0.3s ease; 
}

.mobile-nav a:hover { 
    color: var(--accent-color); 
}

.mobile-nav .has-dropdown > a { 
    display: inline-flex; 
    align-items: center; 
    gap: 0.5rem; 
}

.mobile-nav .has-dropdown > a::after {
    content: '›';
    display: inline-block;
    font-size: 2.5rem;
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}

.mobile-nav .has-dropdown.is-active > a::after { 
    transform: rotate(-90deg); 
}

.mobile-nav .submenu {
    background: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, margin-top 0.4s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.mobile-nav .has-dropdown.is-active .submenu { 
    max-height: 500px; 
    margin-top: 1.5rem;
}

.mobile-nav .submenu a { 
    font-size: clamp(1.2rem, 6vw, 1.5rem);
    font-weight: 400; 
    color: var(--text-secondary);
    /* white-space: nowrap; borttagen för att tillåta radbrytning */
}

.mobile-nav-controls { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 2rem; 
}

.mobile-cta { 
    background-color: var(--accent-color); 
    color: var(--accent-text) !important; 
    padding: 1rem 2rem; 
    border-radius: 50px; 
    margin-top: 1rem; 
    font-weight: 700; 
    font-size: 1.2rem !important; 
}

.site-footer { 
    text-align: center; 
    padding: 2rem; 
    border-top: 1px solid var(--header-border); 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
}

/* Fix för mobil-tangentbord i fixed modal */
@media (max-width: 768px) {
    .contact-modal:focus-within, .tech-modal:focus-within {
        /* Istället för att ändra position, justerar vi 'top' och tillåter scroll.
           Detta tvingar webbläsaren att rita om vyn korrekt utan att stänga modalen. */
        top: 0; overflow: auto;
    }
    .service-card, .process-card, .feature-card, .problem-card, .timeline-content, .web-process-card, .pricing-card, .portfolio-card {
        padding: 1.5rem;
    }
    .process-text { padding: 2rem; }
}
.site-footer { 
    text-align: center; 
    padding: 2rem; 
    border-top: 1px solid var(--header-border); 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
}
