/* Custom styles for Python Primer Curriculum Viewer */

/* Dark mode prose styling */
.prose {
    color: #e5e7eb;
}

.prose h1 {
    color: #f3f4f6;
    font-size: 2.25em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.8888889em;
    line-height: 1.1111111;
}

.prose h2 {
    color: #f3f4f6;
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3333333;
    border-bottom: 1px solid #4b5563;
    padding-bottom: 0.5em;
}

.prose h3 {
    color: #f3f4f6;
    font-size: 1.25em;
    font-weight: 600;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.6;
}

.prose h4 {
    color: #d1d5db;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.5;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    line-height: 1.75;
}

.prose a {
    color: #C09E5A;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.prose a:hover {
    color: #9d7d47;
}

.prose strong {
    color: #f3f4f6;
    font-weight: 600;
}

.prose code {
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.875em;
    background-color: #374151;
    padding: 0.125em 0.375em;
    border-radius: 0.25rem;
}

.prose pre {
    color: #e5e7eb;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 1em;
    overflow-x: auto;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.prose pre code {
    background-color: transparent;
    color: inherit;
    font-size: 0.875em;
    padding: 0;
    border-radius: 0;
    font-weight: 400;
}

.prose blockquote {
    border-left: 4px solid #4b5563;
    padding-left: 1em;
    margin: 1.5em 0;
    color: #d1d5db;
    font-style: italic;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose li > p {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

.prose hr {
    border-color: #4b5563;
    border-top-width: 1px;
    margin-top: 3em;
    margin-bottom: 3em;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2em;
    margin-bottom: 2em;
    border-collapse: collapse;
}

.prose thead {
    border-bottom: 1px solid #4b5563;
}

.prose thead th {
    color: #f3f4f6;
    font-weight: 600;
    padding: 0.5714286em 0.8571429em;
    vertical-align: bottom;
}

.prose tbody tr {
    border-bottom: 1px solid #374151;
}

.prose tbody td {
    padding: 0.5714286em 0.8571429em;
}

.prose details {
    margin: 1.5em 0;
    padding: 1em;
    background-color: #374151;
    border-radius: 0.5rem;
    border: 1px solid #4b5563;
}

.prose details summary {
    cursor: pointer;
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 0.5em;
}

.prose details summary:hover {
    color: #93c5fd;
}

/* Navigation styles */
.nav-unit {
    margin-bottom: 1.5rem;
}

.nav-unit-title {
    font-weight: 600;
    color: #f3f4f6;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.nav-sprint {
    margin-left: 0.75rem;
    margin-bottom: 1rem;
}

.nav-sprint-title {
    font-weight: 500;
    color: #d1d5db;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-sprint-title:hover {
    color: #C09E5A;
}

.nav-sprint-title.collapsed::before {
    content: '▶';
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.nav-sprint-title.expanded::before {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.nav-modules {
    margin-left: 1rem;
}

.nav-module {
    display: block;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-module:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

.nav-module.active {
    background-color: rgba(192, 158, 90, 0.2);
    color: #C09E5A;
    font-weight: 500;
    border-left: 3px solid #C09E5A;
}

.nav-module-container {
    margin-bottom: 0.25rem;
}

.nav-module-progress {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

.nav-module-progress .bg-blue-500,
.nav-module-progress .bg-amber-400 {
    background-color: #C09E5A !important;
}

/* Mobile responsive */
@media (max-width: 1023px) {
    #sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        z-index: 50;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }
    
    #sidebar.open {
        left: 0;
    }
    
    #mobile-overlay {
        transition: opacity 0.3s ease;
    }
    
    #mobile-overlay.open {
        display: block;
        opacity: 1;
    }
    
    main {
        padding-top: 4rem;
    }
    
    #content-container {
        padding: 1rem;
    }
}

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

/* Improve focus states for accessibility */
.nav-module:focus,
.nav-sprint-title:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

/* Loading state */
#loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content container improvements */
#content-container {
    min-height: calc(100vh - 2rem);
}

/* Improve code block readability */
.prose pre {
    line-height: 1.6;
}

.prose code:not(pre code) {
    word-break: break-word;
}

/* Table improvements for dark mode */
.prose table {
    border: 1px solid #4b5563;
}

.prose tbody tr:hover {
    background-color: #374151;
}

/* Blockquote improvements */
.prose blockquote {
    background-color: #374151;
    padding: 1em 1.5em;
    border-radius: 0.5rem;
    margin: 1.5em 0;
}

/* Image improvements */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5em 0;
}

/* Horizontal rule improvements */
.prose hr {
    background-color: #4b5563;
    height: 1px;
    border: none;
}

/* Gauntlet AI Branding - Color Variables */
:root {
    --gauntlet-black: #000000;
    --gauntlet-gray: #1a1a1a;
    --gauntlet-gray-light: #2a2a2a;
    --gauntlet-white: #ffffff;
    --gauntlet-gold: #C09E5A;
    --gauntlet-gold-dark: #9d7d47;
    --gauntlet-amber: #C09E5A;
}

/* Top Navbar styles */
#top-navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.95);
    border-bottom-color: #2a2a2a;
}

