/* ==========================================================================
   SKRIVANEK LANGUAGE TESTS - COMMON STYLES
   ========================================================================== */

/* COLOR PALETTE */
:root {
    --primary-color: #4E172E;       /* Aubergine */
    --secondary-color: #FF643B;      /* Orange */
    --color-orange: #FF643B;
    --color-aubergine: #4E172E;
    --color-warm-white: #FAF6F1;
    --success-color: #FF643B;
    --warning-color: #FF643B;
    --danger-color: #FF643B;
    --light-bg: #FAF6F1;
    --border-color: #FF643B;
    --text-primary: #4E172E;
    --text-secondary: #4E172E;
    --gradient-bg: #4E172E;
    --card-shadow: 0 4px 6px rgba(78, 23, 46, 0.1);
    --hover-shadow: 0 8px 16px rgba(255, 100, 59, 0.15);

    /* Halftone background colors */
    --paper: #FAF6F1;
    --dot: #FF643B;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'STIX Two Text', serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'STIX Two Text', serif;
    font-weight: 700;
}

/* ==========================================================================
   HALFTONE BACKGROUND
   ========================================================================== */

#halftone {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   COMPANY HEADER
   ========================================================================== */

.company-header {
    border-bottom: 2px solid var(--secondary-color);
    background: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

.home-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.home-icon svg {
    width: 20px;
    height: 20px;
}

.company-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    font-family: 'STIX Two Text', serif;
    transition: color 0.3s ease;
}

.company-logo:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

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

/* Bootstrap nav-tabs styling with brand colors */
.nav-tabs .nav-link {
    color: var(--color-aubergine);
    border: 1px solid transparent;
    border-radius: 0.375rem 0.375rem 0 0;
}

.nav-tabs .nav-link:hover {
    color: var(--color-orange);
    border-color: #e9ecef #e9ecef #dee2e6;
}

.nav-tabs .nav-link.active {
    color: var(--color-orange);
    background-color: #fff;
    border-color: var(--color-orange) var(--color-orange) #fff;
    font-weight: 600;
}

.nav-tabs {
    border-bottom: 1px solid var(--color-orange);
}

/* Header navigation links only - not Bootstrap nav-tabs */
.company-nav .nav-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    font-family: 'STIX Two Text', serif;
    transition: color 0.3s ease;
    position: relative;
}

.company-nav .nav-link:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.company-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.company-nav .nav-link:hover::after {
    width: 100%;
}

/* ==========================================================================
   TEST PAGE HEADER SECTION
   ========================================================================== */

.header-section {
    background: var(--gradient-bg);
    color: white;
    border-bottom: 3px solid var(--secondary-color);
}

.header-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.header-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.timer-display {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.timer-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.timer-time {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'STIX Two Text', serif;
    color: var(--secondary-color);
}

/* ==========================================================================
   WELCOME SCREEN
   ========================================================================== */

.welcome-section {
    padding: 4rem 2rem;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    position: relative;
}

.welcome-container {
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(78, 23, 46, 0.15);
    max-width: 900px;
    width: 100%;
}

.welcome-container h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.welcome-container p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.instructions-list {
    background: white;
    border-left: 4px solid var(--secondary-color);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.instructions-list h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.instructions-list ol {
    margin-left: 1.5rem;
}

.instructions-list li {
    margin: 0.75rem 0;
    color: var(--text-primary);
}

.instructions-list li strong {
    color: var(--secondary-color);
}

.test-meaning {
    background: linear-gradient(135deg, rgba(78, 23, 46, 0.05) 0%, rgba(255, 100, 59, 0.05) 100%);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.test-meaning h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.test-meaning p {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.8;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'STIX Two Text', serif;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 100, 59, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

#start-btn {
    background: var(--primary-color);
    color: white;
    padding: 15px 40px;
    font-size: 1.2rem;
    margin-top: 2rem;
}

#start-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 100, 59, 0.3);
}

/* ==========================================================================
   QUESTION SECTION
   ========================================================================== */

.question-section {
    padding: 2rem;
    display: none;
    max-width: 900px;
    margin: 0 auto;
}

.question-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--secondary-color);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(78, 23, 46, 0.1);
}

.question-number {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.question-text {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.question-text strong {
    color: var(--secondary-color);
}

/* ==========================================================================
   OPTIONS
   ========================================================================== */

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    padding: 1.2rem;
    background: var(--light-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.option:hover {
    transform: translateX(5px);
    box-shadow: var(--hover-shadow);
    border-color: var(--secondary-color);
}

.option.selected {
    background: linear-gradient(135deg, rgba(255, 100, 59, 0.1) 0%, rgba(78, 23, 46, 0.05) 100%);
    border-color: var(--secondary-color);
    font-weight: 500;
}

/* ==========================================================================
   NAVIGATION BUTTONS
   ========================================================================== */

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(78, 23, 46, 0.1);
}

/* ==========================================================================
   RESULTS SECTION
   ========================================================================== */

.results-section {
    padding: 3rem 2rem;
    display: none;
    max-width: 900px;
    margin: 0 auto;
}

.results-container {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(78, 23, 46, 0.15);
}

.results-container h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.result-summary {
    background: linear-gradient(135deg, rgba(78, 23, 46, 0.05) 0%, rgba(255, 100, 59, 0.05) 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.score-display {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    margin: 1rem 0;
}

.level-display {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem auto;
    max-width: 300px;
}

.level-description {
    background: white;
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.detailed-results {
    margin-top: 3rem;
}

.detailed-results h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.result-item {
    background: white;
    border-left: 4px solid transparent;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.result-item.correct {
    border-left-color: var(--success-color);
    background: rgba(255, 100, 59, 0.05);
}

.result-item.incorrect {
    border-left-color: var(--danger-color);
    background: rgba(78, 23, 46, 0.05);
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(78, 23, 46, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transition: width 0.3s;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .company-nav {
        justify-content: center;
        margin-top: 1rem;
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .company-nav .nav-link {
        font-size: 0.9rem;
    }

    .company-logo {
        font-size: 1.3rem;
    }

    .header-title {
        font-size: 1.8rem;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .timer-time {
        font-size: 1.5rem;
    }

    .welcome-container {
        padding: 2rem;
    }

    .welcome-container h1 {
        font-size: 2rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .option {
        padding: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .company-nav {
        gap: 1rem;
    }

    .company-nav .nav-link {
        font-size: 0.85rem;
    }

    .header-title {
        font-size: 1.5rem;
    }

    .welcome-container h1 {
        font-size: 1.5rem;
    }

    .instructions-list {
        padding: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}