#profileHeader {
    max-width: 100vw;
}
.mainPageHeaderProfile {
    height: min(80vh, 850px);
    display: grid;
    place-items:center;
    background-size: contain;
    background-position: right center;
    background-repeat: no-repeat;
    max-width: 1750px;
    margin: auto;
}

.profileContentInner {
    display: grid;
    grid-template-columns: 200px auto;
    grid-auto-flow: row;
    gap: 1rem;
}

.story-grid {
    margin-bottom: 1rem;
}

.profileButtons {
    display:flex;
    gap: 25px;
}
@media screen and (min-width: 768px){
    .profileContentInner .story-grid {
        grid-template-columns: 1fr;
    }
}
@media screen and (min-width: 1000px){
    .profileContentInner .story-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.mainPageHeaderProfile .mainPageHeaderInner {
    color: white;
    text-shadow: 
        0 1px 1px rgba(0,0,0,0.5),
        0 1px 3px rgba(0,0,0,0.5),
        0 2px 5px rgba(0,0,0,0.4);
    font-weight: 600;
}

@media screen and (max-width: 768px) {
    .profileContentInner{
        display: block;
    }

    .profileContentInner .profileItems {
        flex-direction:column;
        margin-bottom: 25px;

    }
}

.currentlyReadingItem {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 185px;
    grid-auto-flow: column;
    width: 100%;
    margin: 1rem 0;
    border-radius: 10px;
    padding: 0px 15px;
    border: 1px solid black;
    align-items: center;
    gap: 15px;
    background: white;
}


@media screen and (max-width: 768px) {
    .currentlyReadingItem {
        display: grid;
        grid-auto-flow: row;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
        column-gap: 5px;
        padding-top: 10px;
    }

    .currentlyReadingItem .title {
        grid-column: span 2;
        margin-bottom: 10px;
    }

    .currentlyReadingItem .title h4 {
        display: inline-block;
    }

    .currentlyReadingItem .title h4:after {
        content: ":";
    }

    .currentlyReadingItem .title span {
        font-weight: bold;
    }


    .currentlyReadingItem .continue {
        grid-column: span 2;
        grid-row: 4;
    }
}


@media screen and (min-width: 768px) and (max-width: 1100px) {
    .currentlyReadingItem {
        display: grid;
        grid-auto-flow: row;
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: auto auto;
        column-gap: 5px;
        padding-top: 10px;
    }
}

/* 
.currentlyReadingItem:nth-of-type(even) {
background: #ebebeb;
} */

.button-profile {
    display: block;
    background: lightgrey;
    color: black;
    text-align: center;
}

/* .currentlyReadingItem:nth-of-type(even) .button-profile{
    background: white !important;
} */



/* Stories Read Container Grid of stories read */
.StoriesReadContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

}

.StoriesReadContainer .singleReadStory {
    margin: 5px;
}



@media screen and (min-width: 768px) {
    .StoriesReadContainer {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .StoriesReadContainer .singleReadStory {
        margin: 0;
    }
}

@media screen and (min-width: 1240px) {
    .StoriesReadContainer {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }

    .StoriesReadContainer .singleReadStory {
        margin: 0;
    }
}


.singleReadStory .imgContainer {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 15px 15px 0 0;
    position: relative;
    border-style: solid;
    border-color: black;
    border-width: 1px 1px 0 1px;
    overflow: hidden;
}

.singleReadStory .imgContainer .storyLevel {
    font-size: 18px;
    font-weight: bold;
    padding: 5px 35px;
    border-radius: 10px;
    position: absolute;
    bottom: 5px;
    left: 5px;
    margin: 5px;
}

#contentSectionStoryGrid .cover_image .storyLanguage,
.singleReadStory .imgContainer .storyLanguage {
    font-size: 18px;
    font-weight: bold;
    padding: 5px;
    border-radius: 10px;
    position: absolute;
    top:0px;
    right: 5px;
    margin: 5px;
    font-size: 25px;
}

#contentSectionStoryGrid .cover_image .storyLanguage {
    left: unset;
    width: fit-content;
    background: rgba(255, 255, 255, 0.565);
}

.singleReadStory .imgContainer .storyLanguage {
    background: white;
    top:unset;
    bottom:5px;
}




.storyLanguageFlags{
    font-size: 30px !important;
}

.singleReadStory .storyTitle {
    font-size: 22px;
    /* background-color: black; */
    color: black;
    padding: 10px 5px;
    border-radius: 0 0 15px 15px;
    text-align: center;
    border-style: solid;
    border-color: black;
    border-width: 0px 1px 1px 1px;
}

