/* =================== Global Styles =================== */

/* General Reset and Box Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #12111F; /* Mörk bakgrund */
        color: #ffffff; /* Ljusa texter */
    }

    .navbar {
        background-color: rgba(18, 17, 31, 0.95); /* Anpassad mörk navigering */
    }

    /* Justera andra element för mörkt tema här */
}


img {
    -webkit-user-drag: none;
    user-select: none;
}

.image-wrapper {
    position: relative;
    display: inline-block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0); /* Transparent */
    cursor: default;
}

.image-container {
    width: 300px; /* Bredd på din bild */
    height: 200px; /* Höjd på din bild */
    background-image: url('path/to/your/image.jpg');
    background-size: cover;
    background-position: center;
}

/* Modal stil */
.modal {
    display: none; /* Dölj modalen som standard */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

/* Modal innehåll (bilden) */
.modal-content {
    display: block;
    margin: auto;
    max-width: 80%;
    max-height: 80%;
}

/* Stäng-knappen */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}


* {
    margin: 0;
    padding: 0;
}

body, html {
    font-family: 'Roboto', sans-serif;
    background-color: #12111F;
    color: #000;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Dölj horisontell scroll */
    overflow-y: auto; /* Tillåt vertikal scroll */
    text-align: center;
    scroll-behavior: smooth;
    padding-top: 70px; 
}


/* =================== Section Spacing & Container =================== */

/* Maxbredd och centrering för innehåll */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    overflow: hidden;
}

/* White spacing för sektioner */
section {
    margin-bottom: 2rem;
    padding-bottom: 50px;
}

/* Gemensam stil för alla specifika sektioner */
.custom-section {
    margin-bottom: 80px; /* Lägg till önskat mellanrum mellan sektionerna */
    padding-top: 80px;   /* Eventuell extra padding för att ge sektionerna mer luft */
}


.experience, .values {
    margin-top: 10px;
    width: 100%; /* Säkerställ att sektionen alltid är 100% bred */
    background-image: url('bilder/sectionbackground.webp'); /* Ange sökvägen till din bild */
    background-size: 50%; /* Gör bakgrundsbilden 50% mindre */
    background-position: center; /* Centrerar bakgrundsbilden */
    background-repeat: no-repeat; /* Hindrar bakgrundsbilden från att upprepas */
}

/* =================== Text Styling =================== */

h2 {
    color: #ffffff;
}

h3 {
    color: #777777;
}

p {
    font-size: 18px;
}

/* =================== Animation for Sections =================== */

.section-to-animate {
    opacity: 0;
    transform: translateY(20px); /* Ger en liten uppåtgående rörelse */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Justera för att inkludera transform */
}

.section-to-animate.animate {
    opacity: 1;
    transform: translateY(0); /* Återställ till ursprungsläget */
}


/* =================== Title Styling for Sections =================== */

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: transparent;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(145, 71, 255, 0.6)), 
                url('gif/background.gif') center/cover no-repeat;
    background-size: 800px 600px;
    background-position: 50% 50%;
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1;
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
    display: inline-block;
    position: relative;
}

.title-container {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.title-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    opacity: 0.5;
    z-index: -1;
}

#main-content {
    position: relative;
    z-index: 1;
    opacity: 1;
    visibility: hidden; /* Lägg till detta */
}

img[loading="lazy"] {
    /* Om bilder inte visas korrekt, lämna detta tomt */
}


/* =================== Intro Animation Styles =================== */

#intro-animation {
    background-color: #12111F;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: background-color 2.5s ease;
    overflow: hidden;
    z-index: 100; /* Högre z-index under animationen */
}

#intro-animation.roll-up {
    animation: rollUp 2s ease forwards;
    z-index: -1; /* Detta gör att innehållet syns under animationen */
}

#main-content.show {
    visibility: visible; /* Gör huvudinnehållet synligt när det är klart */
}


.word {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 6.5rem;
    font-weight: 900;
    font-family: 'Arial Black', sans-serif;
    background: linear-gradient(45deg, #896D97, #9E7AB0, #B581CD, #BF8DD0);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    animation: wordOpacity 0.5s ease-in-out forwards, complexGradientShift 0.7s linear infinite;
    transition: opacity 0.5s ease;
}

@keyframes wordOpacity {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes complexGradientShift {
    0% { background-position: 0% 50%; background-color: #896D97; }
    100% { background-position: 0% 50%; background-color: #BF8DD0; }
}

#word1, #word2, #word3, #word4, #word5 {
    position: absolute;
}

@keyframes showWord {
    0% { opacity: 0; transform: scale(0.4); }
    20% { opacity: 1; transform: scale(0.8); }
    80% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(1.6); }
}

#word1 { animation: showWord 0.375s ease-in-out forwards; }
#word2 { animation: showWord 0.375s ease-in-out 0.40s forwards; }
#word3 { animation: showWord 0.575s ease-in-out 0.80s forwards; }
#word4 { animation: showWord 0.875s ease-in-out 1.60s forwards; }
#word5 { animation: showWord 1.375s ease-in-out 2.40s forwards; }

/* For mobile-specific handling */
@media (max-width: 768px) {
    .word {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .word {
        font-size: 2rem;
    }
}

/* =================== Social Media Icons =================== */

.social-media-icons {
    list-style: none;
    display: flex;
    gpa: -10px;
}

.social-media-icons a {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.social-media-icons a img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

.social-media-icons a:hover {
    background-color: rgba(145, 71, 255, 0.8);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(145, 71, 255, 0.5);
}

/* =================== Intro Bubble Styles =================== */

/* Popup Chat Bubble */
.chat-bubble {
    position: fixed;
    bottom: 80px;
    right: 20px;
    min-width: 120px;
    min-height: 170px;
    max-width: 350px;
    max-height: 350px;
    padding: 5px;
    background: #1E1E2E; /* Mörk bakgrundsfärg */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Mjuk, ljus kantlinje */
    border-radius: 10px; /* Rundade hörn */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 15px rgba(0, 0, 0, 0.6); /* Svag vit skugga och en mörkare skugga */
    z-index: 1000;
    transform: scale(0);
    overflow: auto;
    text-align: center;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Arial', sans-serif; /* Modern sans-serif-teckensnitt */
    color: #E0E0E0; /* Ljusare textfärg */
    font-weight: normal;
}


/* Bubble Text */
#bubble-text {
    font-size: 18px; /* Justerat textstorleken */
    margin: 0;
    padding: 0;
    max-width: 80%;
    color: #E0E0E0; /* Enkel textfärg för bättre läsbarhet */
}

/* Feedback Link */
.feedback-link {
    display: block;
    color: #B399FF; /* Ljuslila färg */
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    font-size: 14px;
}

/* Close Button */
#close-popup {
    background-color: rgba(255, 255, 255, 0.1); /* Genomskinlig vit bakgrund */
    color: #E0E0E0; /* Ljus textfärg */
    border: 1px solid #444; /* Mörk kantlinje */
    padding: 5px 10px;
    border-radius: 8px; /* Rundade hörn */
    cursor: pointer;
    font-size: 14px;
    position: absolute;
    top: 10px;
    right: 10px;
    transition: background-color 0.3s ease; /* Smooth hover-effekt */
}

/* Hover-effekt för stäng-knappen */
#close-popup:hover {
    background-color: #444; /* Mörkare bakgrund vid hover */
}

/* klass som aktiveras av JS */
.chat-bubble.is-visible {
  display: flex;
  animation: popup-animation 0.5s forwards;
}

/* Popup Animation */
@keyframes popup-animation {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Media Query för mindre skärmar */
@media (max-width: 600px) {
    .chat-bubble {
        max-width: 150px;
        max-height: 150px;
        padding: 10px;
    }

    #bubble-text {
        font-size: 14px; /* Justerat fontstorlek för mindre skärmar */
    }

    .feedback-link {
        font-size: 12px;
    }

    #close-popup {
        padding: 3px 6px;
        font-size: 12px;
    }
}

/* =================== Header =================== */

/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem; /* Minskar padding på vänster och höger sida */
    background: rgba(18, 17, 31, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    z-index: 1000;
    transition: transform 0.3s ease, border-radius 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0 0 15px 15px;
    box-shadow: none;
}

/* Logo Styling */
.navbar .logo img {
    height: 40px;
    padding-left: 0; /* Tar bort padding till vänster */
    padding-right: 0; /* Tar bort padding till höger */
}

.navbar.scrolled-up {
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

.navbar.hidden {
    transform: translate(-50%, -100%);
}

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navbar-right {
    margin-left: auto;
}

.navbar-links {
    list-style: none;
    display: flex;
    gap: 10px;
}

.navbar-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.navbar-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-icons {
    display: none;
    list-style: none;
    gap: 20px;
}

/* Bottom Navbar Styling */
.bottom-navbar {
    display: none; /* Dölj från början, visa bara på mobila enheter */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 17, 31, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.5rem 0;
    border-radius: 15px 15px 0 0;
}

.bottom-navbar-icons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bottom-navbar-icons li {
    text-align: center;
}

.bottom-navbar-icons a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bottom-navbar-icons .icon {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
}

/* Show bottom navbar on mobile devices */
@media (max-width: 768px) {
    .bottom-navbar {
        display: block;
    }
    
    /* Hide the original icons in the top navbar */
    .navbar-icons {
        display: none;
    }
}

/* =================== Language Menu =================== */


.language-menu {
    position: relative;
    display: inline-block;
    margin-left: -20px;
    margin-top: 5px;
}

.language-selector {
    cursor: pointer;
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 35px;
    left: 0;
    background-color: rgba(18, 17, 31, 0.9);
    border-radius: 25px;
    padding: 5px;
    width: 40px;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-left: -5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.language-icon-wrapper {
    display: inline-flex; /* Ensures the child elements align properly */
    justify-content: center; /* Center the icon */
    align-items: center; /* Center the icon */
    width: 50px; /* Adjust as needed */
    height: 50px; /* Adjust as needed */
    margin: 5px; /* Add spacing between icons */
    border-radius: 50%; /* Keeps the circular appearance */
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer; /* Pointer to indicate it's clickable */
}

.language-icon-wrapper:hover {
    background-color: rgba(145, 71, 255, 0.8);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(145, 71, 255, 0.5);
}

.language-icon {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; /* Updated transition */
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px;
    z-index: 100;
}

.language-icon:hover {
    background-color: rgba(145, 71, 255, 0.8);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(145, 71, 255, 0.5);
}

#current-language-icon {
    width: 30px;
    height: 30px;
    display: inline-block; /* Se till att bilden visas som en inline-block */
}


img:not(.language-icon) {
    -webkit-user-drag: none;
    user-select: none;
}

/* =================== Hero Image and Title Styling =================== */

.hero {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    min-height: 45vh;
    box-sizing: border-box;
    margin-top: 0px;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%; /* Säkerställ att sektionen alltid är 100% bred */
    background-image: url('bilder/sectionsbackground.webp'); /* Ange sökvägen till din bild */
    background-size: 50%; /* Gör bakgrundsbilden 50% mindre */
    background-position: center; /* Centrerar bakgrundsbilden */
    background-repeat: no-repeat; /* Hindrar bakgrundsbilden från att upprepas */
}

.hero-title-container {
    position: relative;
    z-index: 1;
    display: inline-block;
}

.hero-title {
    font-size: 5.0rem;
    font-weight: 900;
    color: transparent;
    max-width: 920px;
    background-color: #6b46c1;
    background-image:
        linear-gradient(135deg, rgba(183, 148, 255, 0.2), rgba(212, 184, 255, 0.2) 45%, rgba(138, 95, 224, 0.2) 100%),
        url('gif/background2.gif'),
        linear-gradient(135deg, #6b46c1 0%, #8a5fe0 50%, #5a3a9f 100%);
    background-size: 100% 100%, 130% 130%, 100% 100%;
    background-position: center center, center 85%, center center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-blend-mode: normal, screen, normal;
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1;
    font-family: 'Arial Black', 'Arial Bold', sans-serif;
}

.hero-title-overlay {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    opacity: 0.5;
    z-index: -1;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: -20px;
}

/* =================== Profile Section =================== */

.profile-section,
.profile-container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    gap: 10px;
    padding-bottom: 0;
}

.profile-container {
    flex-direction: column;
    width: 100%;
}

.profile-slideshow {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px;
    margin-bottom: -50px;
}

.profile-picture {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    padding: 5px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(145, 71, 255, 0.2));
    -webkit-mask-image: radial-gradient(circle, white 100%, transparent 100%);
    mask-image: radial-gradient(circle, white 100%, transparent 100%);
    opacity: 0;
    transition: opacity 1s ease;
}

.emoji-slideshow {
    position: relative; /* Changed from absolute to relative */
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    z-index: 10;
    margin-top: 140px; /* Adjust as necessary */
}


.emoji-icon {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 0; /* Changed to 0 */
    left: 0; /* Changed to 0 */
    right: 0; /* Added to center within the container */
    bottom: 0; /* Added to center within the container */
    margin: auto; /* This centers the emoji in the parent container */
    opacity: 0;
    transform-origin: center;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.email-link {
    text-decoration: none;
    color: inherit; /* Behåller färgen från temat */
}

/* Justera layouten för e-post och ikoner */
.email-container {
    display: inline-flex; /* Placera ikonerna bredvid e-postadressen */
    align-items: center;
    gap: 5px; /* Mellanrum mellan e-post och ikoner */
    margin-left: 10px; /* Litet avstånd mellan 'Email:' och adressen */
}

.copy-icon {
    cursor: pointer; /* Gör bara Copy-ikonen klickbar */
}

.mail-icon:hover {
    transform: scale(1.2); /* Liten zoom vid hover */
}

.copy-icon:hover {
    transform: scale(1.2); /* Liten zoom vid hover */
}

/* Keyframe animation for bounce effect */
@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Add bounce class to activate bounce effect */
.bounce {
    animation: bounceIn 0.5s ease both;
}


/* =================== Scroll Animations =================== */

@keyframes scrollLeft {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%); /* Flyttar hela innehållet till vänster */
    }
}

/* För stora företagets logotypstorlek */
.company-logo.large-company-logo {
    width: 200px; /* Sätt bredden till exakt 200px */
    height: auto;
    display: inline-block;
    margin: 0 10px; /* Marginal mellan logotyperna */
    object-fit: contain; /* Gör så att logotyperna anpassar sig proportionellt inom sin ram */
}


/* =================== Project Cards =================== */

.info-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 0 auto;
    align-items: center;
    width: 100%; /* Säkerställ att sektionen alltid är 100% bred */
    background-image: url('bilder/sectionbackground.webp'); /* Ange sökvägen till din bild */
    background-size: 50%; /* Gör bakgrundsbilden 50% mindre */
    background-position: center; /* Centrerar bakgrundsbilden */
    background-repeat: no-repeat; /* Hindrar bakgrundsbilden från att upprepas */
}

.info-card {
    background-size: 200% 200%;
    animation: gradientShiftParkingTime 10s ease infinite;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    padding: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 20px);
    margin: 10px;
    max-width: 650px;
}

