/* BIP Style - Modern, Clean, Minimalist Design */
/* Mobile-first, Accessible, Responsive */

:root {
    --bip-primary: #b10303;
    --bip-primary-dark: #8a0202;
    --bip-primary-light: #d90707;
    --bip-text: #222222;
    --bip-text-light: #666666;
    --bip-bg: #f5f5f5;
    --bip-bg-light: #ffffff;
    --bip-border: #e6e6e6;
    --bip-shadow: rgba(0, 0, 0, 0.08);
    --bip-active-bg: #ffeaea;
    --bip-font: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--bip-font);
    background: #fff;
    color: var(--bip-text);
    line-height: 1.6;
    font-size: 16px;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bip-primary);
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Visually hidden class (Bootstrap 5 compatible) */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Bootstrap overrides for BIP */
.bip-header-red {
    background: linear-gradient(to bottom, #d01919 0%, #960707 100%) !important;
    color: #fff;
    border-bottom: 3px solid #a00;
}

.text-danger {
    color: var(--bip-primary) !important;
}

.btn-light:hover {
    background-color: var(--bip-active-bg) !important;
    color: var(--bip-primary-dark) !important;
}

/* Header - Full Width */
header.bip-header-red {
    border-radius: 0;
    margin: 0;
    width: 100%;
}

/* Breadcrumb - Full Width */
nav.bg-light {
    width: 100%;
    margin: 0;
}

.bip-logo {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.bip-branding {
    flex: 1;
    min-width: 200px;
}

.bip-branding__subtitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 400;
}

.bip-branding__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

/* Search form in header */
header.bip-header-red .form-control {
    border: none;
    border-radius: 0;
    font-size: 14px;
}

header.bip-header-red .form-control:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-color: transparent;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

header.bip-header-red .btn {
    border-radius: 0;
}

/* Sidebar Menu - No Card */
.bip-sidebar-menu {
    border: 1px solid var(--bip-border);
    margin-bottom: 20px;
}

.bip-sidebar-menu:last-child {
    margin-bottom: 0;
}

.bip-sidebar-header {
    padding: 12px 16px;
    background: linear-gradient(to bottom, #d01919 0%, #960707 100%) !important;
    color: #fff;
    border-bottom: 3px solid #a00;
}

.bip-sidebar-header h3,
.bip-sidebar-header .h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bip-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
}

.bip-sidebar-list li {
    border-bottom: 1px solid var(--bip-border);
}

.bip-sidebar-list li:last-child {
    border-bottom: none;
}

.bip-sidebar-list li.active {
    background-color: var(--bip-active-bg);
}

.bip-sidebar-list a {
    display: block;
    padding: 12px 16px;
    color: var(--bip-text);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    font-size: 14px;
}

.bip-sidebar-list li.active a {
    color: var(--bip-primary);
    font-weight: 600;
}

.bip-sidebar-list a:hover,
.bip-sidebar-list a:focus {
    background-color: var(--bip-active-bg);
    color: var(--bip-primary);
    text-decoration: none;
}

.bip-sidebar-list a:focus {
    outline: 2px solid var(--bip-primary);
    outline-offset: -2px;
}

/* Article Header */
.bip-article-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bip-primary);
}

.bip-article-title {
    margin: 0;

    line-height: 1.3;
    flex: 1;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #c00;
}

.bip-article-meta {
    flex-shrink: 0;
}

.bip-date {
    font-size: 14px;
    color: var(--bip-text);
    white-space: nowrap;
}

.bip-article-meta .btn-link {
    color: var(--bip-text) !important;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.bip-article-meta .btn-link:hover,
.bip-article-meta .btn-link:focus {
    opacity: 1;
    color: var(--bip-primary) !important;
}

.bip-article-meta svg {
    display: block;
}

.bip-category-header {
    margin-bottom: 24px;

}

.bip-category-header p {
    margin: 0;
    color: var(--bip-text-light);
    font-size: 14px;
}

.bip-article h2 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--bip-text);
}

.bip-article h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--bip-text);
}

.bip-article p {
    margin-bottom: 16px;
}

.bip-article a {
    color: var(--bip-primary);
    text-decoration: underline;
}

.bip-article a:hover,
.bip-article a:focus {
    color: var(--bip-primary-dark);
    text-decoration: none;
}

.bip-meta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bip-text-light);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bip-border);
}

