/* Reset and Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --sidebar-width: 280px;
    --sidebar-bg: #111827;
    --sidebar-text: #f9fafb;
    --sidebar-hover: #1f2937;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    gap: 0.5rem;
}

.sidebar-header h1::before {
    content: '🚀';
    flex-shrink: 0;
}

.download-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.download-btn:hover {
    background-color: var(--primary-light);
}

.download-btn:disabled {
    background-color: #4b5563;
    cursor: not-allowed;
}

@media print {
    .download-btn {
        display: none !important;
    }
}

.nav-list {
    list-style: none;
    padding: 1rem 0;
}

.nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    border-left-color: var(--primary-light);
}

.nav-link.active {
    background-color: var(--sidebar-hover);
    border-left-color: var(--primary-color);
    color: var(--primary-light);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    background-color: var(--sidebar-bg);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Main Content */
.content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

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

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    opacity: 0.95;
}

/* Section Styles */
.section {
    padding: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.section-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.section:last-of-type {
    border-bottom: none;
}

.section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.section-intro {
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

/* Task Cards */
.task {
    background-color: var(--bg-color);
    border-radius: 0;
    padding: 1.5rem 1.5rem 1.5rem 2rem;
    margin-bottom: 1.25rem;
    border: none;
    border-left: 4px solid #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.task h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.task h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.task h3 a:hover {
    text-decoration: underline;
}

.task p {
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

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

.task ul, .task ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.task li {
    margin-bottom: 0.5rem;
}

.task a {
    color: var(--primary-color);
    text-decoration: none;
}

.task a:hover {
    text-decoration: underline;
}

.task em {
    font-style: italic;
}

.task strong {
    font-weight: 600;
    color: var(--text-color);
}

/* Two Column List */
.two-column-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.two-column-list ul {
    margin-left: 0.5rem;
    margin-bottom: 0;
    padding-left: 0;
}

@media (max-width: 768px) {
    .two-column-list {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    padding: 2rem 3rem;
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

.footer p {
    margin-bottom: 0.5rem;
}

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

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .content {
        margin-left: 0;
    }

    .hero {
        padding: 5rem 2rem 3rem;
    }

    .section {
        padding: 2rem;
    }

    .footer {
        padding: 2rem;
    }
}

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

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

    .section h2 {
        font-size: 1.5rem;
    }

    .task {
        padding: 1.25rem;
    }

    .services-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 1.5rem 2rem;
    }

    .section {
        padding: 1.5rem;
    }

    .task h3 {
        font-size: 1rem;
    }

    .services-list {
        grid-template-columns: 1fr;
    }
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
}

.sidebar-overlay.active {
    display: block;
}

/* Print Styles */
@page {
    margin: 1cm;
    margin-top: 1.5cm;
    margin-bottom: 1.5cm;
}

@media print {
    .sidebar,
    .mobile-menu-toggle,
    .sidebar-overlay,
    .section-image {
        display: none !important;
    }

    body {
        font-size: 11pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .content {
        margin-left: 0;
    }

    .hero {
        background: #2563eb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 2rem;
    }

    .hero h1 {
        font-size: 24pt;
    }

    .section {
        padding: 1.5rem 0;
        break-before: auto;
    }

    .section h2 {
        font-size: 16pt;
        border-bottom: 2px solid #2563eb;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .task {
        break-inside: avoid;
        page-break-inside: avoid;
        border-left: 3px solid #6b7280 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
        box-shadow: none;
    }

    .task h3 {
        font-size: 11pt;
    }

    .task p, .task li {
        font-size: 10pt;
    }

    .footer {
        padding: 1rem 0;
    }

    a {
        color: #2563eb;
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 8pt;
        color: #666;
    }
}

/* Smooth scroll offset for fixed sidebar */
.section {
    scroll-margin-top: 1rem;
}

/* Animation for section visibility */
.section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Focus styles for accessibility */
.nav-link:focus,
.task a:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: var(--primary-light);
    color: #fff;
}
