/* ==========================================
   CSS Variables & Root Styling
   ========================================== */

:root {
    /* Light Mode Colors */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --tertiary-color: #ec4899;
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --text-color: #1a1a2e;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* sector-specific accent colours */
    --primary-sector-color: #10b981;
    --secondary-sector-color: #f59e0b;
    --tertiary-sector-color: #3b82f6;
    --sector-accent: var(--primary-sector-color); /* default, overridden via body class or inline */
}

body.dark-mode {
    /* Dark Mode Colors */
    --bg-color: #1a1a2e;
    --bg-alt: #16213e;
    --text-color: #e8e8ff;
    --text-light: #b0b0c8;
    --border-color: #2d2d44;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* body classes to flip the accent variable depending on sector */
body.primary-sector {
    --sector-accent: var(--primary-sector-color);
}
body.secondary-sector {
    --sector-accent: var(--secondary-sector-color);
}
body.tertiary-sector {
    --sector-accent: var(--tertiary-sector-color);
}

/* ==========================================
   Global Styles
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    opacity: 0;
    transition: opacity 0.6s ease;
}

body.loaded {
    opacity: 1;
}

.hero-title,
.hero-subtitle,
.sector-title,
.sector-intro {
    opacity: 1;
}

body.loaded .hero-title,
body.loaded .hero-subtitle,
body.loaded .sector-title,
body.loaded .sector-intro {
    opacity: 0;
    animation: fadeInUp 0.8s forwards;
}

.hero-title { animation-delay: 0.3s; }
.hero-subtitle { animation-delay: 0.6s; }
.sector-title { animation-delay: 0.3s; }
.sector-intro { animation-delay: 0.6s; }

.nav-link {
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
}

.card-btn {
    transition: var(--transition), transform 0.3s ease;
}

.profession-name,
.profession-description,
.profession-future,
.card-title,
.card-description {
    transition: color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.sector-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.sector-card:hover {
    transform: perspective(600px) rotateY(5deg) translateY(-8px);
}

.card-btn:hover {
    transform: scale(1.08);
}

.theme-toggle,
.lang-btn,
.search-input {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover,
.lang-btn:hover,
.search-input:focus {
    transform: scale(1.1);
}

.theme-toggle:active {
    animation: pulse 0.5s ease;
}
/* additional keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.card-icon {
    animation: bounce 2s ease-in-out infinite, pulse 6s ease-in-out infinite 1s;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    line-height: 1.6;
    overflow-x: hidden;
}

main {
    min-height: calc(100vh - 80px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

main.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ==========================================
   Navigation Bar
   ========================================== */

.navbar {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px; /* allow extra room for longer logo */
    margin: 0 auto;
    padding: 0 20px 0 0; /* logo flush with left edge */
    height: 90px; /* a bit taller for breathing room */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0; /* don't allow the logo to shrink on narrow screens */
    margin-right: 24px; /* more space after logo */
    transition: transform 0.3s ease;
    will-change: transform;
}

.nav-logo:hover {
    transform: rotate(10deg) scale(1.1);
}

.nav-logo {
    will-change: transform;
}

.nav-logo a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    gap: 40px; /* back to original spacing */
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    white-space: nowrap; /* keep multi-word category names on a single line */
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -8px;
    left: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-color);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 36px; /* uniform spacing between all control buttons */
    position: relative; /* for search suggestions positioning */
}

/* extra space around the career quiz link */
.nav-link[href="survey.html"] {
    margin: 0 32px 0 24px; /* 24px left gap, 32px right gap */
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: rotate(20deg);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

body.dark-mode .theme-icon {
    content: '☀️';
}

.language-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
}

.search-input {
    width: 180px;
    padding: 6px 14px; /* slightly wider input spacing */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
    margin-right: 12px;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 4px;
    min-width: 180px;
    box-shadow: var(--card-shadow);
    z-index: 1001;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.search-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 8px; /* tighter spacing to slide search closer to theme toggle */
}

/* Quick Facts Section */
.quick-facts-section {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.quick-facts-section h2 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 28px;
}