.info-card-content {
    background: linear-gradient(135deg, #1A1A1A, #000000);
    border-radius: 15px;
    padding: 20px;
}

/* =================== Areas of Work Cards =================== */

.areas-of-work {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    gap: 10px;
}

.area-card {
    --accent: 179, 136, 255;
    position: relative;
    display: flex;
    align-items: center;
    padding: 22px 24px;
    width: 100%;
    max-width: 460px;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: transform 0.35s cubic-bezier(.22,.61,.36,1),
                background-color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    cursor: default;
    overflow: visible;
}
.area-card::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(var(--accent), 0.55), rgba(var(--accent), 0));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.area-card:hover { transform: translateY(-3px); }
.area-card:hover::before { opacity: 1; }
.area-card.uiux-design { --accent: 255, 230, 90; }
.area-card.conceptionalize { --accent: 255, 105, 180; }
.area-card.brand-design { --accent: 110, 231, 130; }
.area-card.platforms { --accent: 110, 165, 255; }
.area-card.agile-mythology { --accent: 255, 165, 80; }
.area-card.analytics { --accent: 179, 136, 255; }

/* Specifik hover-styling för varje kort */

/* UI & UX Design Card - Gul Dropshadow */
.area-card.uiux-design:hover {
    background-color: rgba(255, 255, 0, 0.05);
    box-shadow: 0 2px 8px rgba(255, 255, 0, 0.3);
}

.area-card.uiux-design:hover .area-icon {
    filter: drop-shadow(0 0 3px rgba(255, 255, 0, 0.5));
}

/* Conceptionalize Card - Rosa Dropshadow */
.area-card.conceptionalize:hover {
    background-color: rgba(255, 20, 147, 0.05);
    box-shadow: 0 2px 8px rgba(255, 20, 147, 0.3);
}

.area-card.conceptionalize:hover .area-icon {
    filter: drop-shadow(0 0 3px rgba(255, 20, 147, 0.5));
}

/* Brand Design Card - Grön Dropshadow */
.area-card.brand-design:hover {
    background-color: rgba(0, 255, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 255, 0, 0.3);
}

.area-card.brand-design:hover .area-icon {
    filter: drop-shadow(0 0 3px rgba(0, 255, 0, 0.5));
}

/* Platforms Card - Blå Dropshadow */
.area-card.platforms:hover {
    background-color: rgba(0, 0, 255, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 255, 0.3);
}

.area-card.platforms:hover .area-icon {
    filter: drop-shadow(0 0 3px rgba(0, 0, 255, 0.5));
}

/* Agile Mythology Card - Orange Dropshadow */
.area-card.agile-mythology:hover {
    background-color: rgba(255, 165, 0, 0.05);
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.area-card.agile-mythology:hover .area-icon {
    filter: drop-shadow(0 0 3px rgba(255, 165, 0, 0.5));
}

/* Analytics Card - Lila Dropshadow */
.area-card.analytics:hover {
    background-color: rgba(138, 43, 226, 0.05);
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.3);
}

.area-card.analytics:hover .area-icon {
    filter: drop-shadow(0 0 3px rgba(138, 43, 226, 0.5));
}

.area-icon {
    width: 72px;
    height: 72px;
    margin-right: 18px;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(.22,.61,.36,1), filter 0.3s ease;
}
.area-card:hover .area-icon { transform: scale(1.06) rotate(-2deg); }

.area-text { min-width: 0; }
.area-text h3 {
    color: #fff;
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    font-size: 17px;
    margin: 0 0 4px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: left;
    line-height: 1.25;
}
.area-text h4 {
    color: rgba(255,255,255,0.6);
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    font-size: 13.5px;
    margin: 0;
    font-weight: 400;
    text-align: left;
    line-height: 1.5;
    letter-spacing: 0.005em;
}

/* === Hover chat-bubble for service cards === */
.area-card__bubble {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 14px);
    transform: translate(-50%, 6px);
    width: max-content;
    max-width: 320px;
    padding: 12px 16px;
    background: rgba(20, 19, 42, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(var(--accent), 0.35);
    border-radius: 14px;
    color: rgba(255,255,255,0.92);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    box-shadow: 0 14px 34px rgba(0,0,0,0.5),
                0 0 0 1px rgba(var(--accent), 0.08),
                0 0 30px rgba(var(--accent), 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(.22,.61,.36,1), visibility 0s linear 0.3s;
    z-index: 5;
}
.area-card__bubble::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 14px; height: 14px;
    transform: translateX(-50%) rotate(45deg);
    background: rgba(20, 19, 42, 0.96);
    border-right: 1px solid rgba(var(--accent), 0.35);
    border-bottom: 1px solid rgba(var(--accent), 0.35);
    border-bottom-right-radius: 3px;
}
.area-card:hover .area-card__bubble,
.area-card:focus-within .area-card__bubble {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(.22,.61,.36,1), visibility 0s;
}
@media (max-width: 640px) {
    .area-card__bubble { display: none; }
}

/* =================== Card Content Styling =================== */

.info-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    align-items: center;
}

.info-card {
    background-size: 200% 200%;
    animation: gradientShiftParkingTime 10s ease infinite;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    padding: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 20px); /* Behåller en tredjedel av bredden */
    max-width: 650px; /* Maximal bredd för varje kort */
    margin: 10px;
}

.info-card-content {
    background: linear-gradient(135deg, #1A1A1A, #000000);
    border-radius: 15px;
    padding: 20px;
    position: relative; /* Ensure relative positioning for inner elements */
    z-index: 1; /* Make sure content is above other layers */
}

/* =================== Project Header Styling =================== */

.project-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.project-details {
    display: flex;
    justify-content: space-between; /* Space between title and company info */
    align-items: center; /* Vertically align items */
    margin-bottom: 20px;
}

.project-details h2 a {
    color: #6c1ba7;
    text-decoration: none;
}

.project-details h4 {
    color: #ffffff;
    margin-top: 10px;
}

.project-title {
    flex-grow: 1; /* Allow title to take available space */
    text-align: left;
    color: #ffffff;
}

.company-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 10;
}

.popup-body .company-info {
    display: flex;
    flex-direction: column; /* Tvinga innehållet i en kolumn */
    align-items: center;    /* Centrerar elementen horisontellt */
    justify-content: center; /* Centrerar elementen vertikalt om utrymme finns */
    z-index: 10;
    width: 100%;            /* Gör att innehållet tar upp full bredd */
}

.popup-body .company-info h2, 
.popup-body .company-info h4 {
    text-align: center;      /* Justera texten för att vara centrerad */
}

.company-info img {
    margin-bottom: 10px;
    width: 120px; /* Öka storleken på logotypen */
    height: auto;
}

.company-info h2 a {
    font-size: 18px; /* Standard font size for larger screens */
    color: #6c1ba7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.company-info h2 a:hover {
    color: #4b0082;
    text-decoration: underline;
}

.popup-body .project-details {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centerar allt i mitten */
    gap: 10px;
}

.project-logo img {
    width: 40px;
    height: 40px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-right: 20px;
}

.info-card h2 {
    font-size: 18px;
    color: #8a2be2;
    margin: 10px 0;
}

.project-link {
    font-size: 14px;
    color: #6c1ba7;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #4b0082;
    text-decoration: underline;
}


/* =================== Project Image Styling =================== */

.project-image {
    width: 100%;
    height: 450px;
    background-size: cover;
    background-position: center;
    border-radius: 15px 15px 0 0; /* Rundade hörn bara för toppen */
    margin-bottom: 15px;
    position: relative; /* Behåll position relativ för att kontrollera before-pseudoelementet */
}

.project-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: none; /* Detta gör att pseudoelementet inte blockerar klick */
    transition: background-color 0.3s ease;
}

.info-card:hover .project-image::before {
    background-color: rgba(0, 0, 0, 0.1);
}

.info-card h4 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 20px;
    text-align: left;
}


/* =================== Hover Effects for Info Cards =================== */

.info-card:hover {
    transform: scale(1.01); /* Subtle zoom effect */
    box-shadow: 0 0 30px rgba(145, 71, 255, 0.7); /* Stronger shadow effect */
}

.info-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    border-radius: 20px;
    background: linear-gradient(135deg, #1E90FF, #00BFFF, #87CEEB, #4682B4);
    background-size: 200% 200%;
    opacity: 0.7;
    animation: gradientShiftParkingTime 10s ease infinite;
    transition: opacity 0.3s ease;
}

