/*
 * Refined Soft UI Theme - Mobile-First Professional Header
 * Fonts: Poppins (Sans-Serif), Inter (Sans-Serif)
 * Aesthetic: Clean, textured light background, minimal, professional icons.
 */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* --- CSS Variables & Base Styles --- */
:root {
    --font-header: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --accent-color: #007BFF; /* A classic, confident blue */
    --accent-hover: #0056b3;

    --bg-primary: #F4F7FC;
    --bg-secondary: #FFFFFF;
    --text-primary: #1D2A3B;
    --text-secondary: #5A6B82;
    --border-color: #DDE3EC;

    --white: #ffffff;
    --green: #28a745;
    --red: #dc3545;
    
    --color-green: #28a745;
    --color-blue: #007bff;
    --color-purple: #6f42c1;
    --color-orange: #fd7e14;
    --color-red: #dc3545;
    --color-dark-red: #a71d2a;

    --header-height: 70px;
    --header-height-mobile: 70px;
}

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

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

body {
    background-color: var(--bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23d1d9e6' fill-opacity='0.4'%3E%3Cpath d='M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    font-family: var(--font-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    zoom: 0.80;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

main {
    padding-top: 2rem;
}

h1, h2, h3, h4 {
    font-family: var(--font-header);
    font-weight: 700;
}

/* --- Professional Mobile-First Header --- */
header {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height-mobile);
    transition: all 0.3s ease;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    header {
        height: var(--header-height);
    }
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

/* --- Professional Logo --- */
.logo {
    font-family: var(--font-header);
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--accent-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
}

@media (min-width: 768px) {
    .logo {
        font-size: 1.6rem;
    }
}


/* --- Mobile Hamburger Menu --- */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.hamburger:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger span:not(:last-child) {
    margin-bottom: 5px;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* --- Navigation Links --- */
.nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height-mobile));
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 247, 252, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    padding-top: 3rem;
    opacity: 0;
    visibility: hidden;
}

.nav-links.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.nav-link {
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 1rem 2rem;
    width: 100%;
    text-align: center;
    border-radius: 12px;
    margin: 0.5rem 1rem;
    position: relative;
    overflow: hidden;
}

.nav-link:active {
    transform: scale(0.98);
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .nav-links {
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding-top: 0;
        transform: none;
        opacity: 1;
        visibility: visible;
        gap: 1rem;
        border-right: none;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
        margin: 0;
        width: auto;
        color: var(--text-secondary);
        background: transparent;
        border-radius: 8px;
    }

    .nav-link:hover {
        background-color: rgba(0, 123, 255, 0.08);
        color: var(--accent-color);
    }
}

/* --- Body Padding for Fixed Header --- */
body {
    padding-top: var(--header-height-mobile);
}

@media (min-width: 768px) {
    body {
        padding-top: var(--header-height);
    }
}

/* --- Page Headers --- */
.intro-box {
    text-align: center;
    padding: 4rem 0;
}
.intro-box h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--text-primary);
}
.intro-box .intro-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.8;
}
.accent-text { color: var(--accent-color); }

/* --- Buttons --- */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-start {
    color: var(--white);
    background-color: var(--accent-color);
}
.btn-start:hover {
    background-color: var(--accent-hover);
}