.facts-carousel {
    position: relative;
    background: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 40px 30px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fact-item {
    position: absolute;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    font-size: 18px;
    line-height: 1.6;
    text-align: center;
    color: var(--text-color);
    width: 100%;
    padding: 0 20px;
}

.fact-item.active {
    opacity: 1;
    position: relative;
}

.facts-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.indicator:hover {
    background: var(--primary-color);
}

/* FAQ accordion styles */
.faq-section {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
}
.faq-section h2 {
    text-align: center;
    margin-bottom: 24px;
}
.faq-item {
    border-bottom: 1px solid var(--border-color);
}
.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-color);
    position: relative;
}
.faq-question::after {
    content: '\25BC';
    position: absolute;
    right: 0;
    transition: transform 0.3s ease;
}
.faq-question.active::after {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0;
}
.faq-answer.open {
    padding: 12px 0 24px 0;
    max-height: 500px; /* big enough for most answers */
}

.search-suggestions.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-suggestions a {
    display: block;
    padding: 8px 12px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s ease;
    line-height: 1.2;
}

.search-suggestions a:hover {
    background: var(--bg-color);
    transform: translateX(5px);
}

.suggestion-title {
    font-weight: 600;
}

.suggestion-page {
    font-size: 12px;
    color: var(--text-light);
}
.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 4px var(--primary-color);
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-light);
    transition: color 0.3s ease;
    padding: 4px 8px;
}

.lang-btn.active {
    color: var(--primary-color);
    animation: pulse 0.6s ease;
}

.lang-separator {
    color: var(--border-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==========================================
   Home Page - Hero Section
   ========================================== */

.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
    color: white;
    padding: 100px 20px;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -50px;
    left: -100px;
    animation: float 8s ease-in-out infinite reverse;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: slideUp 0.8s ease;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* ==========================================
   Home Page - Sectors Container
   ========================================== */

.sectors-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.sector-card {
    background: var(--bg-alt);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.sector-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: bounce 2s ease-in-out infinite;
}

.card-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.card-description {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.6;
}

.card-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.card-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ==========================================
   Sector Pages
   ========================================== */

.sector-header {
    padding: 60px 20px;
    text-align: center;
    color: white;
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.primary-header {
    background: linear-gradient(135deg, #10b981, #059669);
}

.secondary-header {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.tertiary-header {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.sector-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    animation: slideDown 0.8s ease;
}

.sector-intro {
    font-size: 18px;
    max-width: 700px;
    opacity: 0.95;
    line-height: 1.8;
    font-weight: 300;
}

.sector-header::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -150px;
    right: -150px;
}

/* ==========================================
   Professions Grid
   ========================================== */

.professions-grid {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* cards belonging to a particular sector pick up the accent colour defined by
   the page/context. the body is given a class (or the card itself can receive an
   inline variable) to update --sector-accent; this keeps the grid clean and
   avoids hard‑coded nth-child hacks. */
.profession-card {
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border-left: 4px solid var(--sector-accent);
    animation: fadeIn 0.6s ease;
}

/* utility classes for contexts where a single card needs its own colour, eg.
   survey result */
.primary-accent { --sector-accent: var(--primary-sector-color); }
.secondary-accent { --sector-accent: var(--secondary-sector-color); }
.tertiary-accent { --sector-accent: var(--tertiary-sector-color); }

.profession-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--card-shadow-hover);
}

/* highlight effect applied to a card when it's recommended */
.profession-card.highlight {
    animation: highlight 2.5s ease-out;
}

@keyframes highlight {
    0% { box-shadow: 0 0 0 0 var(--primary-color); }
    25% { box-shadow: 0 0 12px 4px var(--primary-color); }
    50% { box-shadow: 0 0 20px 8px var(--primary-color); }
    75% { box-shadow: 0 0 12px 4px var(--primary-color); }
    100% { box-shadow: 0 0 0 0 var(--primary-color); }
}

.profession-name {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 700;
}

/* survey / quiz styles */
.survey-section {
    max-width: 640px;
    margin: 60px auto;
    padding: 30px;
    background: var(--bg-alt);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.6s ease;
}
.survey-section p,
.survey-section label {
    transition: color 0.3s ease;
}
.question {
    margin-bottom: 24px;
}
.question p {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 16px;
}
.question label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}
.question input {
    margin-right: 10px;
}
button#surveyForm .card-btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
}
.survey-result {
    margin-top: 40px;
}

.survey-result .result-card {
    background: var(--bg-alt);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.6s ease;
    border-left: 4px solid var(--sector-accent);
    margin-top: 40px;
}
.survey-result h2 {
    margin-top: 0;
    font-size: 24px;
    color: var(--primary-color);
}
.survey-result p {
    font-size: 16px;
    line-height: 1.4;
}
.survey-result a.card-btn {
    margin-top: 16px;
    display: block;
    text-decoration: none;
    padding: 10px 20px;
}

.survey-result .result-card p {
    margin-bottom: 12px;
}

/* Sector Results Summary Styles */
.sector-results-summary {
    animation: fadeIn 0.6s ease;
    max-width: 700px;
    margin: 0 auto;
}

.sector-results-summary .results-heading {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 32px;
    margin-top: 0;
}

.top-sector-section {
    background: var(--bg-alt);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary-sector-color);
}