.info-card:hover::before {
    background: linear-gradient(135deg, #4b0082, #8a2be2, #FF8A00, #00ff7f);
    opacity: 1;
    animation: hoverGradientParkingTime 5s ease infinite;
}

/* =================== Unique Backgrounds for Each Project Card =================== */

#parking-time-card {
    background: linear-gradient(135deg, #1E90FF, #00BFFF, #87CEEB, #4682B4);
    background-size: 200% 200%;
    animation: gradientShiftParkingTime 5s ease infinite;
}

#parking-time-card:hover::before {
    background: linear-gradient(135deg, #00BFFF, #1E90FF, #4682B4, #87CEEB);
    opacity: 1;
    animation: hoverGradientParkingTime 5s ease infinite;
}

/* Parking Time: Blå Gradient */
.info-card:nth-child(1) {
    background: linear-gradient(135deg, #1E90FF, #00BFFF, #87CEEB, #4682B4);
}

/* Red Milk LLC: Gold/Yellow Gradient */
.info-card:nth-child(2) {
    background: linear-gradient(135deg, #FFD700, #FF8C00, #FFE135, #FFA500);
    background-size: 200% 200%;
    animation: gradientShiftRedMilk 5s ease infinite;
}

.info-card:nth-child(2):hover::before {
    background: linear-gradient(135deg, #FF0084, #FFC837, #8A2BE2, #1E90FF);
    opacity: 1;
    animation: hoverGradientRedMilk 5s ease infinite;
}

/* Ahum: Pink/Red Gradient */
.info-card:nth-child(3) {
    background: linear-gradient(135deg, #FF69B4, #FF1493, #DB7093, #FF4500);
    background-size: 200% 200%;
    animation: gradientShiftAhum 5s ease infinite;
}

.info-card:nth-child(3):hover::before {
    background: linear-gradient(135deg, #FF69B4, #FF1493, #4b0082, #FF6347);
    opacity: 1;
    animation: hoverGradientAhum 5s ease infinite;
}

/* Carl F: Green Gradient */
.info-card:nth-child(4) {
    background: linear-gradient(135deg, #66ff66, #009933, #00cc66, #33ff99);
    background-size: 200% 200%;
    animation: gradientShiftCarlF 5s ease infinite;
}

.info-card:nth-child(4):hover::before {
    background: linear-gradient(135deg, #00ff7f, #32CD32, #8A2BE2, #FF8A00);
    opacity: 1;
    animation: hoverGradientCarlF 5s ease infinite;
}

/* =================== Animation for Background Shift =================== */

@keyframes gradientShiftParkingTime {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShiftRedMilk {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShiftAhum {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShiftCarlF {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =================== Hover Animation for Gradient =================== */

@keyframes hoverGradientParkingTime {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hoverGradientRedMilk {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hoverGradientAhum {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hoverGradientCarlF {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* =================== Individual Info Card Text Styling =================== */

.info-card p {
    font-size: 14px;
    color: #fff;
    margin-top: 10px;
    text-align: left;
    line-height: 1.5;
}

.info-card p {
    position: relative;
    z-index: 2;
}


/* =================== Individual Project Cards =================== */

/* Unique Styles for each Project Card */
#parking-time-card {
    background: linear-gradient(135deg, #1E90FF, #00BFFF, #87CEEB, #4682B4);
    background-size: 200% 200%;
    animation: gradientShiftParkingTime 5s ease infinite;
}

#parking-time-card:hover::before {
    background: linear-gradient(135deg, #00BFFF, #1E90FF, #4682B4, #87CEEB);
    opacity: 1;
    animation: hoverGradientParkingTime 5s ease infinite;
}

/* Red Milk LLC: Guld/Gul Gradient */
.info-card:nth-child(2) {
    background: linear-gradient(135deg, #FFD700, #FF8C00, #FFE135, #FFA500);
    background-size: 200% 200%;
    animation: gradientShiftRedMilk 5s ease infinite;
}

.info-card:nth-child(2):hover::before {
    background: linear-gradient(135deg, #FF0084, #FFC837, #8A2BE2, #1E90FF);
    opacity: 1;
    animation: hoverGradientRedMilk 5s ease infinite;
}

/* Ahum: Rosa/Röd Gradient */
.info-card:nth-child(3) {
    background: linear-gradient(135deg, #FF69B4, #FF1493, #DB7093, #FF4500);
    background-size: 200% 200%;
    animation: gradientShiftAhum 5s ease infinite;
}

.info-card:nth-child(3):hover::before {
    background: linear-gradient(135deg, #FF69B4, #FF1493, #4b0082, #FF6347);
    opacity: 1;
    animation: hoverGradientAhum 5s ease infinite;
}

/* Carl F: Grön Gradient */
.info-card:nth-child(4) {
    background: linear-gradient(135deg, #66ff66, #009933, #00cc66, #33ff99);
    background-size: 200% 200%;
    animation: gradientShiftCarlF 5s ease infinite;
}

.info-card:nth-child(4):hover::before {
    background: linear-gradient(135deg, #00ff7f, #32CD32, #8A2BE2, #FF8A00);
    opacity: 1;
    animation: hoverGradientCarlF 5s ease infinite;
}

/* =================== Animations =================== */

/* Background Shift Animation for Project Cards */
@keyframes gradientShiftParkingTime {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShiftRedMilk {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShiftAhum {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientShiftCarlF {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hover Gradient Animation */
@keyframes hoverGradientParkingTime {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hoverGradientRedMilk {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hoverGradientAhum {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes hoverGradientCarlF {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =================== Title Styling for Values Section =================== */
.values-title-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.custom-values-title {
    font-size: 24px;
    color: #fff;
    margin-bottom: 10px;
}

.custom-values-header {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

/* =================== Values Section Styling =================== */
.work-values-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0 auto;
    max-width: 1100px;
    padding: 20px;
    perspective: 1200px;
    align-items: stretch;
    justify-items: stretch;
}

/* Tablet: 3 columns */
@media (max-width: 1024px) {
    .work-values-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        padding: 16px;
        max-width: 720px;
    }
}

/* Small tablet / large mobile: 2 columns */
@media (max-width: 720px) {
    .work-values-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 14px;
        max-width: 520px;
    }
}

/* Mobile: 2 tighter columns */
@media (max-width: 480px) {
    .work-values-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 12px;
        max-width: 100%;
    }
}

/* Hide any legacy dots container (no longer used) */
.dots-container { display: none !important; }

.value-card-custom {
    position: relative;
    background: linear-gradient(140deg, rgba(145, 71, 255, 0.08), rgba(255, 255, 255, 0.03));
    border-radius: 16px;
    padding: 18px 16px 16px;
    width: 100%;
    min-height: 140px;
    box-sizing: border-box;
    color: #fff;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    border: 1px solid rgba(221, 160, 221, 0.15);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.45s cubic-bezier(.2,.9,.3,1.4),
                box-shadow 0.35s ease,
                border-color 0.35s ease,
                background 0.35s ease;
    will-change: transform;
    overflow: hidden;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Subtle glow that follows hover */
.value-card-custom::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(183, 148, 255, 0.25), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.value-card-custom:hover {
    transform: translateY(-6px) rotate(-0.6deg);
    border-color: rgba(183, 148, 255, 0.5);
    box-shadow: 0 18px 40px rgba(145, 71, 255, 0.25);
}

.value-card-custom:hover::before { opacity: 1; }

.value-card-custom:nth-child(even):hover {
    transform: translateY(-6px) rotate(0.6deg);
}

/* Header */
.value-card-custom h4.value-header {
    font-size: 14px;
    font-weight: 600;
    margin: 6px 0 0;
    line-height: 1.25;
    transition: transform 0.4s cubic-bezier(.2,.9,.3,1.4);
}

/* Description hidden by default — collapses smoothly */
.value-card-custom p.value-description {
    font-size: 12.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
    text-align: left;
    max-height: 0;
    opacity: 0;
    margin: 0;
    overflow: hidden;
    transform: translateY(8px);
    transition: max-height 0.5s cubic-bezier(.2,.9,.3,1),
                opacity 0.35s ease,
                transform 0.45s cubic-bezier(.2,.9,.3,1.4),
                margin 0.4s ease;
}

/* Open state (toggled via JS) */
.value-card-custom.is-open {
    transform: translateY(-4px) scale(1.04);
    border-color: rgba(183, 148, 255, 0.65);
    background: linear-gradient(140deg, rgba(145, 71, 255, 0.18), rgba(255, 255, 255, 0.05));
    box-shadow: 0 22px 48px rgba(145, 71, 255, 0.32);
}

.value-card-custom.is-open p.value-description {
    max-height: 220px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 10px;
}

.value-card-custom.is-open h4.value-header {
    transform: translateY(-2px);
}

/* Small "tap to reveal" hint dot */
.value-card-custom::after {
    content: "+";
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 16px;
    color: rgba(183, 148, 255, 0.7);
    transition: transform 0.4s cubic-bezier(.2,.9,.3,1.4), color 0.3s ease;
    line-height: 1;
}

.value-card-custom.is-open::after {
    transform: rotate(45deg);
    color: rgba(255, 255, 255, 0.9);
}

/* Icon */
.value-card-custom img.value-icon {
    width: 26px;
    height: 26px;
}

.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(221, 160, 221, 0.18);
    margin: 0 auto;
    transition: transform 0.5s cubic-bezier(.2,.9,.3,1.4);
}

.value-card-custom:hover .icon-wrapper {
    transform: rotate(-8deg) scale(1.08);
}

.value-card-custom.is-open .icon-wrapper {
    transform: rotate(8deg) scale(1.1);
}

/* Dot scroll container */
.dots-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active {
    background-color: white;
}


/* =================== Value Card: Dot scroll container =================== */
.dots-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active {
    background-color: white;
}



/* =================== Previous Companies: Scroll with Infinite Effect =================== */

.scroll-container {
    display: flex;
    justify-content: flex-start; /* Säkerställ att innehållet börjar till vänster */
    align-items: center;
    width: 100%;
    overflow-x: auto;
    padding: 0; /* Ta bort eventuell padding */
    margin: 0; /* Ta bort eventuell margin */
}


.scroll-content {
    display: flex;
    gap: 16px; /* Mellanrum mellan korten */
    animation: scrollInfinite 20s linear infinite; /* Kontinuerlig scroll */
}

.scroll-content .company-card {
    flex: 0 0 auto; /* Förhindrar att kortens storlek ändras */
    width: 175px; /* Mindre fast bredd */
}

.scroll-clone {
    display: flex;
    gap: 16px; /* Samma gap som originalet */
}

/* Infinite scroll keyframes */
@keyframes scrollInfinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Responsiv design för mindre skärmar */
@media (max-width: 600px) {
    .scroll-content .company-card {
        width: 140px; /* Minskad bredd för mindre skärmar */
    }

    .scroll-container {
        max-width: 100%;
    }
}


/* New Scroll Container Styling */
.new-scroll-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Minsta bredd på 200px */
    gap: 5px; /* Mellanrum mellan bilder */
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsiv design för mindre skärmar */
@media (max-width: 600px) {
    .partner-logo {
        width: 100%;
        height: auto;
    }
    
    .new-scroll-container, .new-scroll-content, .companies-logos {
        width: 100%;
        max-width: none; /* Ta bort max-width-begränsningen */
        margin: 0; /* Ta bort eventuell marginal för att fylla hela bredden */
    }
}

/* För att ändra opacity vid hover */
.partner-logo:hover {
    opacity: 1;
}

/* Partner Logo Styling */
.partner-logo {
    width: 250px; /* Fast bredd */
    height: auto; 
    object-fit: contain;
    opacity: 0.5; 
    transition: opacity 0.3s ease;
    padding: 15px;
}

/* Styling för bakgrundsbild i sektionen */
.companies-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Säkerställ att sektionen alltid är 100% bred */
    background-image: url('bilder/sectionsbackground.webp'); /* Ange sökvägen till din bild */
    background-size: 50%; /* Gör bakgrundsbilden 50% mindre */
    background-position: center; /* Centrerar bakgrundsbilden */
    background-repeat: no-repeat; /* Hindrar bakgrundsbilden från att upprepas */
}

/* Responsiv design för mindre skärmar */
@media (max-width: 600px) {
    .partner-logo {
        width: 150px; /* Minska bredden till 100px */
        height: auto;
        padding: 5px;
    }

    .new-scroll-container, .new-scroll-content, .companies-logos {
        width: 100%;
        max-width: none; /* Ta bort max-width-begränsningen */
        margin: 0;
    }
}

/* Ta bort blå underlinje från länkar */
a {
    text-decoration: none;
    color: inherit;
}



/* Previous Companies Section */
.previous-companies {
    position: relative; /* Behåll relativ positionering för att placera gradient-skuggorna */
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    width: 100%; /* Full bredd som övriga sektioner */
    max-width: 1200px; /* Sätt en maxbredd */
    margin: 0 auto; /* Centrera sektionen horisontellt */
}

/* Fade Gradient Effects for Previous Companies - Global Styling for All Screen Sizes */
.previous-companies::before,
.previous-companies::after {
    content: "";
    position: absolute;
    top: 0;
    width: 120px; /* Smalare så endast kanten fadeas mjukt */
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.previous-companies::before {
    left: 0;
    background: linear-gradient(
        to right,
        #12111F 0%,
        rgba(18, 17, 31, 0.92) 35%,
        rgba(18, 17, 31, 0.55) 65%,
        rgba(18, 17, 31, 0) 100%
    );
}

.previous-companies::after {
    right: 0;
    background: linear-gradient(
        to left,
        #12111F 0%,
        rgba(18, 17, 31, 0.92) 35%,
        rgba(18, 17, 31, 0.55) 65%,
        rgba(18, 17, 31, 0) 100%
    );
}

@media (max-width: 600px) {
    .previous-companies::before,
    .previous-companies::after {
        width: 60px;
    }
}

/* Company Card Styling for Previous Companies */
.previous-companies .company-card {
    width: 175px;
    flex-shrink: 0; /* Förhindrar att korten krymper */
    margin-right: 16px; /* Mellanrum mellan korten */
}

.company-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 8px;
    width: 175px;
    color: #fff;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-card img.company-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 6px;
    margin-bottom: 6px;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.1));
    background-color: rgba(255, 255, 255, 0.1);
    mask-image: radial-gradient(circle, rgba(255, 255, 255, 1) 60%, rgba(255, 255, 255, 0) 100%);
}

.company-card p {
    margin: 6px 0;
    font-size: 12px;
    line-height: 1.35;
}

.company-link {
    color: #8a2be2;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
}

.company-link:hover {
    text-decoration: underline;
}

/* Minska storleken på company-card för mindre skärmar */
@media (max-width: 768px) {
    .company-card {
        width: 140px;
        padding: 6px;
    }

    .company-card img.company-logo {
        width: 48px;
        height: 48px;
    }

    .company-card p {
        font-size: 11px;
    }
}

/* Hover-info-text styling */
.hover-info-text {
    position: absolute;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    transform-origin: center;
}


/* Animation för text */
.animated-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid rgba(255, 255, 255, 0.75);
    animation: typing 2s steps(30, end), blink-caret 0.5s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: rgba(255, 255, 255, 0.75);
    }
}

/* Pop-in animation */
.pop-in {
    animation: popInBounce 0.4s ease forwards;
}

/* Animation för att studsa in */
@keyframes popInBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =================== Testimonials Section Styling =================== */

/* Testimonials Container Styling */
.testimonials-container {
    max-width: 1200px; /* Sätter maxbredd */
    margin: 0 auto; /* Centrerar innehållet */
    padding: 0 20px; /* Lägger till lite padding för mindre skärmar */
}

/* Testimonials Section */
.testimonials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

/* Styling för varje testimonial-kort */
.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    height: auto;
    color: #fff;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    position: relative;
    border: 2px solid rgba(221, 160, 221, 0.1);
    transition: all 0.3s ease;
}


.testimonial-card p {
    text-align: left;
}

.testimonial-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
}

.testimonial-logo {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.company-name {
    font-size: 18px;
    color: #fff;
    margin: 0;
    font-weight: bold;
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 1px;
}

.profile-info {
    text-align: center;
}

.profile-info h4 {
    margin: 5px 0 3px 0;
    font-size: 16px;
}

.profile-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.testimonial-content {
    margin-top: 20px;
    line-height: 1.6;
    font-size: 14px;
}

.testimonial-content p {
    text-align: left;
}

.review-button {
    margin-top: 20px;
}

.review-button a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.review-button a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.linkedin-review {
    width: 10px;
    height: 10px;
    margin-right: 5px;
}

/* =================== Popup Styling =================== */

.project-popup {
    display: none; /* Dölj popupen initialt */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.9); /* Bakgrundsfärg */
    z-index: 1000;
    overflow: hidden;
    border-radius: 25px;
}

.popup-content {
    background-color: rgba(18, 17, 31, 0.9);
    border-radius: 25px;
    overflow: hidden;
}


.project-popup .popup-content {
    background-color: rgba(18, 17, 31, 0.9);
    border: 2px solid rgba(221, 160, 221, 0.2);
    border-radius: 10px;
    width: 99%;
    max-width: 1000px;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    color: #f0f0f0;
}

.popup-header {
    display: flex;
    justify-content: space-between; /* Ser till att alla element är placerade korrekt horisontellt */
    align-items: center; /* Centrerar alla element vertikalt */
    padding: 30px 20px;
    position: sticky;
    top: 0;
    background-color: rgba(18, 17, 31, 0.8);
    z-index: 10;
    box-shadow: 0 4px 4px -2px rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border-bottom: 0.2px solid rgba(255, 255, 255, 0.2);
}

.popup-header .cta-button {
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 25px;
    background: linear-gradient(to right, #4c0082eb, #6c1ba7eb);
    color: #fff;
    border: none;
    cursor: pointer;
    margin-right: auto;
    position: absolute;
    left: 20px;
}

.popup-header h2 {
    margin: 0;
    font-size: 24px;
    text-align: center;
    flex-grow: 1;
    color: #ffffff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.popup-header .close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
    margin-left: auto;
}

.popup-header .close-btn:hover {
    color: #d3d3d3;
}

.popup-body {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    color: #f0f0f0;
    text-align: left;
    overflow-x: hidden; /* Tar bort horisontell scroll */
    max-width: 100%; /* Säkerställer att innehållet inte överskrider förälderns bredd */
    margin: 0;
}

.popup-body {
    padding-top: 0;
    padding-bottom: 30px;
    margin-top: 100;
    margin-bottom: 10px;
    border-bottom: 0.2px solid rgba(255, 255, 255, 0.2);
}


.popup-body h2 {
    text-align: center;
}

.popup-section {
    width: 100%;
    color: #f0f0f0;
}

.popup-section h3 {
    text-align: center;
    font-size: 18px;
    color: #f0f0f0;
    margin-top: 10px;
}

.popup-section h2 {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* =================== Popup Section: HEADER 2 LINES =================== */
.popup-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    margin-bottom: 50px;
}

.popup-section h2 {
    text-align: center;
    font-size: 24px;
    color: #f0f0f0;
    position: relative;
    display: inline-block; /* Gör rubriken så att den har sin egen bredd */
    z-index: 1; /* För att säkerställa att texten är ovanför linjerna */
}

.popup-section h2::before,
.popup-section h2::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 200px; /* Bestämmer längden på linjerna, här 100px */
    height: 2px;
    background-color: #f0f0f0;
    transform: translateY(-50%); /* Centrerar linjerna vertikalt i förhållande till texten */
}

.popup-section h2::before {
    left: -250px; /* Placera linjen till vänster om rubriken */
}

.popup-section h2::after {
    right: -250px; /* Placera linjen till höger om rubriken */
}

/* =================== Popup Section: P & UL Designs =================== */

.popup-section p, ul, li {
    text-align: left;
    line-height: 1.6;
    letter-spacing: 0;
}

.popup-section p {
    margin-bottom: 10px;
}

.popup-section ul {
    text-align: left;
}

/* General two-column layout for popup sections */
.popup-section.two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
}

/* Ensuring that columns stack vertically on small screens */
@media (max-width: 768px) {
    .popup-section.two-columns {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }
}

/* Styling for each column */
.column {
    padding: 10px; /* Add padding inside each column for spacing */
}

/* Full-width section (optional if needed for distinction) */
.popup-section.single-column {
    width: 100%;
}

.selling-points {
    max-width: 50%; /* Begränsa bredden på större skärmar */
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.selling-points p {
    margin: 0;
    padding: 10px 0; /* Lägg till vertikalt mellanrum för textblock */
    line-height: 1.6; /* Förbättrar läsbarheten */
    letter-spacing: 0.5px; /* För bättre textflöde */
    width: 100%; /* Gör texten lika bred som containern */
}

@media (max-width: 768px) {
    .selling-points {
        max-width: 100%; /* Gör det fullbrett på mindre skärmar */
        padding: 0 10px;
    }
}


/* =================== Popup Section: Larger Images =================== */

.popup-image {
    width: 100%; /* Bilden tar upp hela bredden på kortet */
    height: auto; /* Fixerad höjd för att skapa "teaser"-effekten */
    background-size: cover; /* Skalar bilden för att täcka hela bakgrunden */
    background-position: center; /* Centrerar bilden så att den beskärs lika från båda sidor */
    border-radius: 5px; /* Rundade hörn för bilderna */
    cursor: pointer; /* Förändrar pekaren till en hand vid hover */
    transition: transform 0.2s ease; /* Animeringseffekt vid hover */
    display: block;
    margin: 0 auto;
    pointer-events: auto;
}


.popup-image:hover {
    transform: scale(1.05); /* Förstorar bilden något vid hover */
}

.image-popup {
    display: inline-block; /* Gör länken inline-block för att passa bildstorleken */
    text-decoration: none; /* Ingen understrykning på bilder */
}

.image-popup img {
    display: block; /* Gör att bilderna visas som block-element i länken */
}

.full-image-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%; /* Minskat från 90% för att testa påverkan */
    max-height: 80%;
    z-index: 1001;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.8);
}

.full-image-popup {
    transition: transform 0.3s ease; /* Smooth zoom transition */
}

.zoomed-in {
    transform: scale(1.5); /* Zoom level, kan justeras */
    cursor: zoom-out;
}

.zoomed-out {
    transform: scale(1); /* Normal storlek */
    cursor: zoom-in;
}


/* Rubrik under bilder */
.image-caption {
    font-size: 12px; /* Mindre fontstorlek för bildrubriken */
    color: #cccccc; /* Ljusgrå färg */
    text-align: center; /* Centrera texten */
    margin-top: 5px; /* Avstånd mellan bilden och rubriken */
}

/* Teaser images styling */
.popup-image-teaser {
    width: 100%; /* Fyller hela bredden av föräldraelementet (.image-item) */
    height: auto; /* Bevarar bildens proportioner */
    border-radius: 5px; /* Rundade hörn på bilderna */
    display: block; /* Förhindrar att det finns extra utrymme under bilderna */
    margin: 0 auto; /* Centrerar bilden inom .image-item */
}

.popup-image-gallery {
    width: auto; /* Anpassar bredden efter bilden */
    max-width: 50px; /* Maximal bredd för att begränsa storleken */
    height: auto; /* Behåller bildens proportioner */
    border-radius: 5px; /* Rundade hörn */
    margin: 5px; /* Mellanrum mellan bilderna */
    cursor: pointer; /* Förändrar pekaren till en hand vid hover */
    transition: transform 0.2s ease; /* Animeringseffekt vid hover */
}

/* Ensures only images in .teaser-gallery are affected */
.teaser-gallery {
    display: flex; /* Gör innehållet till en flexbox för horisontell layout */
    flex-wrap: nowrap; /* Förhindrar radbrytning */
    justify-content: center; /* Centrerar bilderna horisontellt */
    gap: 40px; /* Mellanrum mellan bilderna */
}

.teaser-gallery img {
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effect */
}

.teaser-gallery img:hover {
    transform: scale(1.05); /* Slight zoom effect on hover */
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3); /* Adds shadow for depth */
}


/* Teaser images styling */
.teaser-gallery .popup-image-teaser {
    width: auto;
    max-width: 150px; /* Ensures that images are not too large */
    height: auto;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* Media query to handle mobile screens */
@media (max-width: 768px) {
    .teaser-gallery {
        flex-direction: column;
        align-items: center;
    }

    /* Stänger av transition- och hover-effekter på mobil */
    .popup-image,
    .teaser-gallery img,
    .popup-image-teaser {
        transition: none;
    }

    .popup-image:hover,
    .teaser-gallery img:hover,
    .popup-image-teaser:hover {
        transform: none;
        box-shadow: none;
    }
}


/* =================== Popup Section: Profile Picture Styling =================== */

.popup-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.popup-profile-image {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px;
    min-height: 96px;
    max-width: 96px;
    max-height: 96px;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    padding: 3px;
    background: linear-gradient(135deg, #4b0082, #8a2be2);
    object-fit: cover !important;
    object-position: 50% 50%;
    box-shadow: 0 0 15px rgba(145, 71, 255, 0.5);
    margin: 5px;
    box-sizing: border-box;
    flex: 0 0 96px;
    display: block;
}
#about-body .popup-profile-image,
#about-body img.popup-profile-image {
    width: 96px !important;
    height: 96px !important;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1 !important;
}

.popup-profile-subtitle {
    font-size: 14px;
    color: #cccccc; /* Ljusgrå färg för text */
    margin-top: 10px; /* Avstånd från profilbilden */
    text-align: center; /* Centrera texten */
}

/* =================== Popup Project Cards =================== */

.projects  {
    height: auto;
    max-width: 100%;
    margin: 0 auto;
    width: 100%; /* Säkerställ att sektionen alltid är 100% bred */
    background-image: url('bilder/sectionbackground.webp'); /* Ange sökvägen till din bild */
    background-size: 50%; /* Gör bakgrundsbilden 50% mindre */
    background-position: center; /* Centrerar bakgrundsbilden */
    background-repeat: no-repeat; /* Hindrar bakgrundsbilden från att upprepas */
}
    

/* Begränsar styling till projektkorten i popup-sektionen */
.popup-body .info-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    align-items: center;
}

.popup-body .info-card .project-image {
    height: auto; /* Anpassa höjden för popup-korten */
}

/* Justera kolumnlayout för mindre skärmar */
@media (max-width: 768px) {
    .popup-body .two-columns {
        grid-template-columns: 1fr; /* Gör att kolumnerna staplas vertikalt */
    }
}

.popup-body .info-card {
    background-size: 200% 200%;
    animation: gradientShiftParkingTime 10s ease infinite;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    padding: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex: 1 1 calc(33.333% - 20px); /* Behåller en tredjedel av bredden */
    max-width: 650px; /* Maximal bredd för varje kort */
}

.popup-body .info-card-content {
    background: linear-gradient(135deg, #1A1A1A, #000000);
    border-radius: 15px;
    padding: 20px;
}

.column {
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensure elements inside the column are centered */
    padding: 15px; /* Inre avstånd för innehåll */
}

.column-card {
    display: flex;
    flex-direction: column; /* Vertikal layout */
    justify-content: center; /* Centrera vertikalt */
    align-items: center; /* Centrera horisontellt */
    background-color: rgba(210, 240, 255, 0.2) !important;
    border: 2px solid rgba(180, 220, 240, 0.8) !important;
    border-radius: 10px; /* Rundade hörn */
    max-width: 99%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Lätt skugga för djup */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Animera hover-effekten */
}

.popup-section.column-card {
    text-align: center; /* Centrerar texten horisontellt */
    max-width: 60%; /* Gör att innehållet inte tar upp hela bredden */
    margin: 0 auto; /* Centrerar hela sektionen i mitten av föräldern */
    background-color: rgba(255, 255, 255, 0.2); /* Ljusgråvit bakgrund */
    border: 2px solid rgba(0, 0, 0, 0.1); /* Lätt svart kant */
    border-radius: 10px; /* Rundade hörn */
    padding: 5px; /* Inre avstånd för innehåll */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Lätt skugga */
    padding: 25px;
}

.clickable-card {
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

/* =================== Popup Project Header Styling =================== */

.popup-body .project-header {
    display: flex;
    flex-direction: column; /* Ändrar layouten till en kolumn */
    align-items: center; /* Centrerar elementen horisontellt */
    text-align: center; /* Gör att texten i rubrikerna centreras */
}

.popup-body .project-header h2,
.popup-body .project-header h3,
.popup-body .project-header h4 {
    margin: 5px 0; /* Mellanrum mellan rubrikerna */
    width: 100%; /* Gör rubrikerna fullbredd inom sin container */
    text-align: center; /* Centrerar texten i rubrikerna */
}

/* =================== Popup Project Image Styling =================== */

.popup-body .project-image {
    width: 100%;
    height: 100px; /* Justera höjden för popup-kort */
    background-size: cover;
    background-position: center;
    border-radius: 5px; /* Om du vill behålla rundade hörn */
    margin: 10px;
}

/* Justera eventuell pseudo-element för popup om du har det */
.popup-body .project-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* Justera täckningsfärgen för popupen */
    pointer-events: none;
    transition: background-color 0.3s ease;
}

/* För att undvika att hover-effekter stör popupen */
.popup-body .info-card:hover .project-image::before {
    background-color: rgba(0, 0, 0, 0.1);
}


/* Override global popup-body img rules for the profile image */
.popup-body .popup-profile img {
    max-width: 100px; /* Custom max-width for profile image */
    width: 100%; /* Responsive within its container */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Ensures no space under the image */
    object-fit: cover; /* Ensure the image fits well in its container */
    border-radius: 50%; /* Makes the profile image circular */
    border: 3px solid rgba(255, 255, 255, 0.2); /* Optional: add a border for styling */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Optional: adds a shadow for depth */
}

/* General rule for images within the popup body */
.popup-body img {
    max-width: 400px; /* Larger max-width for general images */
    width: 100%; /* Make images responsive */
    height: auto; /* Maintain aspect ratio */
    display: block; /* Ensure no space under images */
}

.popup-body .icon {
    max-width: 30px;
    display: block;
    margin: 20px auto;
}

.popup-body .project-logo img {
    max-width: 100px; /* Maxbredd för logotypen */
    width: 100%; /* Gör den responsiv */
    height: auto; /* Behåller original proportioner */
    border-radius: 50%; /* Gör logotypen rund */
    border: 2px solid rgba(255, 255, 255, 0.2); /* Lägger till en lätt kant */
    padding: 5px;
    background-color: rgba(255, 255, 255, 0.1); /* Lätt bakgrundsfärg */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Lägger till en skugga */
    margin: 10px;
}


.popup-body .info-card:hover .project-image::before {
    background-color: rgba(0, 0, 0, 0.1);
}

.popup-body .info-card h4 {
    font-size: 18px;
    color: #fff;
    text-align: left;
}

/* =================== Hover Effects for Popup Info Cards =================== */

.popup-body .info-card:hover {
    transform: scale(1.01);
    box-shadow: 0 0 30px rgba(145, 71, 255, 0.7);
}

.popup-body .info-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -1;
    border-radius: 20px;
    background: linear-gradient(135deg, #1E90FF, #00BFFF, #87CEEB, #4682B4);
    background-size: 200% 200%;
    opacity: 0.7;
    animation: gradientShiftParkingTime 10s ease infinite;
    transition: opacity 0.3s ease;
}

.popup-body .info-card:hover::before {
    background: linear-gradient(135deg, #4b0082, #8a2be2, #FF8A00, #00ff7f);
    opacity: 1;
    animation: hoverGradientParkingTime 5s ease infinite;
}

.popup-body .project-info h3 {
    font-size: 18px; /* Standardstorlek för större skärmar */
}

.popup-body .project-info h4 {
    font-size: 14px; /* Standardstorlek för tidsperioden */
}

/* =================== Popup Header: CTA Button =================== */

.popup-header .contact-btn {
    font-size: 14px;
    padding: 10px 20px; /* Justera storlek på knappen */
    border-radius: 25px;
    background: linear-gradient(to right, #4b0082, #8a2be2);
    color: #fff;
    border: none;
    cursor: pointer;
    margin-right: 10px; /* Behåller lite avstånd till vänster */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: inline-block; /* Säkerställer korrekt blockering */
    order: -1; /* Flyttar knappen till första plats i flexrad */
}

.popup-header .contact-btn:hover {
    background-image: linear-gradient(to right, #6c1ba7, #4c0082); /* Mörkare gradient vid hover */
    box-shadow: 0 0 10px 3px #45637A, 0 4px 15px rgba(145, 71, 255, 0.7); /* Glow-effekt */
    color: #ffffff;
}

/* =================== Profile Section: Icons and Buttons =================== */

.contact-profile-image {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(145, 71, 255, 0.2));
}

.availability-btn {
    display: flex;
    align-items: center;
    margin: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 25px;
    color: #fff;
    cursor: default;
    transition: background-color 0.3s ease, background-image 0.3s ease, box-shadow 0.3s ease;
}

/* Green Dot Icon Sizing */
.availability-icon {
    width: 10px; /* Ensures the green dot is small */
    height: 10px;
    margin-right: 5px; /* Adds some space between the dot and text */
    display: inline-block;
    object-fit: cover; /* Ensure the image fits within the defined dimensions */
}

/* Green dot size fix within internship-btn */
.popup-body .popup-profile .internship-status .internship-btn .availability-icon {
    width: 15px;
    height: 15px;
}


/* =================== Popup Section: PDF Links =================== */

.pdf-link {
    font-size: 14px;
    color: #BF8DD0;
    text-decoration: none;
    display: block;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.pdf-link:hover {
    color: #4b0082;
    text-decoration: underline;
}

/* =================== Video Popup Card =================== */

/* Popup styling */
.project-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease; /* Smidig övergång för popup */
    opacity: 0;
}

.project-popup[style*="display: flex"] {
    opacity: 1; /* Gör popupen synlig när display är 'flex' */
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative; /* För att placera stängningsknappen rätt */
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

.popup-body iframe {
    width: 100%;
    height: 400px;
}

/* =================== Video Popup Styling =================== */
.video-popup, .video-gallery {
    display: none; /* Dölj popupen initialt */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center; /* Centrera innehållet horisontellt */
    align-items: center; /* Centrera innehållet vertikalt */
    z-index: 1000;
}

/* Popupinnehåll centreras och behåller sin storlek */
.video-popup .popup-content {
    background-color: rgba(18, 17, 31, 0.9);
    border-radius: 10px;
    width: 90%; /* Anpassa bredden på popupinnehållet */
    max-width: 800px; /* Maximal bredd på popupen */
    padding: 20px;
    box-sizing: border-box; /* Inkludera padding i bredden */
}

.video-popup .close-btn-video {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
}

.video-popup iframe {
    width: 100%;
    height: 500px; /* Justera höjden för videon */
}


/* Video popup close button styling */
.close-btn-video {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
}


/* =================== Agile Mythology and Analytics Cards =================== */

/* Agile Mythology Card - Orange Dropshadow */
.area-card.agile-mythology:hover {
    background-color: rgba(255, 165, 0, 0.05);
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
}

.area-card.agile-mythology:hover .area-icon {
    filter: drop-shadow(0 0 3px rgba(255, 165, 0, 0.5));
}

/* Analytics Card - Lila Dropshadow */
.area-card.analytics:hover {
    background-color: rgba(138, 43, 226, 0.05);
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.3);
}

.area-card.analytics:hover .area-icon {
    filter: drop-shadow(0 0 3px rgba(138, 43, 226, 0.5));
}

.area-icon {
    width: 80px;
    height: 80px;
    margin-right: 15px;
}

.area-text h3 {
    color: #fff;
    font-size: 18px;
    margin: 0;
    font-weight: bold;
    text-align: left;
}

.area-text h4 {
    color: #bbb;
    font-size: 14px;
    margin: 0;
    font-weight: normal;
    text-align: left;
}

/* =================== Services Section =================== */

.service-btn {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
    margin: 20px auto;
}

.service-btn:hover {
    background-color: inherit; /* Behåll original bakgrundsfärg */
    color: inherit; /* Behåll original textfärg */
    box-shadow: none; /* Inget skuggeffekt */
    transform: none; /* Ingen skalning eller transformation */
}


.service-btn:active {
    transform: scale(0.98);
    box-shadow: 0 0 5px 2px rgba(145, 71, 255, 0.4);
}

.done-icon {
    width: 12px; /* Anpassa bredden efter behov */
    height: 12px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
}

/* =================== Tools Scroll Cards Styling =================== */

.tools-card {
    max-width: 600px; /* Begränsa maxbredden */
    overflow: hidden; /* Göm överflödigt innehåll */
    padding: 10px;
    position: relative;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#tools-scroll {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: start;
    align-items: center;
}

.scroll-content {
    display: flex;
    width: max-content; /* Bredden baseras på innehållet */
    gap: 20px;
    animation: scrollLeft 70s linear infinite; /* Infinite scroll animation */
    width: max-content; /* Gör att innehållet tar upp så mycket plats som det behöver */
}

.scroll-content img {
    width: 40px; /* Justera ikonstorlek */
    height: auto;
    display: inline-block;
    margin: 0 10px;
    transition: opacity 0.5s ease; /* Fade-effekt */
}

/* Infinite scroll keyframes */
@keyframes scrollLeft {
    0% {
        transform: translateX(0); /* Startar från 0 */
    }
    100% {
        transform: translateX(-50%); /* Flyttar till hälften av innehållets bredd */
    }
}

/* Förbättrad Fade-effekt på kanterna */
.tools-card::before,
.tools-card::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px; /* Öka bredden för en längre fade-effekt */
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.tools-card::before {
    left: 0;
    background: linear-gradient(to right, rgba(18, 17, 31, 1), rgba(18, 17, 31, 0.2), rgba(18, 17, 31, 0)); /* Längre gradient för mjukare övergång */
}

.tools-card::after {
    right: 0;
    background: linear-gradient(to left, rgba(18, 17, 31, 1), rgba(18, 17, 31, 0.2), rgba(18, 17, 31, 0)); /* Längre gradient för mjukare övergång */
}

/* =================== Scroll Container Images =================== */

/* Scroll Container */
.scroll-container {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.scroll-content {
    display: flex;
    gap: 20px;
}

/* Justera storleken för bild- och videoelement */
.image-item, .video-item {
    min-width: 100px; /* Öka bredden för varje objekt */
    max-width: 200px; /* Sätt en maxbredd för att begränsa storleken */
    cursor: pointer;
    text-align: center;
}

.image-item {
    flex: 1 1 auto; /* Hindrar elementet från att växa eller krympa */
    width: 150px; /* Ställ in en fast bredd för varje bild-item */
    box-sizing: border-box; /* Inkluderar padding och border i totalbredden */
    text-align: center; /* Centrera innehållet inom varje kort */
}

/* Justera storleken för bilder */
.image-item img, .video-item img {
    width: 100%; /* Ta upp hela bredden på förälderelementet */
    object-fit: cover; /* Gör att bilden täcker hela utrymmet utan att deformeras */
    border-radius: 5px; /* Rundade hörn för en snyggare effekt */
    display: block;
    margin: 0 auto; /* För att centrera bilden inom kortet */
}

.image-gallery {
    display: flex; /* Gör innehållet till en flexbox */
    flex-wrap: wrap; /* Tillåter radbrytning om nödvändigt */
    justify-content: center; /* Centrerar alla kort i galleriet */
    gap: 10px; /* Mellanrum mellan korten */
}

.popup-image-teaser {
    width: 100%; /* Gör bilden responsiv inom sitt kort */
    border-radius: 5px; /* Valfritt: rundar hörnen på bilderna */
}

.image-caption {
    margin-top: 5px; /* Lägger till lite avstånd mellan bilden och texten */
    font-size: 12px; /* Justera storlek på texten om nödvändigt */
}



/* Fullskärmspopup */
.fullscreen-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.fullscreen-popup img, .fullscreen-popup iframe {
    max-width: 90%;
    max-height: 90%;
}

/* =================== Contact Card Styling =================== */

.contact-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 17, 31, 0.9);
    border: 1px solid rgba(145, 71, 255, 0.5);
    border-radius: 15px;
    margin: 40px auto;
    padding: 40px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 0 15px rgba(145, 71, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Lägg till övergångseffekt */
    position: relative;
    background-image: url('bilder/sectionbackground.webp'); /* Ange sökvägen till din bild */
    background-size: 50%; /* Gör bakgrundsbilden 50% mindre */
    background-position: center; /* Centrerar bakgrundsbilden */
    background-repeat: no-repeat; /* Hindrar bakgrundsbilden från att upprepas */
}

/* Hover-effekt för Contact-kortet */
.contact-card:hover {
    transform: scale(1.01); /* Ökar storleken lite för en subtil zoom-effekt */
    box-shadow: 0 0 30px rgba(145, 71, 255, 0.7); /* Öka skuggans storlek och intensitet */
}

.contact-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    max-width: 65%;
    text-align: left;
}

.contact-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 50%;
}

/* Specifik stil för profilbilden & Availability button i Contact-kortet */
.contact-profile-image {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    padding: 3px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(145, 71, 255, 0.2));
    -webkit-mask-image: radial-gradient(circle, white 100%, transparent 100%);
    mask-image: radial-gradient(circle, white 100%, transparent 100%);
    display: block;
    margin-right: 10px;
}

.profile-info-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.availability-btn {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    transition: background-color 0.3s ease, background-image 0.3s ease, box-shadow 0.3s ease;
}

.availability-icon {
    width: 10px;
    height: 10px;
    margin-right: 5px;
}

.social-media-links {
    display: flex;
    gap: 8px;
}

/* Specifik stil för sociala media ikoner i Contact-kortet */
.contact-card .social-media-links img {
    width: 50px;
    height: 50px;
}

/* Profilbilden i Contact-kortet */
.contact-profile-picture {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    padding: 3px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(145, 71, 255, 0.2));
    -webkit-mask-image: radial-gradient(circle, white 100%, transparent 100%);
    mask-image: radial-gradient(circle, white 100%, transparent 100%);
}

/* =================== Contact Card and Availability Button =================== */

.contact-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 17, 31, 0.9);
    border: 1px solid rgba(145, 71, 255, 0.5);
    border-radius: 15px;
    margin: 40px auto;
    padding: 40px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 0 15px rgba(145, 71, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    background-image: url('bilder/contact.webp'); /* Uppdaterad sökväg till bakgrundsbild */
    background-size: cover; /* Bilden täcker hela kortet */
    background-position: center; /* Centrerar bakgrundsbilden */
    background-repeat: no-repeat; /* Hindrar upprepning av bakgrundsbilden */
}


/* Hover-effekt för Contact-kortet */
.contact-card:hover {
    transform: scale(1.01);
    box-shadow: 0 0 30px rgba(145, 71, 255, 0.7);
}

.contact-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    max-width: 65%;
    text-align: left;
}

.contact-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 50%;
}

/* Specifik stil för profilbilden & Availability button i Contact-kortet */
.contact-profile-image {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    padding: 3px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(145, 71, 255, 0.2));
    -webkit-mask-image: radial-gradient(circle, white 100%, transparent 100%);
    mask-image: radial-gradient(circle, white 100%, transparent 100%);
    display: block;
    margin-right: 10px;
}

.availability-btn {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    transition: background-color 0.3s ease, background-image 0.3s ease, box-shadow 0.3s ease;
}

.availability-icon {
    width: 10px;
    height: 10px;
    margin-right: 5px;
}

/* Specifik stil för sociala media ikoner i Contact-kortet */
.contact-card .social-media-links img {
    width: 50px;
    height: 50px;
}

/* Specifik stil för profilbilden i Contact-kortet */
.contact-card .profile-picture {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    padding: 3px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(145, 71, 255, 0.2));
    -webkit-mask-image: radial-gradient(circle, white 100%, transparent 100%);
    mask-image: radial-gradient(circle, white 100%, transparent 100%);
}


/* =================== Footer: Bas =================== */

.footer {
  background-color: #12111F;
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  position: relative;
  width: 100%;
  background-image: url('bilder/sectionsbackground.webp');
  background-size: 50%;
  background-position: center;
  background-repeat: no-repeat;
}

.footer-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 120px;
  margin-top: 50px;
}

/* Loggan i mitten står still */
.footer-logo-circle {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100px;
  height: 100px;
}

.footer-logo-img {
  width: 50px;
  height: 50px;
  position: absolute;
  image-rendering: auto;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* =================== Footer: Cirkulär text =================== */

/* SVG placeras över mittenloggan och är responsiv.
   Tvinga perfekt cirkel oavsett browser/parent: aspect-ratio + symmetriska
   min/max samt explicit width=height stoppar oval-rendering på Safari/iOS. */
.footer-logo-svg {
  width: clamp(160px, 22vw, 260px);
  height: clamp(160px, 22vw, 260px);
  aspect-ratio: 1 / 1;
  min-width: 160px;
  min-height: 160px;
  max-width: 260px;
  max-height: 260px;
  flex: 0 0 auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  overflow: visible;                 /* fixar klipp i Safari iOS */
  pointer-events: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Själva ringtexten. Låt textLength styra avståndet mellan tecken */
.footer-logo-svg .ring-text {
  font: inherit;
  font-size: clamp(9px, 1.2vw, 12px);
  letter-spacing: 0;
  text-transform: inherit;
  fill: #fff;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
}

/* =================== Footer: Innehåll =================== */

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  margin: 20px auto;
  padding: 10px 20px;
  color: #fff;
  max-width: 100%;
  transition: all 0.3s ease;
}

.footer-icon {
  width: 20px;
  height: auto;
  margin: 0 5px;
  vertical-align: middle;
}

.footer .footer-logo img {
  width: 15px;
  height: auto;
  display: inline-block;
  margin: 0 10px;
  align-items: center;
}

.footer-copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 10px;
}

/* =================== Popup footer och social =================== */

.popup-footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: 20px;
  margin-top: 20px;
}

.footer-section h3,
.footer-social h3 {
  text-align: center;
  width: 100%;
}

.footer-social {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 20px;
}

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

.social-media-icons li { display: inline-block; }

.social-media-icons a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.social-media-icons a img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.social-media-icons a:hover {
  background-color: rgba(145, 71, 255, 0.8);
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(145, 71, 255, 0.5);
}

.popup-footer p,
.popup-footer a {
  margin: 5px 0;
}

/* =================== Global Button Styling =================== */

.cta-btn,
.project-cta-btn,
.popup-btn,
.contact-cta-btn,
.project-ahum-cta-btn {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease, background-image 0.3s ease, box-shadow 0.3s ease;
    width: auto;
    white-space: nowrap;
    margin: 10px auto;
}

/* =================== Hover-effekter för alla knappar =================== */
.cta-btn:hover,
.project-cta-btn:hover,
.popup-btn:hover,
.contact-cta-btn:hover,
.project-ahum-cta-btn:hover {
    background-image: linear-gradient(to right, #4b0082, #8a2be2);
    box-shadow: 0 0 10px 3px #45637A, 0 4px 15px rgba(145, 71, 255, 0.3);
    color: #fff;
}

/* =================== Global Internship Button Styling =================== */

.internship-btn {
    color: #fff;
    text-decoration: none;
    margin: 20px;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: default;
    transition: background-color 0.3s ease, background-image 0.3s ease, box-shadow 0.3s ease;
}

.internship-btn .availability-icon {
    width: 10px;
    height: 10px;
}

/* Disable hover effect for all internship buttons */
.internship-btn:hover {
    pointer-events: none;
    background-color: inherit;
    color: inherit;
    box-shadow: none;
    transform: none;
}

.popup-body .internship-btn:hover {
    pointer-events: none;
    background-color: inherit;
    color: inherit;
    box-shadow: none;
    transform: none;
}

/* =================== Contact CTA Button =================== */
.contact-cta-btn {
    position: relative;
    min-width: 180px;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    display: inline-block;
    cursor: pointer;
    text-align: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.contact-cta-btn .hover-text {
    display: none;
}

.contact-cta-btn .original-text {
    display: inline-block;
    transition: opacity 0.3s ease;
}

/* Vid hover döljer vi originaltexten och visar hover-texten */
.contact-cta-btn:hover .original-text {
    opacity: 0;
}

.contact-cta-btn:hover .hover-text {
    display: inline-block;
    opacity: 1;
}

/* Justeringar för CTA-knappens utseende vid hover */
.contact-cta-btn:hover {
    background-image: linear-gradient(to right, #4b0082, #8a2be2);
    box-shadow: 0 0 10px 3px #45637A, 0 4px 15px rgba(255, 255, 255, 0.5);
    min-width: 280px;
    padding: 10px 30px;
    transition: all 0.5s ease;
}


/* =================== Contact HOVER =================== */

.cta-btn.contact-cta-btn {
    position: relative;
    display: inline-block;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-btn.contact-cta-btn .hover-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    white-space: nowrap; /* Förhindrar att texten bryts */
}

.cta-btn.contact-cta-btn:hover .hover-text {
    content: "Let's create magic together ✨";
    display: block;
}



/* =================== Service Button =================== */

.service-btn {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    display: inline-block;
    margin: 20px auto;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Ta bort hover-effekt för service-knapparna */
.service-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: none;
}

/* =================== Project CTA Button =================== */

.popup-body .project-cta-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
    background-color: #6c1ba7;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.3s ease;
}

.popup-body .project-cta-btn:hover {
    background-color: #4b0082;
}

/* =================== Clickable Card Link =================== */

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-link .info-card {
    position: relative;
}

.card-link button.project-cta-btn {
    z-index: 10;
    position: relative;
}


/* Responsive styling for Mobiles */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        transform: translateY(0); /* Startposition för navbar */
        transition: transform 0.3s ease; /* Lägg till smooth transition */
        z-index: 1000;
    }

    .navbar.hidden {
        transform: translateY(-100%); /* Döljer navbar genom att flytta utanför skärmen */
    }

    .navbar.scrolled-up {
        transform: translateY(0); /* Visar navbaren igen när användaren scrollar upp */
    }

    .navbar-icons {
        display: flex;
        gap: 20px;
    }

    .navbar-icons .icon {
        width: 30px;
        height: 30px;
    }

    .navbar-links {
        display: none; /* Dölj textlänkar i mobil och tablet */
    }
  

    .info-card {
        width: calc(50% - 20px);
        height: auto;
        margin: 0 auto;
    }

    .info-card h2 {
        font-size: 28px;
    }

    .popup-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .company-logo {
        width: 100px;
    }
    
    .contact-card {
        flex-direction: column; /* Ändra layouten till kolumn för mindre skärmar */
        align-items: center; /* Centrera innehållet */
        padding: 20px; /* Behåll padding */
        width: 90%; /* Minska bredden för mindre skärmar */
        max-width: 100%; /* Sätt maxbredd till 100% */
    }

    .contact-left h2,
    .contact-left h3 {
        text-align: center; /* Centrera text */
    }

    .social-media-links {
        justify-content: center; /* Centrera sociala media ikonerna */
        flex-wrap: wrap; /* Tillåt ikonerna att brytas i flera rader om det behövs */
    }
    
    .hero {
        min-height: 35vh;
    }
    
    .hero-title {
        font-size: 3.3rem;
    }

    .hero-subtitle {
        font-size: 1.9rem;
    }
    
    .experience {
        margin-top: 10px;
    }
    
    .social-media-icons {
        display: flex; /* Se till att listan visas */
        justify-content: center; /* Centrera ikonen om du vill */
    }

    .social-media-icons li {
        display: inline-block;
    }

    .social-media-icons img {
        width: 24px; /* Justera storleken på ikonen */
        height: 24px;
    }
    
    .popup-body .project-header {
        flex-direction: column; /* Se till att layouten förblir en kolumn på mindre skärmar */
        align-items: center; /* Centrera rubrikerna på små skärmar */
        gap: 10px; /* Bibehåll mellanrum mellan elementen */
    }

    .popup-body .project-info h3 {
        font-size: 14px; /* Minska textstorleken för titlar */
    }

    .popup-body .project-info h4 {
        font-size: 12px; /* Minska storleken på tidsperioden */
    }

    .popup-body .project-cta-btn {
        font-size: 14px; /* Minska storleken på CTA-knappen */
        padding: 10px 15px; /* Justera padding för en bättre passform */
    }
    
    .popup-body .company-info {
        width: 100%;         /* Full bredd på mindre skärmar */
        align-items: center;  /* Se till att allt centreras horisontellt */
    }
    
    .popup-body .project-details {
        flex-direction: column;
        align-items: center;
    }

    .popup-body .company-info {
        width: 100%; /* Gör så att company-info tar upp hela bredden */
    }

    .popup-body .project-cta-btn {
        width: 100%;
        padding: 10px;
    }
    
    .popup-section.column-card {
        text-align: center;
        max-width: 99%;
    }
    
    .previous-companies {
        width: 100%;
    }
    
    .section {
        padding: 0px;
        margin: 0px;
    }
}

/* Small Devices (Max-width: 480px) */
@media (max-width: 480px) {
    .navbar {
        display: flex;
        flex-direction: row;
        padding: 1rem;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .navbar.scrolled-up {
        transform: translateY(0);
    }

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

    .navbar-icons .icon {
        width: 25px;
        height: 25px;
    }

    .info-cards {
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
    }

    .info-card {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }

    .info-card h2 {
        font-size: 24px;
    }

    .popup-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .hero {
        min-height: 35vh;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.6rem;
    }

    .company-logo {
        width: 80px;
    }
    
    .language-menu {
        margin-left: -20px;
    }
    
    .social-media-icons {
        margin-left: -12px;
    }
    
    .social-media-links {
        justify-content: center; /* Centrera sociala media ikonerna */
        flex-wrap: wrap; /* Tillåt ikonerna att brytas i flera rader om det behövs */
        gap: 0px;
    }
    .popup-body .project-header {
        gap: 8px; /* Mindre mellanrum mellan elementen */
    }

    .popup-body .project-info h3 {
        font-size: 14px; /* Ännu mindre textstorlek */
    }

    .popup-body .project-info h4 {
        font-size: 12px;
    }

    .popup-body .project-cta-btn {
        font-size: 12px; /* Mindre storlek på CTA-knappen */
        padding: 8px 12px;
    }
    
    .popup-section.column-card {
        text-align: center;
        width: 100%;
    }
    
    .experience {
        margin-top: 10px;
    }
    
    .contact-left,
    .contact-right {
        max-width: 100%; /* Sätt maxbredd till 100% */
        text-align: center; /* Centrera texten */
        align-items: center; /* Centrera innehållet vertikalt */
    }
    
    .contact-card {
        flex-direction: column; /* Stack elements vertically */
        align-items: center; /* Center align elements */
        text-align: center; /* Center text */
    }

    .contact-right {
        display: flex;
        flex-direction: column;
        align-items: center; /* Center align the button */
        gap: 20px;
        max-width: 100%; /* Take full width */
    }

    .cta-btn.contact-cta-btn {
        margin: 0 auto; /* Center the button */
    }
    
    .previous-companies {
        width: 100%;
    }
    
    .section {
        padding: 0px;
        margin: 0px;
    }
}

/* =================== Media Queries =================== */

/* Styling för surfplattor (max-width: 1024px) */
@media (max-width: 1024px) {
    .testimonial-card {
        max-width: 100%; /* Sätt bredden till 45% för tablets */
    }

    .info-card {
        flex: 1 1 100%; /* Gör korten 100% breda på skärmar under 768px */
        max-width: 100%; /* Sätt maxbredd till 100% */
        margin: 0px 0; /* Justera marginalen runt korten */
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .navbar-icons .icon {
        width: 20px;
        height: 20px;
    }
}


/* Styling för mobiler (max-width: 768px) */
@media (max-width: 768px) {
    .testimonial-card {
        max-width: 100%; /* Sätt bredden till 90% för mobiler */
    }
    
    .navbar-links {
        display: none; /* Dölj textlänkar */
    }
    .navbar-icons {
        display: flex; /* Visa ikonerna */
    }
}

/* Styling för mindre mobiler (max-width: 480px) */
@media (max-width: 480px) {
    .testimonial-card {
        max-width: 100%; /* Sätt bredden till 100% för små mobiler */
    }
}

/* För tabletstorlekar */
@media (max-width: 1024px) {
    .info-card {
        flex: 1 1 calc(50% - 20px); /* Byter till två kolumner */
        max-width: calc(50% - 20px); /* Begränsar bredden till hälften av förälderelementets bredd */
    }
}

/* För mindre skärmar som mobil */
@media (max-width: 768px) {
    .info-card {
        flex: 1 1 100%; /* Full bredd för mobilskärmar */
        max-width: 100%; /* Korten tar upp 100% av bredden */
    }

    .info-cards {
        flex-direction: column; /* Lägger korten i en kolumnlayout */
    }
}

/* För ännu mindre skärmar */
@media (max-width: 480px) {
    .info-card {
        flex: 1 1 100%; /* Behåller full bredd även på små mobilskärmar */
        max-width: 100%; /* Full bredd på korten */
        margin: 10px 0; /* Ger lite mellanrum mellan korten */
    }
}

/* =================== Responsive Adjustments for Smaller Devices =================== */

@media (max-width: 768px) {
    .info-cards {
        flex-direction: column;
        align-items: center;
    }

    .info-card {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* Responsive styling for Small Mobiles */
@media (max-width: 480px) {
    .info-card {
        flex: 1 1 100%;
        width: 100%;
        margin: 10px 0;
        margin-bottom: 20px;
    }
}

/* =================== Media Queries =================== */

/* För tabletstorlekar och mindre */
@media (max-width: 1024px) {
    .info-card {
        flex: 1 1 calc(50% - 20px); /* Byter till två kolumner */
        max-width: calc(50% - 20px); /* Begränsar bredden till hälften av förälderelementets bredd */
    }
}

/* För mindre skärmar som mobil */
@media (max-width: 768px) {
    .info-cards {
        flex-direction: column; /* Lägger korten i en kolumnlayout */
        align-items: center; /* Centrera korten */
    }

    .info-card {
        flex: 1 1 100%; /* Full bredd för mobilskärmar */
        max-width: 100%; /* Korten tar upp 100% av bredden */
        width: 100%; /* Korten tar upp hela bredden */
    }

    .popup-image {
        height: 100vh;
        width: auto;
        object-fit: cover;
    }
    
    .project-details {
        flex-direction: column; /* Change the layout to vertical */
        align-items: flex-start; /* Align items to the left */
    }

    .company-info {
        margin-top: 10px; /* Add some spacing between title and company info */
        width: 100%; /* Make the company info take up the full width */
        display: flex;
        justify-content: flex-start; /* Align items to the left */
    }

    .company-info h2 {
        font-size: 24px; /* Adjust font size for smaller screens */
    }

    .project-logo img {
        width: 40px;
        height: 40px;
    }
    
    .popup-body .project-info h3 {
        font-size: 14px; /* Minska textstorleken för titlar */
    }


    .popup-body .project-info h4 {
        font-size: 12px; /* Minska storleken på tidsperioden */
    }

    .popup-body .project-cta-btn {
        font-size: 14px; /* Minska storleken på CTA-knappen */
        padding: 10px 15px; /* Justera padding för en bättre passform */
    }
}

/* För ännu mindre skärmar */
@media (max-width: 480px) {
    .info-card {
        flex: 1 1 100%;
        max-width: 100%; /* Full bredd på korten */
        margin: 10px 0; /* Ger lite mellanrum mellan korten */
        margin-bottom: 20px; /* Extra mellanrum nedtill */
    }

    .popup-image {
        height: 80vh;
        width: auto;
        object-fit: cover;
    }
    
    .company-info {
        justify-content: flex-start; /* Ensure the items are aligned to the left on small screens */
    }

    .project-logo img {
        width: 40px;
        height: 40px;
    }

    .company-info h2 {
        font-size: 18px; /* Smaller font for mobile */
    }
    
    .popup-body .project-info h3 {
        font-size: 12px; /* Ännu mindre textstorlek */
    }

    .popup-body .project-info h4 {
        font-size: 12px;
    }

    .popup-body .project-cta-btn {
        font-size: 12px; /* Mindre storlek på CTA-knappen */
        padding: 8px 12px;
    }
    
    .testimonials {
        width: 100%;
    }
}

/* =================== Responsive Adjustments for Popup and Social Media =================== */

@media (max-width: 600px) {
    .popup-content {
        width: 100%;
        border-radius: 0;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        margin: 0;
    }

    .popup-header .cta-button {
        left: 10px;
        padding: 4px 8px;
    }

    .popup-header h2 {
        font-size: 20px;
    }
}

/* =================== Responsive Adjustments Popup Section: HEADER 2 LINES =================== */

/* Anpassning för mobil */
@media (max-width: 768px) {
    .popup-section h2 {
        font-size: 18px; /* Minska fontstorleken för mindre skärmar */
    }

    .popup-section h2::before,
    .popup-section h2::after {
        width: 100px; /* Minska linjernas längd för mindre skärmar */
    }

    .popup-section h2::before {
        left: -120px; /* Justera placeringen av vänstra linjen */
    }

    .popup-section h2::after {
        right: -120px; /* Justera placeringen av högra linjen */
    }
}























/* =========================================================
   ============   PORTFOLIO REDESIGN OVERRIDES   ===========
   Navbar restructure (left | center | right pair)
   Refined typography (Inter), cleaner hovers, WCAG taps
   ========================================================= */

/* ---------- Global typography refinement ---------- */
body, html {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    letter-spacing: -0.01em;
    line-height: 1.55;
}

body, p, span, li, a, button, input, textarea, label {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.2;
    font-weight: 700;
}

p { line-height: 1.65; }

/* ---------- Top Navbar: 3-column layout ---------- */
.navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 0.85rem 1.25rem;
}

.navbar-left { justify-self: start; }
.navbar-right { justify-self: end; margin-left: 0; }

.navbar-center {
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-center .navbar-links {
    display: flex;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- Center nav links: cleaner hover ---------- */
.navbar-center .navbar-links a {
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 10px 16px;
    border-radius: 8px;
    background: transparent;
    transition: color 220ms ease, background-color 220ms ease;
}

.navbar-center .navbar-links a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 1.5px;
    background: linear-gradient(90deg, #8a2be2, #b388ff);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar-center .navbar-links a:hover,
.navbar-center .navbar-links a:focus-visible {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.04);
}

.navbar-center .navbar-links a:hover::after,
.navbar-center .navbar-links a:focus-visible::after {
    transform: scaleX(1);
}

.navbar-center .navbar-links a:focus-visible {
    outline: 2px solid rgba(179, 136, 255, 0.6);
    outline-offset: 2px;
}

/* ---------- Right action pair: Studio + Contact ---------- */
.nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    cursor: pointer;
    transition:
        background-color 220ms ease,
        border-color 220ms ease,
        color 220ms ease,
        transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 220ms ease;
}

.nav-btn:hover,
.nav-btn:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.nav-btn:active { transform: translateY(0); }

.nav-btn:focus-visible {
    outline: 2px solid rgba(179, 136, 255, 0.7);
    outline-offset: 2px;
}

/* Primary variant (Contact) — subtle accent, same shape */
.nav-btn--primary {
    color: #fff;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.95), rgba(75, 0, 130, 0.95));
    border-color: rgba(179, 136, 255, 0.45);
}

.nav-btn--primary:hover,
.nav-btn--primary:focus-visible {
    background: linear-gradient(135deg, #9d4dff, #6a1fbf);
    border-color: rgba(179, 136, 255, 0.8);
    box-shadow: 0 8px 22px rgba(138, 43, 226, 0.35);
}

/* ---------- Responsive: hide center links on tablet/mobile ---------- */
@media (max-width: 1024px) {
    .navbar {
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        padding: 0.75rem 1rem;
    }
    .navbar-center { display: none; }
    .nav-btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
}

@media (max-width: 480px) {
    .navbar { padding: 0.6rem 0.75rem; gap: 8px; }
    .nav-actions { gap: 6px; }
    .nav-btn { padding: 10px 14px; font-size: 13.5px; }
}

/* ---------- Bottom Navbar: WCAG-compliant accessibility ---------- */
.bottom-navbar {
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
    background: rgba(18, 17, 31, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

.bottom-navbar-icons {
    gap: 4px;
    padding: 0 6px;
}

.bottom-navbar-icons li { flex: 1; }

.bottom-navbar-icons a {
    min-height: 56px;          /* WCAG 2.5.5 — 44px+ tap target */
    min-width: 44px;
    padding: 6px 4px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.15;
    gap: 4px;
    transition: color 200ms ease, background-color 200ms ease, transform 200ms ease;
}

.bottom-navbar-icons a span {
    display: block;
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bottom-navbar-icons .icon {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.82);
    transition: filter 200ms ease, transform 200ms ease;
}

.bottom-navbar-icons a:hover,
.bottom-navbar-icons a:focus-visible,
.bottom-navbar-icons a:active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.06);
}

.bottom-navbar-icons a:hover .icon,
.bottom-navbar-icons a:focus-visible .icon,
.bottom-navbar-icons a:active .icon {
    filter: brightness(0) invert(1) opacity(1);
    transform: translateY(-1px);
}

.bottom-navbar-icons a:focus-visible {
    outline: 2px solid rgba(179, 136, 255, 0.7);
    outline-offset: -2px;
}

/* Show bottom navbar on tablet too (since center links are hidden) */
@media (max-width: 1024px) {
    .bottom-navbar { display: block; }
}

@media (max-width: 360px) {
    .bottom-navbar-icons a { font-size: 10.5px; }
    .bottom-navbar-icons .icon { width: 22px; height: 22px; }
}

/* =========================================================
   Open Full Page link inside popups
   ========================================================= */
.popup-header { position: relative; }
.popup-header .open-full-page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(179, 136, 255, 0.12);
    border: 1px solid rgba(179, 136, 255, 0.28);
    color: #d4baff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
    margin-right: 12px;
}
.popup-header .open-full-page:hover,
.popup-header .open-full-page:focus-visible {
    background: rgba(179, 136, 255, 0.22);
    border-color: rgba(179, 136, 255, 0.55);
    color: #fff;
    transform: translateY(-1px);
}
.popup-header .open-full-page:focus-visible {
    outline: 2px solid rgba(179, 136, 255, 0.8);
    outline-offset: 2px;
}

/* =========================================================
   Leave-confirmation modal
   ========================================================= */
.leave-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.leave-modal.is-open { display: flex; animation: leaveFade .2s ease both; }

.leave-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 7, 18, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.leave-modal__card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #14132a;
    color: #f5f5fa;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    animation: leavePop .25s cubic-bezier(0.22, 1, 0.36, 1) both;
    text-align: left;
}

.leave-modal__title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-family: 'Inter', sans-serif;
    color: #fff;
}
.leave-modal__text {
    margin: 0 0 22px;
    color: rgba(245, 245, 250, 0.72);
    font-size: 15px;
    line-height: 1.55;
    font-family: 'Inter', sans-serif;
}

.leave-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.leave-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: transparent;
    color: rgba(245, 245, 250, 0.85);
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.leave-btn--ghost:hover { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.22); }

.leave-btn--primary {
    background: linear-gradient(135deg, rgba(138,43,226,0.95), rgba(75,0,130,0.95));
    color: #fff;
    border-color: rgba(179,136,255,0.45);
}
.leave-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(138,43,226,0.35); }

@keyframes leaveFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes leavePop  { from { opacity: 0; transform: translateY(8px) scale(0.97) } to { opacity: 1; transform: translateY(0) scale(1) } }

/* =================================================================
   Editorial Work Cards (homepage) — image-first
   ================================================================= */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: stretch;
}
@media (max-width: 1024px) { .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px)  { .works-grid { grid-template-columns: 1fr; gap: 22px; } }

.work-card {
  display: flex;
  flex-direction: column;
  background: #16152a;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
  position: relative;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(179,136,255,0.35);
  box-shadow: 0 22px 50px -20px rgba(138,43,226,0.45), 0 6px 18px rgba(0,0,0,.35);
}
.work-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0c0b16;
}
.work-card__cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .35s;
  filter: saturate(0.9) brightness(0.95);
}
.work-card:hover .work-card__cover img { transform: scale(1.05); filter: saturate(1.05) brightness(1); }
.work-card__year {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(12,11,22,0.7); color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
}
.work-card__body {
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 22px 24px;
  flex: 1;
}
.work-card__brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,0.7);
}
.work-card__brand img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; background: rgba(255,255,255,0.08); padding: 4px; }
.work-card__brand a { color: #b388ff; text-decoration: none; font-weight: 600; }
.work-card__brand a:hover { text-decoration: underline; }
.work-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 19px; font-weight: 600; line-height: 1.3;
  color: #fff; margin: 0; letter-spacing: -0.01em;
}
.work-card__lead {
  font-size: 14.5px; line-height: 1.55;
  color: rgba(255,255,255,0.65);
  margin: 0;
}
.work-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; padding: 0; margin: 4px 0 0;
}
.work-card__tags li {
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(179,136,255,0.08);
  border: 1px solid rgba(179,136,255,0.2);
  color: #d4baff;
}
.work-card__actions {
  display: flex; gap: 10px; margin-top: auto; padding-top: 14px; flex-wrap: wrap;
}
.work-card__btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  padding: 10px 14px; border-radius: 10px;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s, background .25s, border-color .25s, color .25s;
  font-family: inherit;
}
.work-card__btn--ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}
.work-card__btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.3); }
.work-card__btn--primary {
  background: linear-gradient(135deg, #8a2be2, #4b0082);
  color: #fff;
  border-color: rgba(179,136,255,0.45);
}
.work-card__btn--primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(138,43,226,.4); }