/* --- Test Interface & Result Card --- */
.test-container, .result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin: 30px auto;
    max-width: 800px;
    padding: 1rem;
}
.test-container {
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.test-container.fade-out { opacity: 0; transform: scale(0.99); }
.progress-bar { height: 8px; background-color: var(--accent-color); transition: width 0.3s ease-in-out; border-radius: 4px; }
.progress-bar-container { background: #E3E6EA; padding: 0.5rem; border-radius: 8px; }
.question-header { padding: 1rem 1.5rem; }
.question-header h1 { font-family: var(--font-body); font-size: 0.7rem; font-weight: 500; color: var(--text-secondary); text-align: center; }
.question-box { padding: 2.5rem 1.5rem; text-align: center; }
.question-text { font-family: var(--font-header); font-size: 2rem; font-weight: 600; margin-bottom: 3.5rem; min-height: 100px; display: flex; align-items: center; justify-content: center; }
.answer-form { display: flex; justify-content: center; gap: 1.5rem; }
.btn-yes, .btn-no { color: var(--white); min-width: 160px; font-size: 1.2rem; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn-yes { background-color: var(--green); }
.btn-yes:hover { background-color: #218838; transform: translateY(-2px); }
.btn-no { background-color: var(--red); }
.btn-no:hover { background-color: #c82333; transform: translateY(-2px); }

/* --- Result Display --- */
.result-container { padding: 2rem 0; }
.result-card { padding: 3rem; text-align: center; }
.result-title { font-family: var(--font-body); font-size: 1.2rem; color: var(--text-secondary); font-weight: 500; }
.result-score { font-family: var(--font-header); font-size: 7rem; font-weight: 800; margin: 1rem 0; color: var(--accent-color); }
.result-interpretation { font-family: var(--font-header); font-size: 2rem; font-weight: 600; margin-bottom: 2.5rem; }
.result-comment { color: var(--text-secondary); margin-bottom: 3rem; max-width: 400px; margin-left: auto; margin-right: auto; }
.result-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; }
.btn-retake { color: var(--white); background-color: var(--accent-color); }
.btn-retake:hover { background-color: var(--accent-hover); }
.btn-share { background-color: transparent; color: var(--text-primary); border: 2px solid var(--border-color); }
.btn-share:hover { background-color: var(--white); border-color: var(--accent-color); }

/* --- Result Details (Experience Breakdown) --- */
.result-details {
    margin-top: 2.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2.5rem;
    text-align: left;
}
.result-details h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}
.detail-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}
.detail-label {
    flex-basis: 150px;
    flex-shrink: 0;
    font-weight: 500;
    color: var(--text-secondary);
}
.detail-bar-container {
    flex-grow: 1;
    background-color: #e9ecef;
    border-radius: 8px;
    height: 16px;
    overflow: hidden;
}
.detail-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-hover), var(--accent-color));
    border-radius: 8px;
    transition: width 0.5s ease-out;
}

/* --- Feature Highlight Grid --- */
.feature-highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 5rem 0;
}

.feature-card-new {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 320px;
}
.feature-card-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.feature-card-new .icon-wrapper {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.feature-card-new .icon-wrapper svg {
    width: 40px;
    height: 40px;
    color: var(--accent-color);
}
.feature-card-new h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}
.feature-card-new p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* --- Guide Section --- */
.guide-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4rem;
    margin-top: 4rem;
}
.guide-header { text-align: center; max-width: 700px; margin: 0 auto 3rem auto; }
.guide-header h2 { font-size: 3rem; margin-bottom: 1rem; }
.guide-header p { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.7; }