/* Post list */
.bip-post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bip-post-item h2 a {
    color: #990808;
    text-decoration: none;
}

.bip-post-item h2 a:hover,
.bip-post-item h2 a:focus {
    color: #990808;
    text-decoration: underline;
}

.bip-post-tile {
    border: 1px solid var(--bip-border);
    padding: 20px;
    background: #fafafa;
    border-radius: 0;
    transition: box-shadow 0.2s;
}

.bip-post-tile:hover {
    box-shadow: 0 2px 8px var(--bip-shadow);
}

.bip-post-tile h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.bip-post-tile h2 a {
    color: var(--bip-text);
    text-decoration: none;
}

.bip-post-tile h2 a:hover,
.bip-post-tile h2 a:focus {
    color: var(--bip-primary);
    text-decoration: underline;
}

.bip-link {
    color: var(--bip-primary);
    font-weight: 600;
    text-decoration: none;
}

.bip-link:hover,
.bip-link:focus {
    color: var(--bip-primary-dark);
    text-decoration: underline;
}

.bip-back-link {
    margin-top: 32px;
}

/* Footer */
footer.bg-light {
    border-top: 1px solid var(--bip-border);
}

footer.bg-light strong {
    color: var(--bip-primary);
}

footer.bg-light a {
    color: var(--bip-text);
    text-decoration: none;
}

footer.bg-light a:hover,
footer.bg-light a:focus {
    color: var(--bip-primary);
    text-decoration: underline;
}

/* Responsive - Tablet and up */
@media (min-width: 768px) {
    .bip-logo {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }

    .bip-branding__title {
        font-size: 18px;
    }

    .bip-article-title {
        font-size: 18px;
    }
}

/* Responsive - Desktop */
@media (min-width: 992px) {
    .bip-logo {
        width: 96px;
        height: 96px;
        font-size: 32px;
    }

    .bip-branding__title {
        font-size: 19px;
    }

    .bip-article-title {
        font-size: 32px;
    }
}

/* Responsive - Mobile adjustments */
@media (max-width: 767px) {
    .bip-article-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .bip-article-meta {
        margin-top: 12px;
        align-self: flex-end;
    }
}

/* Editor content styles */
.bip-article__content.ck-content,
.bip-article__content {
    line-height: 1.8;
}

.bip-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.bip-article__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    overflow-x: auto;
    display: block;
}

.bip-article__content table th,
.bip-article__content table td {
    padding: 12px;
    border: 1px solid var(--bip-border);
    text-align: left;
}

.bip-article__content table th {
    background: #f9f9f9;
    font-weight: 600;
}

.bip-article__content ul,
.bip-article__content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.bip-article__content blockquote {
    border-left: 4px solid var(--bip-primary);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--bip-text-light);
}

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

/* Print styles */
@media print {
    header.bip-header-red,
    nav.bg-light,
    aside,
    footer.bg-light,
    .bip-sidebar-header,
    .bip-article-meta {
        display: none;
    }
}

/* Accessibility improvements */
#main-content *:focus {
    outline: 2px solid var(--bip-primary);
    outline-offset: 2px;
}

#main-content a:focus,
.bip-sidebar-list a:focus {
    outline: 2px solid var(--bip-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bip-border: #000000;
        --bip-shadow: rgba(0, 0, 0, 0.3);
    }

    .bip-sidebar-menu {
        border: 2px solid var(--bip-border);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Content Header */
.bip-content-header {
    margin-bottom: 16px;
    color: #666;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.bip-content-date {
    font-size: 14px;
    color: var(--bip-text);
}

.bip-content-icon {
    color: var(--bip-text);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
}

.bip-content-icon:hover,
.bip-content-icon:focus {
    opacity: 1;
    color: var(--bip-primary);
}

/* Metadata Panel */
.bip-metadata-panel {
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid var(--bip-border);
}

.bip-metadata-content {
    padding: 20px;
}

.bip-metadata-panel h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--bip-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--bip-primary);
}

.bip-metadata-panel .table {
    margin-bottom: 0;
    font-size: 14px;
}

.bip-metadata-panel .table th {
    font-weight: 600;
    background: #f9f9f9;
}

.bip-metadata-panel .table-bordered th,
.bip-metadata-panel .table-bordered td {
    border: 1px solid var(--bip-border);
    padding: 8px 12px;
}

.bip-metadata-panel .table-striped tbody tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

