/* assets/css/custom.css */
:root {
    /* Primary Colors - Adjust these hex codes to your preference */
    --color-primary: #2c3e50;    /* Dark blue/grey (for headers, accents) */
    --color-secondary: #3498db;  /* Bright blue (for links, highlights) */
    --color-accent: #1abc9c;     /* Teal (for hover effects, buttons) */
    --color-background: #f8f9fa; /* Very light grey (for page background) */
    --color-header-back: #333;   /* Dark grey (for header background) */
    --color-text: #333333;       /* Dark grey (for main text) */
    --color-light: #ecf0f1;      /* Light grey (for sidebars, boxes) */
}





/* ===== BASE STYLES ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ===== HEADER STYLES ===== */
.site-header {
    background-color: var(--color-header-back);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.site-header .wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.site-title {
    color: white !important;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    margin: 0;
}

.site-title:hover {
    color: var(--color-accent) !important;
}

.site-nav .trigger {
    display: flex;
    gap: 1.5rem;
}

.page-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.page-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

/* ===== LAYOUT STRUCTURE ===== */
.page-content {
    min-height: calc(100vh - 200px);
}

.page-content .wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2.5rem;
    padding: 0 20px;
}

/* ===== SIDEBAR (for default layout) ===== */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid var(--color-light);
}

/* Navigation sidebar (default layout) */
.sidebar-nav .sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-nav .sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-nav .sidebar-section h3 {
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 0.5rem;
    font-weight: 600;
}

.sidebar-nav .sidebar-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar-nav .sidebar-section li {
    margin-bottom: 0.1rem;
}

.sidebar-nav .sidebar-section li:last-child {
    margin-bottom: 0;
}

.sidebar-nav .sidebar-section a {
    color: var(--color-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.sidebar-nav .sidebar-section a img {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.sidebar-nav .sidebar-section a:hover {
    color: var(--color-secondary);
    border-left-color: var(--color-secondary);
    background-color: rgba(52, 152, 219, 0.05);
}

/* ===== TOC SIDEBAR (for page-with-toc layout) ===== */
.sidebar-toc {
    padding: 1.5rem;
}

.sidebar-toc h3 {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sidebar-toc .toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar-toc .toc-h2 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.sidebar-toc .toc-h3 {
    margin-bottom: 0.25rem;
    font-weight: normal;
    font-size: 0.95rem;
    padding-left: 1rem;
}

.sidebar-toc a {
    color: var(--color-text);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.sidebar-toc a:hover {
    color: var(--color-secondary);
    background-color: rgba(52, 152, 219, 0.05);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--color-light);
}

.main-content h1,
.main-content h2,
.main-content h3 {
    color: var(--color-primary);
    margin-top: 0;
}

.main-content h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.main-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.main-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.main-content a {
    color: var(--color-secondary);
    font-weight: 500;
    text-decoration: none;
    display: inline;
}

.main-content a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.main-content p {
    margin-bottom: 1rem;
}

.main-content ul,
.main-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

/* ===== IN-PAGE TOC (for main content area) ===== */
.page-toc {
    background-color: rgba(236, 240, 241, 0.8);
    border-left: 4px solid var(--color-secondary);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.page-toc h3 {
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 0.5rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: var(--color-light);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    border-top: 1px solid #ddd;
    color: var(--color-text);
}

.site-footer .wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-footer a {
    color: var(--color-secondary);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}


#toc {
    list-style: none;
    padding: 0;
}

#toc li {
    margin: 5px 0;
}

#toc a {
    color: #069;
    text-decoration: none;
}

#toc a:hover {
    text-decoration: underline;
}


/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .page-content .wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1rem auto;
    }

    .sidebar {
        position: static;
        max-height: none;
        top: auto;
    }

    .site-nav .trigger {
        flex-direction: column;
        gap: 0.5rem;
        background-color: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1rem;
        display: none;
    }

    .nav-trigger:checked ~ .trigger {
        display: flex;
    }

    .menu-icon {
        display: block;
        cursor: pointer;
        font-size: 1.5rem;
        color: white;
    }

    .nav-trigger {
        display: none;
    }

    .main-content {
        padding: 1.5rem;
    }

    .site-header .wrapper {
        flex-wrap: wrap;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .sidebar,
    .site-footer {
        display: none;
    }

    .page-content .wrapper {
        display: block;
        margin: 0;
        padding: 0;
    }

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


/* --- Dropdown Navigation --- */

.navbar {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 8px 12px;
  color: inherit; /* use theme text color */
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1;
}

.dropdown-content a {
  color: #333;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f0f0f0;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  font-weight: bold;
}