
:root {
    /* Color Variables */
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #eaefff;
    --secondary: #f8f9fa;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    --dark: #343a40;
    --light: #f8f9fa;
    --white: #ffffff;
    --text-dark: #343a40;
    --text-light: #6c757d;
    --border-color: #e1e5eb;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f8fe;
    color: var(--text-dark);
    line-height: 1.6;
}

body.dark-mode {
    background-color: #121212;
    color: #e1e1e1;
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

body.dark-mode header {
    background-color: #1f2737;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

body.dark-mode nav a {
    color: #e1e1e1;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after, nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

nav a.active {
    color: var(--primary);
}

.header-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    font-size: 0.9rem;
}

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

body.dark-mode .btn-light {
    background-color: #2a2f45;
    color: #e1e1e1;
    border-color: #3a3f58;
}

.btn-light:hover {
    background-color: var(--light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

body.dark-mode .btn-light:hover {
    background-color: #323660;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 1.5rem;
}

body.dark-mode .mobile-menu-toggle {
    color: #e1e1e1;
}

/* Hero Section */
.guidelines-hero {
    background: linear-gradient(135deg, #4361ee 0%, #3a56d4 100%);
    color: white;
    padding: 8rem 2rem 5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.guidelines-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.guidelines-hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    padding: 3rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Guidelines Navigation */
.guidelines-nav {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    position: sticky;
    top: 80px;
    z-index: 100;
}

body.dark-mode .guidelines-nav {
    background-color: #1f2737;
}

.guidelines-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0 1rem;
    scrollbar-width: none; /* Firefox */
}

.guidelines-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.guidelines-tab {
    padding: 1.25rem 1.5rem;
    white-space: nowrap;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

body.dark-mode .guidelines-tab {
    color: #a0a0a0;
}

.guidelines-tab:hover {
    color: var(--primary);
}

.guidelines-tab.active {
    color: var(--primary);
}

.guidelines-tab::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.guidelines-tab.active::after {
    transform: scaleX(1);
}

/* Grid Layout for Content and Sidebar */
.guidelines-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .guidelines-content-wrapper {
        grid-template-columns: 3fr 1fr;
    }
}

/* Guidelines Content */
.guidelines-content {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

body.dark-mode .guidelines-content {
    background-color: #1f2737;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.content-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

body.dark-mode .content-title {
    color: #e1e1e1;
}

.content-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

body.dark-mode .content-subtitle {
    color: #a0a0a0;
}

.last-updated {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

body.dark-mode .last-updated {
    background-color: rgba(67, 97, 238, 0.2);
}

.section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

body.dark-mode .section-title {
    color: #e1e1e1;
}

.section p {
    margin-bottom: 1rem;
}

body.dark-mode .section p {
    color: #b0b0b0;
}

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

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

body.dark-mode .section li {
    color: #b0b0b0;
}

/* Highlight Boxes */
.highlight-box {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
}

body.dark-mode .highlight-box {
    background-color: rgba(67, 97, 238, 0.1);
}

.highlight-box h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.highlight-box p {
    margin-bottom: 0;
}

/* Warning Boxes */
.warning-box {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--danger);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
}

.warning-box h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--danger);
}

.warning-box p, .warning-box ul, .warning-box ol {
    margin-bottom: 0;
}

/* Tables */
.guideline-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    overflow-x: auto;
    display: block;
}

@media (min-width: 768px) {
    .guideline-table {
        display: table;
    }
}

.guideline-table th, .guideline-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .guideline-table th, 
body.dark-mode .guideline-table td {
    border-color: #3a3f58;
}

.guideline-table th {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

body.dark-mode .guideline-table th {
    background-color: rgba(67, 97, 238, 0.2);
    color: #e1e1e1;
}

.guideline-table tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

body.dark-mode .guideline-table tr:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

/* Policy Acceptance Form */
.policy-form {
    background-color: var(--secondary);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
}

body.dark-mode .policy-form {
    background-color: #252942;
}

.policy-form-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

body.dark-mode .policy-form-title {
    color: #e1e1e1;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
}

.form-check-label {
    font-size: 0.95rem;
}

body.dark-mode .form-check-label {
    color: #b0b0b0;
}

/* Version History */
.version-history {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

body.dark-mode .version-history {
    border-color: #3a3f58;
}

.version-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

body.dark-mode .version-title {
    color: #e1e1e1;
}

.version-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    overflow-x: auto;
    display: block;
}

@media (min-width: 768px) {
    .version-table {
        display: table;
    }
}

.version-table th, .version-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .version-table th, 
body.dark-mode .version-table td {
    border-color: #3a3f58;
}

.version-table th {
    background-color: var(--secondary);
    font-weight: 600;
}

body.dark-mode .version-table th {
    background-color: #252942;
    color: #e1e1e1;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: none;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    position: sticky;
    top: 150px;
    align-self: flex-start;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .sidebar-nav {
        display: block;
    }
}

body.dark-mode .sidebar-nav {
    background-color: #1f2737;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .sidebar-title {
    color: #e1e1e1;
    border-color: #3a3f58;
}

.sidebar-links {
    list-style: none;
}

.sidebar-link {
    margin-bottom: 0.75rem;
}

.sidebar-link a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    display: block;
    padding: 0.5rem 0;
}

.sidebar-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

body.dark-mode .sidebar-link a {
    color: #4361ee;
}

body.dark-mode .sidebar-link a:hover {
    color: #5a77ff;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo-icon {
    width: 40px;
    height: 40px;
    background-color: white;
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.footer-about {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-icon:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-link {
    margin-bottom: 0.8rem;
}

.footer-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link a:hover {
    color: white;
    padding-left: 5px;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.contact-icon {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Dark Mode Toggle and Print Button */
.control-buttons {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 999;
}

.round-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    border: none;
}

.round-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

body.dark-mode .round-button {
    background-color: #3a3f58;
    color: #e1e1e1;
}

/* Print Specific Styles */
@media print {
    header, footer, .guidelines-nav, .sidebar-nav, .policy-form, .control-buttons {
        display: none !important;
    }

    .main-content {
        padding: 0;
        margin: 0;
    }

    .guidelines-content {
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .tab-content {
        display: block !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .content-title {
        page-break-before: always;
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.75rem 1.5rem;
    }

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

    nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    body.dark-mode nav {
        background-color: #1f2737;
    }

    nav.active {
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    .guidelines-tab {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }

    .guidelines-content {
        padding: 1.5rem;
    }

    .content-title {
        font-size: 1.5rem;
    }

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

    .control-buttons {
        bottom: 1rem;
        right: 1rem;
    }

    .round-button {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
