﻿html { font-size: 14px; position: relative; min-height: 100%; }
@media (min-width: 768px) { html { font-size: 14px; } }
body { margin-bottom: 60px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif; }

.navbar-brand { color: #0066cc !important; font-size: 1.1rem; }
.navbar-light .navbar-nav .nav-link { color: #333; padding: 0.5rem 0.8rem; font-size: 0.9rem; }
.navbar-light .navbar-nav .nav-link:hover { color: #0066cc; }
.dropdown-menu {
    font-size: 0.85rem;
    background-color: #f1f4f8;
    border-color: #cfd8e3;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}
.dropdown-item { padding: 0.4rem 1rem; }

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #dfe7f1;
}

.dropdown-submenu-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dropdown-submenu-link {
    color: inherit;
    text-decoration: none;
    flex: 1;
}

.dropdown-submenu-link:hover {
    color: inherit;
    text-decoration: none;
}

.submenu-toggle {
    border: 0;
    background: transparent;
    padding: 0;
    color: #6c757d;
    line-height: 1;
}

.dropdown-submenu.show > .dropdown-submenu-row,
.dropdown-submenu-row:hover {
    background-color: #dfe7f1;
}

.dropdown-submenu > .dropdown-menu {
    display: none;
}

.dropdown-submenu.show > .dropdown-menu {
    display: block;
}

.dropdown-menu .menu-dropdown-nested > .submenu-panel {
    position: static;
    float: none;
    min-width: 0;
    width: calc(100% - 1.25rem);
    margin: 0.35rem 0.75rem 0.5rem 0.5rem;
    border: 1px solid #dfe3e8;
    box-shadow: none;
    background: #e7edf4;
    border-radius: 0.5rem;
    padding: 0.35rem 0;
    max-height: 60vh;
    overflow-y: auto;
}

.dropdown-menu .submenu-panel .dropdown-item,
.dropdown-menu .submenu-panel .dropdown-submenu-row {
    padding-left: 1rem;
    padding-right: 1rem;
}

.dropdown-menu .submenu-panel .dropdown-item {
    white-space: normal;
}

.dropdown-menu .submenu-panel .dropdown-submenu-row {
    margin: 0;
}

.dropdown-submenu.show > .dropdown-submenu-row .submenu-toggle {
    transform: rotate(90deg);
}

.bg-primary { background-color: #0066cc !important; }

.sidebar-left .card, .sidebar-right .card { border: 1px solid #ddd; border-radius: 3px; font-size: 0.85rem; }
.sidebar-left .card-header, .sidebar-right .card-header { background-color: #f8f9fa; border-bottom: 1px solid #ddd; }
.sidebar-left h6, .sidebar-right h6 { font-size: 0.85rem; font-weight: 600; }
.list-group-item { border-left: none; border-right: none; padding: 0.4rem 0.6rem; font-size: 0.8rem; }
.list-group-item:first-child { border-top: none; }
.list-group-item:last-child { border-bottom: none; }
.list-group-item:hover { background-color: #f8f9fa; }

.card { transition: box-shadow 0.2s; border: 1px solid #e0e0e0; }
.card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.card-title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card-text { font-size: 0.9rem; }

.post-content { line-height: 1.7; font-size: 1rem; }
.post-content h2 { margin-top: 1.5rem; margin-bottom: 0.8rem; font-size: 1.4rem; }
.post-content p { margin-bottom: 0.8rem; }
.post-content img { max-width: 100%; height: auto; margin: 1rem 0; }

.comments-section,
.comment-form-section {
    margin-top: 2rem;
}

.comment-card {
    border: 1px solid #e1e4e8;
}

.comment-content {
    line-height: 1.6;
}

.blog-post-article {
    max-width: 100%;
}

.page-article {
    width: 100%;
}

.page-article-wide {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.page-article-with-sidebars {
    max-width: 100%;
}

.page-content .pdf-embed,
.post-content .pdf-embed {
    width: 100%;
    max-width: 940px;
    margin-top: 1rem;
}

.page-content .pdf-embed-frame,
.post-content .pdf-embed-frame {
    display: block;
    width: 100%;
    aspect-ratio: 210 / 297;
    height: auto;
    min-height: 0;
    border: 1px solid #cfcfcf;
    background: #fff;
}

@media (max-width: 991.98px) {
    .page-article-wide {
        max-width: 100%;
    }

    .page-content .pdf-embed,
    .post-content .pdf-embed {
        max-width: 100%;
    }

    .page-content .pdf-embed-frame,
    .post-content .pdf-embed-frame {
        aspect-ratio: 210 / 297;
    }
}

.pagination { margin-top: 1.5rem; font-size: 0.9rem; }
.page-link { color: #0066cc; padding: 0.4rem 0.7rem; }
.page-item.active .page-link { background-color: #0066cc; border-color: #0066cc; }

.badge { font-size: 0.7rem; font-weight: normal; }

.btn-sm { font-size: 0.8rem; padding: 0.3rem 0.6rem; }
.btn-primary { background-color: #0066cc; border-color: #0066cc; }

footer { background-color: #f8f9fa; font-size: 0.85rem; }

.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