.guide-content h3 { font-size: 1.75rem; margin-top: 3rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border-color); }
.guide-content h4 { font-size: 1.25rem; font-weight: 600; margin-top: 2rem; margin-bottom: 0.75rem; color: var(--accent-color); }
.guide-content p, .guide-content li { color: var(--text-secondary); line-height: 1.9; }
.guide-content ul { list-style: none; padding-left: 0; }
.guide-content ul li { padding-left: 25px; position: relative; margin-bottom: 0.5rem; }
.guide-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* --- Scores Page Styling --- */
.page-header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}
.page-header h1 { font-size: 3rem; }
.page-header .intro-text { max-width: 650px; margin: 1rem auto 0 auto; color: var(--text-secondary); font-size: 1.1rem; }
.content-box { max-width: 900px; margin: 0 auto; }
.score-overview, .comparison-data, .next-steps { margin-bottom: 4rem; }
.content-box h2 { font-size: 2rem; margin-bottom: 1.5rem; text-align: center; }
.next-steps > p,
.score-overview > p {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 2.5rem auto;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}
.overview-details h3 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
.overview-details p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.detailed-scores { display: grid; gap: 1.5rem; }
.score-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.score-section:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.07); }
.score-range-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.score-range-header h2 { font-size: 1.75rem; margin: 0; }
.score-badge { padding: 0.4rem 1rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; color: var(--white); }
.badge-green { background-color: var(--color-green); }
.badge-blue { background-color: var(--color-blue); }
.badge-purple { background-color: var(--color-purple); }
.badge-orange { background-color: var(--color-orange); }
.badge-red { background-color: var(--color-red); }
.badge-dark-red { background-color: var(--color-dark-red); }
.score-section > p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.5rem; }
.score-details { border-top: 1px solid var(--border-color); padding-top: 1.5rem; }
.score-details h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.checklist { list-style: none; padding: 0; }
.checklist li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}
.checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2328a745'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z' clip-rule='evenodd' /%3E%3C/svg%3E");
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.stat-category { background: var(--bg-secondary); border: 1px solid var(--border-color); padding: 2rem; border-radius: 12px; }
.stat-category h3 { font-size: 1.2rem; margin-top: 0; }
.cta-section { text-align: center; margin-top: 3rem; }

/* --- Accordion Styling for Next Steps --- */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.accordion-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.accordion-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    list-style: none;
}
.accordion-header::-webkit-details-marker {
    display: none;
}
.accordion-title {
    font-size: 1.2rem;
    font-weight: 600;
    font-family: var(--font-header);
    color: var(--text-primary);
}
.accordion-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}
.accordion-item[open] > .accordion-header .accordion-icon {
    transform: rotate(45deg);
}
.accordion-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}



/* --- Language Switcher --- */
.language-switcher {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin: 4rem auto 0 auto;
    display: flex;
    flex-direction: column; /* Stack on mobile */
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 100%;
}

.language-switcher h3 {
    margin: 0;
    font-family: var(--font-header);
    font-size: 1rem;
    color: var(--text-primary);
}

.language-links {
    display: flex;
    gap: 1rem;
}

.lang-link {
    display: inline-block;
    padding: 0.50rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: transparent;
    transition: all 0.3s ease;
}

.lang-link:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: rgba(0, 123, 255, 0.05);
}

.lang-link.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
    cursor: default;
}

/* On larger screens, put the label and links on the same line */
@media (min-width: 600px) {
    .language-switcher {
        flex-direction: row;
        justify-content: space-between;
    }
}









/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    font-size: 0.9rem;
    background-color: var(--bg-secondary);
}

.footer-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

footer p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* On larger screens, display the copyright and links on the same line */
@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
    }
}






.hidden { display: none; }

/* --- Enhanced Mobile Responsiveness --- */
@media (max-width: 480px) {
    :root {
        --header-height-mobile: 70px;
    }

    body {
        zoom: 1;
        padding-top: var(--header-height-mobile);
    }

    .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 0.875rem 1.5rem;
    }

    .intro-box h1 { 
        font-size: 2.2rem; 
    }
    
    .result-score { 
        font-size: 5.5rem; 
    }
    
    .answer-form { 
        flex-direction: column; 
    }
    
    .detail-row { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 0.5rem; 
    }
    
    .detail-label { 
        flex-basis: auto; 
    }
}

@media (max-width: 640px) {
    .intro-box h1 { font-size: 2.2rem; }
    .result-score { font-size: 5.5rem; }
    .answer-form { flex-direction: column; }
    .detail-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .detail-label { flex-basis: auto; }
}

@media (max-width: 768px) {
    .intro-box h1, .page-header h1 { font-size: 2.75rem; }
    .question-text { font-size: 1.75rem; }
    .guide-section { padding: 2.5rem; }
    .guide-header h2 { font-size: 2.25rem; }
    .score-section { padding: 1.5rem; }
    .score-range-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.nav-link:focus,
.hamburger:focus,
.logo:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    header {
        border-bottom: 2px solid var(--text-primary);
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover {
        border-color: var(--accent-color);
    }
}