.singleReadStory .storyTitle h3 {
    margin-bottom: 0;
}

select {

    padding: 8px 12px;
    border: 2px solid #3498db;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    color: #333;
}

.profileContentInnerContent {
    background-color:#f9f9f9;
    padding: 2rem;
    border-radius: 15px;
}

/* PROFILE TABLE  */
.subscription-section .grid-3-column {
    grid-template-columns: 1fr;
    gap: 25px;
}

.profileItems {
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    height: fit-content;
    position: sticky;
    top: 8rem;
    z-index: 4;
}

.profileItems svg {
    height: 25px;
    width: 25px;
    margin-top: 5px;

}

.profileItems li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    gap: 15px;
}

.profileItems span{ 
    flex: 1;
}

.profileItems li:last-child {
    border-bottom: none;
}

.profileItems li:hover {
    background: #e9ecef;
}

.profileItems li.active {
    background: #007bff;
    color: white;
}

.profileContentInnerContent {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.profileContentInnerContent.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .contentSection {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profileItems {
        position: static;
        display: flex;
        overflow-x: auto;
        border-radius: 8px;
    }

    .profileItems li {
        white-space: nowrap;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid #e9ecef;
    }
}

.profileContentContainer .form-container {
    margin: 0;
}

/*  */
/* LANGUAGE MASTERY  */
/*  */

/* Language Mastery Progress Bars */

:root {
    --entryLevel: rgb(232, 25, 87);
    --beginnerLevel: rgb(229, 195, 25);
    --intermediateLevel: green;
    --upperIntermediateLevel: rgb(24, 109, 226);
}

#languageMastery .singleLanguage {
    margin-bottom: 40px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    width: 100%;
}

#languageMastery .singleLanguage:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

#languageMastery .languageHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

#languageMastery .languageHeader:hover{
    transform: scale(1);
}

.languageName {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
}

