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

:root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --accent-color: #FFD700;
    --yellow-primary: #FFCC00;
    --yellow-light: #FFF4CC;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --border-color: #e5e7eb;
    --highlight-bg: #FFF9E6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Container Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--yellow-primary);
    padding: 0.75rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--yellow-primary);
}

.header-content h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
    letter-spacing: -0.025em;
}

.header-subtitle {
    font-size: 0.8rem;
    opacity: 0.95;
    font-weight: 300;
    color: var(--yellow-light);
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 65px;
    width: 300px;
    height: calc(100vh - 65px);
    background: var(--background);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    z-index: 50;
    transition: var(--transition);
    border-right: 3px solid var(--yellow-primary);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 600;
}

.close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--primary-color);
}

.nav-list {
    list-style: none;
}

.nav-list li {
    margin-bottom: 0.5rem;
}

.nav-list a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-list a:hover {
    background-color: var(--yellow-light);
    color: var(--primary-color);
    transform: translateX(5px);
    border-left: 3px solid var(--yellow-primary);
}

.nav-list a.active {
    background-color: var(--primary-color);
    color: var(--yellow-primary);
    font-weight: 500;
    border-left: 4px solid var(--yellow-primary);
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 80px;
    left: 1rem;
    z-index: 60;
    background: var(--primary-color);
    border: 2px solid var(--yellow-primary);
    border-radius: 0.5rem;
    width: 50px;
    height: 50px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--yellow-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Main Content */
.content {
    margin-left: 320px;
    padding: 2rem;
    background: var(--background);
    min-height: calc(100vh - 65px);
    box-shadow: var(--shadow-md);
}

/* Section Styles */
.section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--background);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.section:hover {
    box-shadow: var(--shadow-md);
}

.section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--yellow-primary);
    font-weight: 700;
}

.section h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.section p {
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.section ul,
.section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.section li {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    line-height: 1.7;
}

.section li strong {
    color: var(--primary-color);
}

/* Info Box */
.info-box {
    background: var(--yellow-light);
    border-left: 4px solid var(--yellow-primary);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    border: 1px solid var(--yellow-primary);
}

.info-box p {
    margin-bottom: 0.5rem;
}

.info-box a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: underline;
}

/* Highlight Section */
.highlight-section {
    background: linear-gradient(135deg, var(--yellow-light) 0%, #fffaeb 100%);
    border: 2px solid var(--yellow-primary);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.1);
}

/* Important Notice */
.important-notice {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
}

.important-notice h4 {
    color: #b45309;
    margin-top: 0;
}

/* Rights Grid */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.right-item {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.right-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--yellow-primary);
    background: var(--yellow-light);
}

.right-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.right-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Definition Grid */
.definition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.definition-item {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.definition-item:hover {
    background: var(--yellow-light);
    border-left-color: var(--yellow-primary);
}

.definition-item h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.definition-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    background: var(--background-alt);
    border-top: 2px solid var(--border-color);
    border-radius: 0.75rem;
}

.footer p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-contact {
    font-weight: 500;
    color: var(--text-dark);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: var(--yellow-primary);
    border: 2px solid var(--yellow-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.3);
}

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

.sidebar::-webkit-scrollbar-track {
    background: var(--background-alt);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--yellow-primary);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    .menu-toggle {
        display: flex;
    }

    .close-btn {
        display: block;
    }

    .header-content h1 {
        font-size: 1.5rem;
    }

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

    .rights-grid,
    .definition-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.65rem 1rem;
    }

    .header-content h1 {
        font-size: 1.3rem;
    }

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

    .content {
        padding: 1rem;
    }

    .section {
        padding: 1.5rem;
    }

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

    .section h3 {
        font-size: 1.25rem;
    }

    .sidebar {
        width: 280px;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0.75rem;
    }

    .header-content h1 {
        font-size: 1.1rem;
    }

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

    .section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .sidebar {
        width: 250px;
    }

    .info-box,
    .important-notice {
        padding: 1rem;
    }

    .rights-grid,
    .definition-grid {
        gap: 1rem;
    }

    .menu-toggle {
        width: 45px;
        height: 45px;
    }

    .menu-toggle span {
        width: 22px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .menu-toggle,
    .back-to-top {
        display: none;
    }

    .content {
        margin-left: 0;
    }

    .header {
        position: static;
        box-shadow: none;
    }

    .section {
        page-break-inside: avoid;
        box-shadow: none;
    }
}