/* =================================================================
   Case-study Teaser (inside legacy popup)
   ================================================================= */
.case-teaser {
  padding: 0 !important;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  text-align: left;
  font-family: 'Inter', sans-serif;
  color: #fff;
}
.case-teaser__cover {
  position: relative;
  width: 100%;
  height: 280px;
  min-height: 280px;
  overflow: hidden;
  background: #0c0b16;
  margin: 0;
  border-radius: 0;
  border: none;
}
.case-teaser__cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,17,31,0) 40%, rgba(18,17,31,0.55) 80%, rgba(18,17,31,0.95) 100%);
  pointer-events: none;
}
.popup-body.case-teaser .case-teaser__cover img,
.case-teaser__cover img {
  width: 100% !important;
  height: 100% !important;
  min-height: 280px !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  max-width: none !important;
  transform: scale(1.02);
  transition: transform 8s ease-out;
}
.case-teaser__cover:hover img { transform: scale(1.08); }

/* Inner content padding wrapper — apply via direct children */
.popup-body.case-teaser > *:not(.case-teaser__cover) {
  margin-left: 32px;
  margin-right: 32px;
}
.popup-body.case-teaser > .case-teaser__eyebrow { margin-top: -22px; position: relative; z-index: 2; }
.popup-body.case-teaser > .case-teaser__cta:last-child,
.popup-body.case-teaser > .case-teaser__note:last-child { margin-bottom: 32px; }
.popup-body.case-teaser > * + * { margin-top: 16px; }
@media (max-width: 640px) {
  .popup-body.case-teaser > *:not(.case-teaser__cover) { margin-left: 20px; margin-right: 20px; }
  .case-teaser__cover, .case-teaser__cover img { height: 200px !important; min-height: 200px !important; }
}
.case-teaser__eyebrow {
  display: inline-flex; align-self: flex-start;
  padding: 7px 14px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase;
  background: rgba(20, 19, 42, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(179,136,255,0.4);
  color: #d4baff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.case-teaser__title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
  margin: 0;
}
.case-teaser__lead {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin: 0;
  max-width: 640px;
}
.case-teaser__tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; padding: 0; margin: 0;
}
.case-teaser__tags li {
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
}
.case-teaser__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  margin: 4px 0 0;
}
.case-teaser__meta > div {
  background: #14132a;
  padding: 14px 16px;
}
.case-teaser__meta dt {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 0 0 4px;
}
.case-teaser__meta dd {
  font-size: 14px; color: #fff; margin: 0; font-weight: 500;
}
.case-teaser__meta dd a { color: #b388ff; text-decoration: none; }
.case-teaser__meta dd a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .case-teaser { padding: 22px 20px 28px !important; }
  .case-teaser__meta { grid-template-columns: repeat(2, 1fr); }
}
.case-teaser__cta {
  display: inline-flex; align-self: flex-start;
  align-items: center; gap: 10px;
  margin-top: 4px;
  padding: 13px 22px;
  background: linear-gradient(135deg, #8a2be2, #4b0082);
  color: #fff;
  border: 1px solid rgba(179,136,255,0.45);
  border-radius: 12px;
  font-size: 15px; font-weight: 600;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, gap .25s;
}
.case-teaser__cta:hover { transform: translateY(-1px); gap: 14px; box-shadow: 0 10px 24px rgba(138,43,226,.45); }
.case-teaser__note {
  font-size: 13px; color: rgba(255,255,255,0.5);
  font-style: italic;
  margin: 0;
}
.case-teaser__lang-notice {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(138, 43, 226, 0.10);
  border: 1px solid rgba(138, 43, 226, 0.28);
  color: rgba(255,255,255,0.78);
  font-size: 12.5px;
  line-height: 1.4;
}
.case-teaser__lang-notice::before {
  content: "🌐";
  font-size: 14px;
  flex: 0 0 auto;
}

/* === Case teaser highlights & portrait cover (added) === */
.case-teaser__highlights {
  list-style: none; padding: 0; margin: 4px 0 0;
  display: grid; gap: 10px;
}
.case-teaser__highlights li {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: baseline;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}
.case-teaser__highlight-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #b388ff;
}
.case-teaser__highlight-value {
  font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.86);
}
@media (max-width: 560px) {
  .case-teaser__highlights li { grid-template-columns: 1fr; gap: 4px; padding: 10px 12px; }
}

