:root {
    --primary-color: #F38020;
    --primary-dark: #d16d14;
    --secondary-color: #2d3748;
    --background: #f7fafc;
    --card-bg: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-module {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-module {
    background: var(--primary-color);
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-module:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-module:disabled {
    background: var(--border-color);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.hero-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.hero-card p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

/* Sections */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-alt {
    background: var(--card-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Training Grid */
.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.training-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.training-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.training-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.training-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.training-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-soon {
    background: #fef3c7;
    color: #92400e;
}

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

/* Glossary */
.glossary-container {
    max-width: 900px;
    margin: 0 auto;
}

.glossary-search {
    position: relative;
    margin-bottom: 2rem;
}

.glossary-search input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
}

.glossary-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(243, 128, 32, 0.1);
}

.glossary-search svg {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.glossary-grid {
    display: grid;
    gap: 1rem;
}

.glossary-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.glossary-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.glossary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.glossary-term-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.glossary-term {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.glossary-chevron {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.glossary-item.expanded .glossary-chevron {
    transform: rotate(180deg);
}

.glossary-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.glossary-definition {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    margin-top: 0;
}

.glossary-item.expanded .glossary-definition {
    max-height: 500px;
    opacity: 1;
    margin-top: 0.75rem;
}

/* Resources */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.resource-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
}

.resource-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.resource-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resource-list li a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.resource-list li a:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.resource-name {
    font-weight: 600;
    color: var(--text-primary);
}

.resource-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Chat Container */
.chat-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 400px;
    max-height: 600px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 2000;
    border: 1px solid var(--border-color);
}

.chat-container.active {
    display: flex;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius) var(--radius) 0 0;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    max-height: 450px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    animation: messageSlide 0.3s ease;
}

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

.message-avatar {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-content {
    background: var(--background);
    padding: 1rem;
    border-radius: 8px;
    flex: 1;
}

.message-content p {
    margin: 0 0 0.5rem 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-content li {
    margin: 0.25rem 0;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
}

.user-message {
    flex-direction: row-reverse;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.chat-input-container input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
}

.chat-input-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-send {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send:hover {
    background: var(--primary-dark);
}

/* Footer */
.main-footer {
    background: var(--secondary-color);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-cards {
        grid-template-columns: 1fr;
    }

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

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

    .chat-container {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 1rem;
    }

    .section {
        padding: 2rem 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}