.top-sector-section .top-sector-name {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--primary-sector-color);
}

.top-sector-section .sector-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-light);
    margin: 0;
}

.progress-bars-section {
    background: var(--bg-alt);
    padding: 28px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.progress-bars-section .progress-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 24px 0;
    text-align: center;
}

.progress-bar-item {
    margin-bottom: 24px;
}

.progress-bar-item:last-child {
    margin-bottom: 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label .sector-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

.progress-label .percentage {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    min-width: 40px;
    text-align: right;
}

.progress-track {
    width: 100%;
    height: 12px;
    background-color: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.progress-fill {
    height: 100%;
    border-radius: 6px;
    width: 0%;
    animation: progressBarFill 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    background-size: 20px 20px;
    background-position: 0 0;
    transition: width 0.3s ease;
}

.progress-fill.primary {
    background-color: #10b981;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
}

.progress-fill.secondary {
    background-color: #f59e0b;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
}

.progress-fill.tertiary {
    background-color: #3b82f6;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
}

@keyframes progressBarFill {
    from {
        width: 0%;
    }
    to {
        width: var(--progress);
    }
}

/* Dark mode overrides for progress bars */
body.dark-mode .progress-track {
    background-color: #374151;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.profession-description {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.profession-future {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    text-align: center;
    margin-top: auto;
    transition: background 0.3s ease, color 0.3s ease;
}

.footer-text {
    transition: color 0.3s ease;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-text {
    color: var(--text-light);
    font-size: 14px;
}

/* ==========================================
   Animations
   ========================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Responsive Design - Tablet (768px and down)
   ========================================== */

@media (max-width: 768px) {
    /* Navbar becomes a multi-row flex column layout */
    .nav-container {
        height: auto;
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    /* Row 1: Logo and Hamburger */
    .nav-logo {
        font-size: 24px;
        margin-right: 0;
        padding: 12px 20px;
        flex-grow: 0;
        flex-shrink: 0;
    }

    /* Row 2: Search and Controls - ALWAYS VISIBLE */
    .nav-controls {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 12px 20px;
        background-color: var(--bg-alt);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        order: 2;
        width: 100%;
        position: static;
        z-index: 999;
    }

    /* Search wrapper takes up available space */
    .search-wrapper {
        flex: 1;
        min-width: 0;
        margin-left: 0;
    }

    .search-input {
        display: block;
        width: 100%;
        padding: 8px 12px;
        font-size: 14px;
        margin-right: 0;
        min-height: 38px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
    }

    .search-suggestions {
        min-width: 100%;
        left: 0;
        position: absolute;
        top: calc(100% + 4px);
    }

    /* Language switch - ALWAYS VISIBLE */
    .language-switch {
        display: flex;
        gap: 6px;
        padding: 6px 10px;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        flex-shrink: 0;
        align-items: center;
    }

    .lang-btn {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 12px;
        font-weight: 600;
        padding: 4px 6px;
        min-width: 28px;
        min-height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.3s ease;
    }

    .lang-btn.active {
        color: var(--primary-color);
    }

    .lang-separator {
        color: var(--border-color);
        font-size: 12px;
    }

    /* Theme toggle */
    .theme-toggle {
        font-size: 18px;
        padding: 6px 8px;
        min-width: 36px;
        min-height: 36px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hamburger menu button */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 8px;
        min-width: 40px;
        min-height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        justify-content: center;
        align-items: center;
        order: 3;
        flex-shrink: 0;
    }

    .hamburger span {
        width: 22px;
        height: 2px;
        background-color: var(--text-color);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Navigation menu - below controls */
    .nav-menu {
        position: static;
        width: 100%;
        flex-direction: column;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        gap: 0;
        justify-content: flex-start;
        padding: 0;
        order: 4;
        top: auto;
        left: auto;
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
        color: var(--text-color);
        font-weight: 500;
    }

    .nav-link::after {
        display: none;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .sectors-container {
        grid-template-columns: 1fr;
        margin: 40px auto;
        padding: 0 20px 60px;
    }

    .sector-title {
        font-size: 36px;
    }

    .sector-intro {
        font-size: 16px;
    }

    .professions-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Responsive Design - Mobile (480px and down)
   ========================================== */

@media (max-width: 480px) {
    /* Container layout remains the same */
    .nav-container {
        padding: 0;
    }

    .nav-logo {
        font-size: 20px;
        min-width: auto;
        padding: 10px 15px;
    }

    /* Mobile controls bar - fully visible */
    .nav-controls {
        padding: 10px 15px;
        gap: 8px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    /* Search bar takes full width when wrapped */
    .search-wrapper {
        flex: 1 1 100%;
        order: 1;
        min-width: 0;
    }

    .search-input {
        display: block;
        width: 100%;
        padding: 8px 12px;
        font-size: 13px;
        min-height: 36px;
        margin: 0;
    }

    .search-suggestions {
        min-width: 100%;
        left: 0;
    }

    /* Controls grouped together */
    .theme-toggle {
        font-size: 16px;
        min-width: 36px;
        min-height: 36px;
        padding: 6px;
        order: 2;
    }

    .language-switch {
        display: flex;
        gap: 4px;
        padding: 6px 8px;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        flex-shrink: 0;
        min-height: 36px;
        order: 2;
    }

    .lang-btn {
        font-size: 11px;
        padding: 3px 5px;
        min-width: 26px;
        min-height: 26px;
    }

    .lang-separator {
        font-size: 10px;
    }

    .hamburger {
        min-width: 36px;
        min-height: 36px;
        padding: 6px;
        gap: 4px;
        order: 3;
    }

    .hamburger span {
        width: 20px;
        height: 2px;
    }

    .theme-toggle {
        font-size: 20px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero::before,
    .hero::after {
        display: none;
    }

    .sectors-container {
        gap: 20px;
        margin: 30px auto;
    }

    .sector-card {
        padding: 30px 20px;
    }

    .card-icon {
        font-size: 48px;
    }

    .card-title {
        font-size: 20px;
    }

    .sector-header {
        padding: 40px 20px;
    }

    .sector-title {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .sector-intro {
        font-size: 14px;
    }

    .sector-header::before {
        width: 300px;
        height: 300px;
        top: -100px;
        right: -100px;
    }

    .professions-grid {
        gap: 20px;
        padding: 0 15px 40px;
        margin: 40px auto;
    }

    .profession-card {
        padding: 20px;
    }

    .profession-name {
        font-size: 18px;
    }

    .profession-description,
    .profession-future {
        font-size: 13px;
    }

    main {
        min-height: calc(100vh - 80px);
    }
}

/* ==========================================
   Accessibility
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    .navbar,
    .footer {
        display: none;
    }

    main {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}