.popup-body.case-teaser .case-teaser__cover--portrait,
.case-teaser__cover.case-teaser__cover--portrait {
  width: 200px !important;
  min-width: 200px !important;
  max-width: 200px !important;
  height: 200px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 999px !important;
  align-self: center !important;
  padding: 4px !important;
  background: linear-gradient(135deg, #8a2be2, #4b0082) !important;
  border: none !important;
  margin: 10px auto 18px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(138, 43, 226, 0.25);
  flex: 0 0 200px !important;
  box-sizing: border-box !important;
}
.popup-body.case-teaser .case-teaser__cover--portrait img,
.case-teaser__cover.case-teaser__cover--portrait img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border-radius: 999px !important;
  object-fit: cover !important;
  object-position: 50% 50% !important;
  display: block !important;
}
@media (max-width: 560px) {
  .popup-body.case-teaser .case-teaser__cover--portrait,
  .case-teaser__cover.case-teaser__cover--portrait {
    width: 160px !important; min-width: 160px !important; max-width: 160px !important;
    height: 160px !important; min-height: 160px !important; max-height: 160px !important;
    flex: 0 0 160px !important;
  }
}

/* === Lightbox for case + about images === */
.lb-overlay {
  position: fixed; inset: 0;
  background: rgba(8,7,18,0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0; transition: opacity .2s ease;
  padding: 24px;
  cursor: zoom-out;
}
.lb-overlay.is-open { opacity: 1; }
.lb-overlay img,
.lb-overlay video {
  max-width: 92vw; max-height: 88vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  background: #0c0b16;
  cursor: default;
}
.lb-overlay__close {
  position: fixed; top: 18px; right: 18px;
  width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(20,19,42,0.85); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lb-overlay__close:hover { background: rgba(138,43,226,0.4); }

/* Make images inside case body & about body look interactive */
.case-body img,
#about-body img {
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
}
.case-body img:hover,
#about-body img:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

/* =================== Services list (interactive one-column) =================== */
.services-list {
    max-width: 760px;
    margin: 30px auto 60px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.svc-row {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "num title arrow"
        "num desc  desc";
    align-items: center;
    column-gap: 18px;
    row-gap: 0;
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 22px;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition:
        background-color 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s cubic-bezier(.22,1,.36,1),
        box-shadow 0.35s ease,
        padding 0.35s ease;
    font: inherit;
}

/* Animated gradient sweep that reveals on hover/open */
.svc-row::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(183, 148, 255, 0.18),
        rgba(108, 27, 167, 0.10) 60%,
        rgba(255, 255, 255, 0) 100%);
    transform: translateX(-101%);
    transition: transform 0.55s cubic-bezier(.22,1,.36,1);
    pointer-events: none;
    z-index: 0;
}

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