#top-navbar a {
    text-decoration: none;
}

#top-navbar a:hover {
    text-decoration: none;
}

/* Gauntlet Shield Logo */
#gauntlet-logo,
img[src*="shield.png"] {
    filter: drop-shadow(0 0 4px rgba(192, 158, 90, 0.3));
}

/* Remove border radius from shield on landing page */
.landing-page img[src*="shield.png"] {
    border-radius: 0 !important;
}

/* Sidebar collapse styles */
#sidebar {
    position: relative;
    background-color: #000000;
}

#sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    overflow: visible;
    border-right: none;
    padding: 0;
}

#sidebar.collapsed > *:not(#sidebar-toggle) {
    display: none;
}

#sidebar-toggle {
    transition: all 0.3s ease;
    z-index: 50;
    background-color: #000000;
    border-color: #2a2a2a;
}

#sidebar-toggle:hover {
    background-color: #1a1a1a;
}

#sidebar.collapsed #sidebar-toggle {
    right: -3.5rem;
}

#sidebar-chevron.rotate-180 {
    transform: rotate(180deg);
}

/* Hero section styles */
.hero-section {
    background: linear-gradient(135deg, rgba(192, 158, 90, 0.05) 0%, rgba(0, 0, 0, 0.95) 100%);
    border-radius: 1rem;
    margin-bottom: 3rem;
    padding: 4rem 2rem;
    border: 1px solid rgba(192, 158, 90, 0.1);
}

.hero-section h1 {
    margin-bottom: 1.5rem;
}

.hero-section p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-section a {
    text-decoration: none !important;
    display: inline-block;
    border: none;
}

.hero-section a:hover {
    text-decoration: none !important;
}

.hero-section a:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Remove text decoration from all landing page links */
.landing-page a {
    text-decoration: none;
}

.landing-page a:hover {
    text-decoration: none;
}

/* Ensure CTA buttons look clean */
.hero-section .bg-blue-600,
.hero-section .bg-gray-700 {
    text-decoration: none;
    border: none;
    cursor: pointer;
}

/* Gauntlet AI Gold Accents - Override Tailwind classes */
.text-amber-400,
.text-amber-500,
.text-blue-400,
.text-gauntlet-gold,
[class*="text-amber"] {
    color: #C09E5A !important;
}

.bg-blue-500,
.bg-blue-600,
.bg-amber-400,
.bg-amber-500,
.bg-gauntlet-gold,
[class*="bg-amber"] {
    background-color: #C09E5A !important;
}

.hover\:bg-blue-700:hover,
.hover\:bg-amber-500:hover,
[class*="hover:bg-amber"]:hover {
    background-color: #9d7d47 !important;
}

.hover\:text-blue-400:hover,
.hover\:text-amber-400:hover,
[class*="hover:text-amber"]:hover {
    color: #C09E5A !important;
}

/* Border colors */
.border-amber-400,
[class*="border-amber"] {
    border-color: rgba(192, 158, 90, 0.2) !important;
}

.from-amber-400,
.to-amber-500 {
    --tw-gradient-from: #C09E5A;
    --tw-gradient-to: #9d7d47;
}

/* Mobile navbar adjustments */
@media (max-width: 767px) {
    #top-navbar .hidden.md\\:flex {
        display: none;
    }
    
    #top-navbar {
        padding: 0 1rem;
    }
    
    #sidebar-toggle {
        display: none;
    }
}

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

/* Professional spacing and typography improvements */
.landing-page h2 {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.landing-page h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Code block improvements */
.hljs {
    background: #1f2937 !important;
    padding: 1.5em;
    border-radius: 0.5rem;
}

/* Objectives checklist styling */
.objectives-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    background-color: #1a1a1a;
    border-color: rgba(192, 158, 90, 0.2);
}

.objectives-list {
    list-style: none;
    padding-left: 0;
}

.objective-item {
    transition: background-color 0.2s;
}

.objective-checkbox {
    flex-shrink: 0;
    accent-color: #C09E5A;
}

.objective-item label {
    user-select: none;
    transition: all 0.2s;
}

/* Landing page styles */
.landing-page {
    animation: fadeIn 0.3s ease-in;
}

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

.landing-page .module-link {
    text-decoration: none;
    transition: color 0.2s;
}

.landing-page .module-link:hover {
    text-decoration: underline;
}