.currentLevel {
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Level-specific current level badge colors */
.singleLanguage.has-level-a1 .currentLevel {
    background: var(--entryLevel);
    box-shadow: 0 2px 8px rgba(232, 25, 87, 0.3);
}

.singleLanguage.has-level-a2 .currentLevel {
    background: var(--beginnerLevel);
    box-shadow: 0 2px 8px rgba(229, 195, 25, 0.3);
}

.singleLanguage.has-level-b1 .currentLevel {
    background: var(--intermediateLevel);
    box-shadow: 0 2px 8px rgba(0, 128, 0, 0.3);
}

.singleLanguage.has-level-b2 .currentLevel {
    background: var(--upperIntermediateLevel);
    box-shadow: 0 2px 8px rgba(24, 109, 226, 0.3);
}

.noLevel {
    background: #f8f9fa;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid #dee2e6;
}

.levelProgressBar {
    margin-top: 15px;
}

.levelProgressBar.untested {
    opacity: 0.6;
}

.progressSteps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.progressStep {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.stepCircle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    border: 3px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

/* A1 Level - Entry Level */
.progressStep[data-level="0"].completed .stepCircle {
    background: var(--entryLevel);
    border-color: var(--entryLevel);
    color: white;
    box-shadow: 0 2px 8px rgba(232, 25, 87, 0.3);
}

.progressStep[data-level="0"].current .stepCircle {
    background: var(--entryLevel);
    border-color: var(--entryLevel);
    color: white;
    box-shadow: 0 2px 12px rgba(232, 25, 87, 0.4);
    transform: scale(1.1);
}

/* A2 Level - Beginner Level */
.progressStep[data-level="1"].completed .stepCircle {
    background: var(--beginnerLevel);
    border-color: var(--beginnerLevel);
    color: white;
    box-shadow: 0 2px 8px rgba(229, 195, 25, 0.3);
}

.progressStep[data-level="1"].current .stepCircle {
    background: var(--beginnerLevel);
    border-color: var(--beginnerLevel);
    color: white;
    box-shadow: 0 2px 12px rgba(229, 195, 25, 0.4);
    transform: scale(1.1);
}

/* B1 Level - Intermediate Level */
.progressStep[data-level="2"].completed .stepCircle {
    background: var(--intermediateLevel);
    border-color: var(--intermediateLevel);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 128, 0, 0.3);
}

.progressStep[data-level="2"].current .stepCircle {
    background: var(--intermediateLevel);
    border-color: var(--intermediateLevel);
    color: white;
    box-shadow: 0 2px 12px rgba(0, 128, 0, 0.4);
    transform: scale(1.1);
}

/* B2 Level - Upper Intermediate Level */
.progressStep[data-level="3"].completed .stepCircle {
    background: var(--upperIntermediateLevel);
    border-color: var(--upperIntermediateLevel);
    color: white;
    box-shadow: 0 2px 8px rgba(24, 109, 226, 0.3);
}

.progressStep[data-level="3"].current .stepCircle {
    background: var(--upperIntermediateLevel);
    border-color: var(--upperIntermediateLevel);
    color: white;
    box-shadow: 0 2px 12px rgba(24, 109, 226, 0.4);
    transform: scale(1.1);
}

.stepLabel {
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-align: center;
}

.progressStep[data-level="0"].completed .stepLabel,
.progressStep[data-level="0"].current .stepLabel {
    color: var(--entryLevel);
    font-weight: 700;
}

.progressStep[data-level="1"].completed .stepLabel,
.progressStep[data-level="1"].current .stepLabel {
    color: var(--beginnerLevel);
    font-weight: 700;
}

.progressStep[data-level="2"].completed .stepLabel,
.progressStep[data-level="2"].current .stepLabel {
    color: var(--intermediateLevel);
    font-weight: 700;
}

.progressStep[data-level="3"].completed .stepLabel,
.progressStep[data-level="3"].current .stepLabel {
    color: var(--upperIntermediateLevel);
    font-weight: 700;
}

.stepConnector {
    position: absolute;
    top: 20px;
    left: calc(50% + 20px);
    width: calc(100% - 40px);
    height: 3px;
    background: #dee2e6;
    z-index: 1;
    border-radius: 2px;
}

/* Connector colors based on the level they're coming FROM */
.stepConnector[data-from-level="0"].completed {
    background: var(--entryLevel); /* A1 color */
}

.stepConnector[data-from-level="1"].completed {
    background: var(--beginnerLevel); /* A2 color */
}

.stepConnector[data-from-level="2"].completed {
    background: var(--intermediateLevel); /* B1 color */
}

/* Always show connectors, remove the last-child hiding */

.progressStep:last-child .stepConnector {
    display: none;
}

.progressBarContainer {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progressBarFill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease-in-out;
    position: relative;
    background: linear-gradient(90deg, var(--entryLevel) 0%, var(--beginnerLevel) 33%, var(--intermediateLevel) 66%, var(--upperIntermediateLevel) 100%);
}

/* Dynamic gradient based on current level */
.singleLanguage.has-level-a1 .progressBarFill {
    background: var(--entryLevel);
}

.singleLanguage.has-level-a2 .progressBarFill {
    background: linear-gradient(90deg, var(--entryLevel) 0%, var(--beginnerLevel) 100%);
}

.singleLanguage.has-level-b1 .progressBarFill {
    background: linear-gradient(90deg, var(--entryLevel) 0%, var(--beginnerLevel) 50%, var(--intermediateLevel) 100%);
}

.singleLanguage.has-level-b2 .progressBarFill {
    background: linear-gradient(90deg, var(--entryLevel) 0%, var(--beginnerLevel) 33%, var(--intermediateLevel) 66%, var(--upperIntermediateLevel) 100%);
}

.progressBarFill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progressText {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

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

.progressPercentage {
    color: var(--upperIntermediateLevel);
    font-weight: 600;
}

/* Dynamic percentage color based on current level */
.singleLanguage.has-level-a1 .progressPercentage {
    color: var(--entryLevel);
}

.singleLanguage.has-level-a2 .progressPercentage {
    color: var(--beginnerLevel);
}

.singleLanguage.has-level-b1 .progressPercentage {
    color: var(--intermediateLevel);
}

.singleLanguage.has-level-b2 .progressPercentage {
    color: var(--upperIntermediateLevel);
}

.retakeTestBtn {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.3);
    white-space: nowrap;
}

.retakeTestBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
    text-decoration: none;
    color: white;
}

/* Dynamic retake button colors based on current level */
.singleLanguage.has-level-a1 .retakeTestBtn {
    background: linear-gradient(135deg, var(--entryLevel) 0%, rgba(232, 25, 87, 0.8) 100%);
    box-shadow: 0 2px 6px rgba(232, 25, 87, 0.3);
}

.singleLanguage.has-level-a1 .retakeTestBtn:hover {
    box-shadow: 0 4px 8px rgba(232, 25, 87, 0.4);
}

.singleLanguage.has-level-a2 .retakeTestBtn {
    background: linear-gradient(135deg, var(--beginnerLevel) 0%, rgba(229, 195, 25, 0.8) 100%);
    box-shadow: 0 2px 6px rgba(229, 195, 25, 0.3);
}