.svc-row:hover,
.svc-row:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(183, 148, 255, 0.45);
    transform: translateX(4px);
    outline: none;
}

.svc-row:hover::before,
.svc-row:focus-visible::before {
    transform: translateX(0);
}

.svc-num {
    grid-area: num;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(183, 148, 255, 0.85);
    font-variant-numeric: tabular-nums;
    align-self: center;
    transition: color 0.3s ease, transform 0.35s cubic-bezier(.22,1,.36,1);
}

.svc-title {
    grid-area: title;
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    transition: transform 0.35s cubic-bezier(.22,1,.36,1);
}

.svc-arrow {
    grid-area: arrow;
    font-size: 18px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.4s cubic-bezier(.22,1,.36,1), color 0.3s ease;
    will-change: transform;
}

.svc-row:hover .svc-arrow {
    color: #fff;
    transform: translateX(4px);
}

/* Description starts collapsed with smooth grid-row + opacity reveal */
.svc-desc {
    grid-area: desc;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.55;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
    transition:
        max-height 0.5s cubic-bezier(.22,1,.36,1),
        opacity 0.35s ease,
        margin-top 0.4s ease;
}

/* Open state */
.svc-row.is-open {
    background: rgba(183, 148, 255, 0.10);
    border-color: rgba(183, 148, 255, 0.55);
    transform: translateX(0);
    box-shadow: 0 10px 30px -18px rgba(183, 148, 255, 0.55);
    padding-bottom: 22px;
}

