/* Pragmatist Path - Cyan/Teal Theme */

:root {
    /* Main pragmatist colors */
    --pragmatist-cyan: #00BCD4;
    --pragmatist-teal: #00ACC1;
    --pragmatist-dark-cyan: #0097A7;

    /* Base colors */
    --primary-dark: #1a1a1a;
    --secondary-dark: #2d2d2d;
    --light-gray: #4a4a4a;
    --text-gray: #b0b0b0;

    /* Status colors */
    --status-green: #4caf50;
    --status-yellow: #FFC107;
    --status-orange: #FF9800;
    --status-red: #F44336;

    /* Accent colors */
    --accent-cyan: #00BCD4;
    --accent-green: #4caf50;
    --text-light: #e0e0e0;
    --text-dim: #b3b3b3; /* 4.6:1 contrast ratio - WCAG AA compliant */

    /* Borders and shadows */
    --border-color: rgba(0, 188, 212, 0.3);
    --glow-cyan: 0 0 20px rgba(0, 188, 212, 0.5);

    /* Compatibility aliases */
    --bright-orange: #00BCD4;
    --bright-yellow: #00ACC1;
}

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

/* ===== ACCESSIBILITY ENHANCEMENTS (WCAG 2.1 AA) ===== */

/* WCAG 2.5.5: Touch Target Size */
button, a, [role="button"], .nav-btn, .module-cta {
    min-height: 44px;
    min-width: 44px;
}

p a, li a {
    min-height: auto;
    min-width: auto;
    padding: 0.25rem 0;
}

/* WCAG 2.4.7: Focus Visible */
*:focus-visible {
    outline: 3px solid var(--pragmatist-cyan, #00BCD4);
    outline-offset: 2px;
}

button:focus-visible, a:focus-visible, [role="button"]:focus-visible {
    outline: 3px solid var(--pragmatist-cyan, #00BCD4);
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.2);
}

/* WCAG 2.3.3: Animation from Interactions */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* WCAG 1.4.10: Reflow */
@media (max-width: 360px) {
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 1rem;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
}

/* Gradient Background Utilities */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--pragmatist-cyan), var(--pragmatist-teal));
}

.bg-gradient-dark {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
}

.bg-gradient-hero {
    background: linear-gradient(135deg,
        var(--primary-dark) 0%,
        var(--secondary-dark) 50%,
        var(--secondary-dark) 100%
    );
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    border-bottom: 3px solid var(--pragmatist-cyan);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '🔨';
    position: absolute;
    font-size: 20rem;
    color: var(--pragmatist-cyan);
    opacity: 0.05;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(15deg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) rotate(15deg); }
    50% { transform: translate(-50%, -55%) rotate(20deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--pragmatist-cyan);
    font-weight: 800;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Module Header */
.module-header {
    background: var(--secondary-dark);
    border-bottom: 3px solid var(--pragmatist-cyan);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--pragmatist-cyan);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--pragmatist-teal);
    text-decoration: underline;
}

.module-title h1 {
    font-size: 2.5rem;
    color: var(--pragmatist-cyan);
    margin-bottom: 0.5rem;
}

/* Content Sections */
.content-section {
    background: var(--secondary-dark);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.content-section h2 {
    color: var(--pragmatist-cyan);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.content-section h3 {
    color: var(--pragmatist-cyan);
    margin: 1.5rem 0 0.75rem;
    font-size: 1.25rem;
}

.content-section p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Highlight Box */
.highlight-box {
    background: rgba(0, 188, 212, 0.1);
    border-left: 4px solid var(--pragmatist-cyan);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.highlight-box.success {
    border-left-color: var(--status-green);
    background: linear-gradient(135deg,
        rgba(0, 255, 0, 0.1),
        rgba(0, 200, 0, 0.1)
    );
}

.highlight-box.warning {
    border-left-color: var(--status-yellow);
    background: linear-gradient(135deg,
        rgba(255, 255, 0, 0.1),
        rgba(255, 200, 0, 0.1)
    );
}

.highlight-box.danger {
    border-left-color: var(--status-red);
    background: linear-gradient(135deg,
        rgba(255, 0, 0, 0.1),
        rgba(200, 0, 0, 0.1)
    );
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--pragmatist-cyan);
    color: #fff;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
    background: var(--pragmatist-teal);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--medium-gray);
    color: var(--text-light);
    border: 2px solid var(--light-gray);
}

.btn-secondary:hover {
    border-color: var(--pragmatist-cyan);
    box-shadow: var(--glow-cyan);
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.green {
    background: var(--status-green);
    box-shadow: 0 0 10px var(--status-green);
}

.status-indicator.yellow {
    background: var(--status-yellow);
    box-shadow: 0 0 10px var(--status-yellow);
}

.status-indicator.orange {
    background: var(--status-orange);
    box-shadow: 0 0 10px var(--status-orange);
}

.status-indicator.red {
    background: var(--status-red);
    box-shadow: 0 0 10px var(--status-red);
}

/* Quiz Styles */
.quiz-container {
    background: var(--dark-gray);
    border: 2px solid var(--medium-gray);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
}

.quiz-question {
    margin-bottom: 2rem;
}

.quiz-question h3 {
    color: var(--pragmatist-cyan);
    margin-bottom: 1rem;
}

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

.quiz-option {
    background: var(--secondary-dark);
    border: 2px solid var(--light-gray);
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover {
    border-color: var(--pragmatist-cyan);
    transform: translateX(5px);
}

.quiz-option.correct {
    border-color: var(--status-green);
    background: rgba(0, 255, 0, 0.1);
    animation: correctAnswer 0.5s;
}

.quiz-option.incorrect {
    border-color: var(--status-red);
    background: rgba(255, 0, 0, 0.1);
    animation: incorrectAnswer 0.5s;
}

@keyframes correctAnswer {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 20px var(--status-green); }
}

@keyframes incorrectAnswer {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Module Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.module-card {
    background: var(--secondary-dark);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s;
    cursor: pointer;
}

.module-card:hover:not(.locked) {
    border-color: var(--pragmatist-cyan);
    transform: translateY(-5px);
    box-shadow: var(--glow-cyan);
}

.module-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.module-card.completed {
    border-color: var(--status-green);
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    border: 3px solid var(--pragmatist-cyan);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    z-index: 1000;
    animation: achievementPop 3s forwards;
    box-shadow: 0 0 50px rgba(0, 188, 212, 0.5);
}

@keyframes achievementPop {
    0% { transform: translate(-50%, -50%) scale(0); }
    20% { transform: translate(-50%, -50%) scale(1.1); }
    30% { transform: translate(-50%, -50%) scale(1); }
    90% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}

.achievement-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.achievement-title {
    font-size: 2rem;
    color: var(--pragmatist-cyan);
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1rem;
    }
}