.singleLanguage.has-level-a2 .retakeTestBtn:hover {
    box-shadow: 0 4px 8px rgba(229, 195, 25, 0.4);
}

.singleLanguage.has-level-b1 .retakeTestBtn {
    background: linear-gradient(135deg, var(--intermediateLevel) 0%, rgba(0, 128, 0, 0.8) 100%);
    box-shadow: 0 2px 6px rgba(0, 128, 0, 0.3);
}

.singleLanguage.has-level-b1 .retakeTestBtn:hover {
    box-shadow: 0 4px 8px rgba(0, 128, 0, 0.4);
}

.progressLabel {
    color: #495057;
}

.progressPercentage {
    color: var(--upperIntermediateLevel);
    font-weight: 600;
}

/* Dynamic percentage color based on current level */
.singleLanguage.has-level-a1 .progressPercentage {
    color: var(--entryLevel);
}

.singleLanguage.has-level-a2 .progressPercentage {
    color: var(--beginnerLevel);
}

.singleLanguage.has-level-b1 .progressPercentage {
    color: var(--intermediateLevel);
}

.singleLanguage.has-level-b2 .progressPercentage {
    color: var(--upperIntermediateLevel);
}

.takeTestBtn {
    background: linear-gradient(135deg, var(--upperIntermediateLevel) 0%, #6610f2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(24, 109, 226, 0.3);
    font-weight: 900;
}

.takeTestBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 109, 226, 0.4);
    text-decoration: none;
    color: white;
}

.checkmark {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .languageHeader {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .progressSteps {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .stepConnector {
        display: none;
    }
    
    .progressText {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .progressActions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }
    
    .retakeTestBtn {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .singleLanguage {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .languageName {
        font-size: 1.2em;
    }
    
    .stepCircle {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
    
    .stepLabel {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .progressSteps {
        justify-content: space-around;
    }
    
    .stepCircle {
        width: 30px;
        height: 30px;
        font-size: 11px;
    }
    
    .stepLabel {
        font-size: 10px;
    }
    
    .currentLevel,
    .noLevel {
        font-size: 0.8em;
        padding: 6px 12px;
    }
}


/* SUBSCRIPTION CARDS WITHIN PROFILE PAGE */

/* keuze voor tablet tot 1240px. dan beste keuze boven groot, daaronder 2 andere*/
@media screen and (min-width: 768px) {
    #profileDetails .grid-column-keuzeKaartje {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "a a"
            "b c";
    }
    #profileDetails #yearlySubCard {
        grid-area: a;
        transform: scale(1);
    }
    #profileDetails #monthlySubCard {
        grid-area:  b;
    }
    #profileDetails  #singlePurchaseCard {
        grid-area:  c;
    }
    #profileDetails #yearlySubCard ul {
        display: flex;
        flex-wrap: wrap;
        gap: 20px; /* Space between items */
    }
    
    #profileDetails #yearlySubCard ul li {
        flex: 0 0 calc(50% - 40px); /* 50% minus half the gap */
    }
}



/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .singleLanguage {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .languageName {
        color: #e2e8f0;
    }
    
    .stepLabel {
        color: #a0aec0;
    }
    
    .progressLabel {
        color: #a0aec0;
    }
    
    .noLevel {
        background: #4a5568;
        color: #a0aec0;
        border-color: #718096;
    }
}

.storyLFL a {
    color: steelblue;
    text-decoration: underline;
}

.profielFotoLaurens {
    height: 250px;
    width: 250px;
    border-radius: 200px;
}

.deletion-warnings {
    background: rgba(178, 34, 34, 0.1);
    padding: 25px;
    border-radius: 15px;
}

.error-message {
    font-weight: bold; 
    color: firebrick;
    font-size: 18px;
}

/* Language Test */

/* Unavailable language styles */
.singleLanguage.unavailable {
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    opacity: 0.8;
}

.singleLanguage.unavailable .languageHeader {
    position: relative;
}

.unavailableLabel {
    background-color: #e0e0e0;
    color: #666;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: normal;
}

.unavailableContent {
    padding: 20px;
    text-align: center;
}

.unavailableMessage {
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
}

.availableInLocales {
    font-size: 0.9em;
    color: #555;
}

.localeTag {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 2px 8px;
    margin: 0 3px;
    border-radius: 3px;
    font-weight: 500;
}

/* Optional: Add hover effect to show it's not clickable */
.singleLanguage.unavailable:hover {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Optional: Style the language name differently */
.singleLanguage.unavailable .languageName {
    color: #999;
}