.svc-row.is-open::before { transform: translateX(0); }

.svc-row.is-open .svc-arrow {
    transform: rotate(90deg) translateX(2px);
    color: #fff;
}

.svc-row.is-open .svc-num {
    color: #fff;
    transform: scale(1.05);
}

.svc-row.is-open .svc-desc {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
}

@media (max-width: 600px) {
    .services-list { padding: 0 14px; gap: 10px; }
    .svc-row { padding: 16px 18px; column-gap: 14px; border-radius: 14px; }
    .svc-title { font-size: 15.5px; }
    .svc-num { font-size: 12px; }
    .svc-desc { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .svc-row, .svc-row::before, .svc-arrow, .svc-desc, .svc-num, .svc-title {
        transition: none !important;
    }
}

/* =================== Contact card refinements (small details) =================== */
.contact-profile-image {
    transition: transform 0.5s cubic-bezier(.22,.61,.36,1),
                box-shadow 0.5s ease,
                background 0.5s ease !important;
    will-change: transform;
}
.contact-card:hover .contact-profile-image,
.profile-info-wrapper:hover .contact-profile-image {
    transform: scale(1.18);
    box-shadow: 0 10px 28px rgba(138, 43, 226, 0.35);
    background: linear-gradient(135deg, rgba(179,136,255,0.55), rgba(75,0,130,0.55)) !important;
}

.contact-card:hover .availability-btn,
.profile-info-wrapper:hover .availability-btn {
    background-color: rgba(110, 231, 130, 0.12);
    border-color: rgba(110, 231, 130, 0.35);
    box-shadow: 0 4px 18px rgba(110, 231, 130, 0.18);
}

/* Refined Contact CTA hover — keep behaviour, polish look */
.cta-btn.contact-cta-btn,
.contact-cta-btn {
    border-radius: 12px !important;
    border: 1px solid rgba(179, 136, 255, 0.28) !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(179,136,255,0.06)) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    letter-spacing: 0.01em;
    transition: transform 0.35s cubic-bezier(.22,.61,.36,1),
                background 0.4s ease,
                box-shadow 0.4s ease,
                min-width 0.5s ease,
                padding 0.5s ease !important;
}
.contact-cta-btn:hover {
    background-image: linear-gradient(135deg, #6c1ba7, #8a2be2) !important;
    background-color: transparent !important;
    border-color: rgba(179, 136, 255, 0.7) !important;
    box-shadow: 0 12px 32px rgba(138, 43, 226, 0.45),
                0 0 0 1px rgba(179, 136, 255, 0.25),
                0 0 24px rgba(138, 43, 226, 0.35) !important;
    transform: translateY(-2px);
}

/* =================== Service card bubble — alternate left / right =================== */
.area-card { overflow: visible; }

/* Default: place bubble to the RIGHT of the card */
.area-card .area-card__bubble {
    left: calc(100% + 18px);
    bottom: auto;
    top: 50%;
    transform: translate(-6px, -50%);
    max-width: 260px;
}
.area-card .area-card__bubble::before {
    left: -7px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(45deg);
    border: 1px solid rgba(var(--accent), 0.35);
    border-right: none;
    border-top: none;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 3px;
}
.area-card:hover .area-card__bubble,
.area-card:focus-within .area-card__bubble {
    transform: translate(0, -50%) !important;
}

/* Even-indexed cards (2nd, 4th, 6th): bubble to the LEFT */
.areas-of-work .area-card:nth-child(even) .area-card__bubble {
    left: auto;
    right: calc(100% + 18px);
    transform: translate(6px, -50%);
}
.areas-of-work .area-card:nth-child(even) .area-card__bubble::before {
    left: auto;
    right: -7px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    border: 1px solid rgba(var(--accent), 0.35);
    border-left: none;
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-top-right-radius: 3px;
}
.areas-of-work .area-card:nth-child(even):hover .area-card__bubble,
.areas-of-work .area-card:nth-child(even):focus-within .area-card__bubble {
    transform: translate(0, -50%) !important;
}

/* Tablet & narrow: not enough side room — fall back to top placement */
@media (max-width: 900px) {
    .areas-of-work .area-card .area-card__bubble,
    .areas-of-work .area-card:nth-child(even) .area-card__bubble {
        left: 50%;
        right: auto;
        top: auto;
        bottom: calc(100% + 14px);
        transform: translate(-50%, 6px);
        max-width: 320px;
    }
    .areas-of-work .area-card .area-card__bubble::before,
    .areas-of-work .area-card:nth-child(even) .area-card__bubble::before {
        left: 50%;
        right: auto;
        top: auto;
        bottom: -7px;
        transform: translateX(-50%) rotate(45deg);
        border: 1px solid rgba(var(--accent), 0.35);
        border-left: none;
        border-top: none;
        border-bottom-right-radius: 3px;
        border-bottom-left-radius: 0;
    }
    .areas-of-work .area-card:hover .area-card__bubble,
    .areas-of-work .area-card:nth-child(even):hover .area-card__bubble {
        transform: translate(-50%, 0) !important;
    }
}
/* ===== Mobile / iPad: tap-to-reveal in-card overlay ===== */
@media (hover: none), (max-width: 900px) {
    .areas-of-work .area-card { position: relative; }

    /* Info dot button — only on touch devices */
    .area-card__info-btn {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 1px solid rgba(var(--accent), 0.45);
        background: rgba(20, 19, 42, 0.6);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        color: rgba(255,255,255,0.9);
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        font-weight: 500;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 6;
        box-shadow: 0 0 0 0 rgba(var(--accent), 0.4);
        transition: transform 0.3s cubic-bezier(.22,.61,.36,1),
                    box-shadow 0.4s ease,
                    background 0.3s ease;
        animation: areaCardInfoPulse 2.6s ease-in-out infinite;
    }
    .area-card__info-btn:active { transform: scale(0.92); }
    .area-card.is-revealed .area-card__info-btn {
        transform: rotate(45deg);
        background: rgba(var(--accent), 0.85);
        animation: none;
    }

    @keyframes areaCardInfoPulse {
        0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent), 0.45); }
        50%      { box-shadow: 0 0 0 8px rgba(var(--accent), 0);  }
    }

    /* Override desktop side/top placement: cover the card */
    .areas-of-work .area-card .area-card__bubble,
    .areas-of-work .area-card:nth-child(even) .area-card__bubble {
        display: block;
        position: absolute;
        inset: 0;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        max-width: none;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 22px 22px 22px 22px;
        border-radius: inherit;
        background: linear-gradient(160deg,
            rgba(20, 19, 42, 0.92) 0%,
            rgba(20, 19, 42, 0.96) 60%,
            rgba(var(--accent), 0.18) 100%);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        border: 1px solid rgba(var(--accent), 0.45);
        color: rgba(255,255,255,0.96);
        font-size: 15px;
        line-height: 1.55;
        display: flex;
        align-items: center;
        text-align: left;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(12px) scale(0.98);
        transition: opacity 0.35s ease,
                    transform 0.4s cubic-bezier(.22,.61,.36,1),
                    visibility 0s linear 0.35s;
        z-index: 5;
        box-shadow: 0 18px 48px rgba(0,0,0,0.55),
                    0 0 60px rgba(var(--accent), 0.25),
                    inset 0 0 0 1px rgba(255,255,255,0.04);
    }

    /* Hide the desktop arrow/tail on mobile overlay */
    .areas-of-work .area-card .area-card__bubble::before,
    .areas-of-work .area-card:nth-child(even) .area-card__bubble::before {
        display: none;
    }

    /* Disable hover-reveal on touch — only tap toggle reveals */
    .areas-of-work .area-card:hover .area-card__bubble,
    .areas-of-work .area-card:focus-within .area-card__bubble,
    .areas-of-work .area-card:nth-child(even):hover .area-card__bubble,
    .areas-of-work .area-card:nth-child(even):focus-within .area-card__bubble {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(12px) scale(0.98);
    }

    /* Active reveal */
    .areas-of-work .area-card.is-revealed .area-card__bubble {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(0) scale(1) !important;
        transition: opacity 0.35s ease,
                    transform 0.45s cubic-bezier(.22,.61,.36,1),
                    visibility 0s linear 0s !important;
    }

    /* Subtle accent corner glow when revealed */
    .areas-of-work .area-card.is-revealed::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        pointer-events: none;
        box-shadow: 0 0 0 1px rgba(var(--accent), 0.5),
                    0 0 30px rgba(var(--accent), 0.35);
        z-index: 4;
    }
}

@media (max-width: 480px) {
    .areas-of-work .area-card .area-card__bubble,
    .areas-of-work .area-card:nth-child(even) .area-card__bubble {
        font-size: 14px;
        padding: 18px 18px 18px 18px;
        line-height: 1.5;
    }
    .area-card__info-btn { width: 30px; height: 30px; top: 12px; right: 12px; }
}

/* ===========================================================
   Horizontal works rail — "More case studies"
   Compact cards, snap scroll, edge fade for spillover.
   =========================================================== */
.works-rail-wrap {
    position: relative;
    margin: 56px auto 0;
    padding: 0 20px;
    width: 100%;
    max-width: 1200px;
}
.works-rail-header {
    text-align: center;
    margin-bottom: 28px;
    padding: 0 20px;
}
.works-rail-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    letter-spacing: -0.02em;
    color: #f5f4ff;
    margin: 0 0 8px;
}
.works-rail-sub {
    color: rgba(245, 244, 255, 0.62);
    font-size: 0.95rem;
    margin: 0;
}
.works-rail {
    position: relative;
    display: flex;
    gap: 22px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y pan-x;
    padding: 18px 64px 32px;
    scrollbar-width: thin;
    scrollbar-color: rgba(179,136,255,0.35) transparent;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
.works-rail::-webkit-scrollbar { height: 8px; }
.works-rail::-webkit-scrollbar-thumb { background: rgba(179,136,255,0.35); border-radius: 999px; }

/* Prev/Next nav buttons */
.works-rail-nav {
    position: absolute;
    top: calc(50% - 30px);
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(179,136,255,0.35);
    background: rgba(20, 19, 42, 0.85);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    color: #f5f4ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    transition: transform 0.25s ease, background 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
    opacity: 0.95;
}
.works-rail-nav:hover {
    background: rgba(179,136,255,0.25);
    border-color: rgba(179,136,255,0.6);
    transform: translateY(-50%) scale(1.06);
}
.works-rail-nav:focus-visible {
    outline: 2px solid #b388ff;
    outline-offset: 3px;
}
.works-rail-nav[hidden] { display: none; }
.works-rail-nav--prev { left: 6px; }
.works-rail-nav--next { right: 6px; }

/* Swipe / scroll hint pill */
.works-rail-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 6px auto 0;
    padding: 6px 14px;
    background: rgba(179,136,255,0.12);
    border: 1px solid rgba(179,136,255,0.25);
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: rgba(245,244,255,0.78);
    width: fit-content;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.4s ease;
}
.works-rail-hint__icon {
    display: inline-flex;
    color: #b388ff;
    animation: railHintNudge 1.8s ease-in-out infinite;
}
.works-rail-hint.is-hidden { opacity: 0; pointer-events: none; }
@keyframes railHintNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

/* Progress bar */
.works-rail-progress {
    position: relative;
    height: 6px;
    margin: 18px auto 0;
    max-width: 280px;
    background: rgba(179,136,255,0.28);
    border: 1px solid rgba(179,136,255,0.22);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
}
.works-rail-progress__bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 20%;
    background: linear-gradient(90deg, #b388ff, #8a5cff);
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(179,136,255,0.55);
    transition: transform 0.18s ease, width 0.18s ease;
}

/* Hide arrow buttons on touch — swipe is more natural */
@media (hover: none) and (pointer: coarse) {
    .works-rail-nav { display: none !important; }
}

.rail-card {
    --card-accent: #b388ff;
    flex: 0 0 360px;
    max-width: 360px;
    scroll-snap-align: center;
    background: rgba(20, 19, 42, 0.85);
    border: 1px solid rgba(179,136,255,0.18);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.45s cubic-bezier(.22,.61,.36,1),
                box-shadow 0.45s cubic-bezier(.22,.61,.36,1),
                border-color 0.3s ease;
    box-shadow: 0 6px 22px rgba(0,0,0,0.32);
    will-change: transform;
}
.rail-card:hover,
.rail-card:focus-visible {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--card-accent) 55%, transparent);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45),
                0 0 0 1px color-mix(in srgb, var(--card-accent) 35%, transparent);
    outline: none;
}
.rail-card__cover {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #0d0c1f;
}
.rail-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 6s ease-out;
    display: block;
}
.rail-card:hover .rail-card__cover img { transform: scale(1.08); }
.rail-card__year {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(20,19,42,0.92);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    color: #f5f4ff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(179,136,255,0.3);
}
.rail-card__body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.rail-card__client {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--card-accent) 80%, white 20%);
}
.rail-card__title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.3;
    color: #f5f4ff;
    margin: 0;
    letter-spacing: -0.01em;
}
.rail-card__lead {
    font-family: 'Inter', sans-serif;
    font-size: 0.86rem;
    line-height: 1.5;
    color: rgba(245,244,255,0.68);
    margin: 0;
    /* clamp 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rail-card__tags {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rail-card__tags li {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(245,244,255,0.78);
    background: rgba(179,136,255,0.1);
    border: 1px solid rgba(179,136,255,0.25);
    padding: 4px 9px;
    border-radius: 999px;
}
.rail-card__cta {
    margin-top: auto;
    padding-top: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--card-accent) 70%, white 30%);
    transition: gap 0.3s ease, transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.rail-card:hover .rail-card__cta { gap: 10px; }

@media (max-width: 1024px) {
    /* iPad — show ~2.3 cards so the next one peeks in */
    .rail-card { flex-basis: 320px; max-width: 320px; }
    .works-rail { padding: 18px 48px 28px; }
}
@media (max-width: 768px) {
    .works-rail-wrap { padding: 0 16px; }
    .rail-card { flex-basis: 300px; max-width: 300px; }
    .rail-card__cover { height: 170px; }
    .works-rail { padding: 18px 40px 28px; gap: 16px; }
    .works-rail-progress { max-width: 180px; }
}
@media (max-width: 480px) {
    .works-rail-wrap { padding: 0 12px; }
    /* Phone — card is ~85vw so the edge of the next card is clearly visible */
    .rail-card { flex-basis: 85vw; max-width: 340px; }
    .works-rail {
        padding: 18px 24px 28px;
        gap: 14px;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 40px), transparent 100%);
                mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 40px), transparent 100%);
    }
    .works-rail-hint { font-size: 0.72rem; padding: 5px 12px; }
}

/* ==========================================================
   Unified rail card — brand row + dual action buttons
   ========================================================== */
.rail-card__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
    min-width: 0;
}
.rail-card__brand img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px;
    max-height: 28px;
    border-radius: 8px;
    object-fit: cover;
    background: #0d0c1f;
    border: 1px solid rgba(255,255,255,0.1);
    flex: 0 0 28px;
    display: block;
}
.rail-card__brand span {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--card-accent) 80%, white 20%);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.rail-card__actions {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.rail-card__btn {
    flex: 1 1 auto;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
}
.rail-card__btn--ghost {
    background: transparent;
    border-color: rgba(245,244,255,0.18);
    color: rgba(245,244,255,0.85);
}
.rail-card__btn--ghost:hover {
    border-color: color-mix(in srgb, var(--card-accent) 60%, transparent);
    color: #fff;
    background: color-mix(in srgb, var(--card-accent) 12%, transparent);
}
.rail-card__btn--primary {
    background: color-mix(in srgb, var(--card-accent) 88%, white 12%);
    color: #0d0c1f;
}
.rail-card__btn--primary:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--card-accent) 96%, white 4%);
}
.rail-card__btn:focus-visible {
    outline: 2px solid var(--card-accent);
    outline-offset: 2px;
}
@media (max-width: 480px) {
    .rail-card__btn { font-size: 0.78rem; padding: 9px 10px; }
}

/* =================== FIX: Mobile quick-popup header + safe portrait crop =================== */
@media (max-width: 600px) {
  .project-popup .popup-content { width: calc(100% - 16px); max-height: calc(100dvh - 22px); border-radius: 18px; }
  .popup-header {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 14px 14px 12px; min-height: 0;
  }
  .popup-header h2 {
    order: 1; position: static; left: auto; transform: none;
    flex: 1 1 calc(100% - 46px); min-width: 0; padding: 0;
    font-size: 16px; font-weight: 700; line-height: 1.2; text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .popup-header .close-btn {
    order: 1; flex: 0 0 36px; width: 36px; height: 36px; margin-left: 0; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,0.08); font-size: 24px; line-height: 1;
  }
  .popup-header .contact-btn,
  .popup-header .cta-button,
  .popup-header .open-full-page {
    order: 2; position: static; left: auto; transform: none; margin: 0;
    flex: 1 1 0; min-width: 0; min-height: 44px; padding: 10px 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; font-size: 13px; font-weight: 700; line-height: 1.15;
    text-align: center; white-space: normal;
  }
  .popup-header .open-full-page span:first-child {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .popup-header .open-full-page span[aria-hidden="true"] { flex: 0 0 auto; }
  .case-teaser__lang-notice + a,
  .case-teaser__lang-notice { font-size: 12px; }
}

/* Keep portrait visible: remove inherited hero-image height/zoom/fade from the circular image */
.popup-body.case-teaser .case-teaser__cover--portrait::after,
.case-teaser__cover.case-teaser__cover--portrait::after { display: none !important; }
.popup-body.case-teaser .case-teaser__cover--portrait img,
.case-teaser__cover.case-teaser__cover--portrait img,
.popup-profile-image,
#about-body .popup-profile-image,
#about-body img.popup-profile-image {
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: 50% 50% !important;
  transform: none !important;
}
@media (max-width: 560px) {
  .popup-body.case-teaser .case-teaser__cover--portrait,
  .case-teaser__cover.case-teaser__cover--portrait {
    width: 188px !important; min-width: 188px !important; max-width: 188px !important;
    height: 188px !important; min-height: 188px !important; max-height: 188px !important;
    flex-basis: 188px !important; margin-top: 8px !important;
  }
}

/* =================== FIX: SVG icon system (replaces old image icons) =================== */
.still-here-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin: 0 auto 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(138,43,226,0.18), rgba(75,0,130,0.18));
  border: 1px solid rgba(179,136,255,0.35);
  color: #b388ff;
}
.still-here-icon svg { width: 28px; height: 28px; }

.footer-h3-icon {
  display: inline-flex; vertical-align: -4px;
  width: 20px; height: 20px; margin-right: 6px; color: #b388ff;
}
.footer-h3-icon svg { width: 100%; height: 100%; }

/* Email icon-buttons */
.email-container .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; margin-left: 6px;
  border-radius: 999px;
  background: rgba(145, 71, 255, 0.18);
  border: 1px solid rgba(179,136,255,0.4);
  color: #d6c2ff; cursor: pointer;
  transition: background-color .25s ease, transform .25s ease, color .25s ease;
}
.email-container .icon-btn svg { width: 16px; height: 16px; }
.email-container .icon-btn:hover {
  background: rgba(145,71,255,0.85);
  color: #fff;
  transform: translateY(-1px) scale(1.05);
}

/* SVG-based social icons override img-based rules */
.social-media-icons--svg a {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(179,136,255,0.25);
  color: #d6c2ff;
  transition: background-color .25s ease, transform .25s ease, color .25s ease, box-shadow .25s ease;
}
.social-media-icons--svg a svg { width: 18px; height: 18px; }
.social-media-icons--svg a:hover {
  background: rgba(145,71,255,0.85);
  color: #fff;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 6px 18px rgba(145,71,255,0.45);
}

/* =================== FIX: Sticky case/about topbar — behave like landing fixed navbar =================== */
.case-topbar {
  position: fixed !important;
  top: 0; left: 0; right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(18, 17, 31, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* Push page content down to clear the fixed bar */
body.case-page { padding-top: 64px; }
@media (max-width: 600px) {
  body.case-page { padding-top: 56px; }
  .case-topbar { padding: 10px 14px; }
}
