/* Help Home Page Styles */
h2.small {
    font-size: 1.3em !important;
}

.help-home .hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 86, 165, 0.55) 0%, rgba(0, 48, 105, 0.6) 100%), url('/images/banner-lg.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 70px 30px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.help-home .hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 40, 85, 0.35), rgba(253, 181, 21, 0.25));
}

.help-home .hero-section>* {
    position: relative;
    z-index: 1;
}

.help-home .hero-section h1 {
    font-size: 3rem;
    margin-bottom: 18px;
    line-height: 1.1;
}

.help-home .hero-section p {
    font-size: 1.3em;
    margin-bottom: 35px;
    opacity: 0.92;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 999px;
    color: var(--berkeley-gray-medium);
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.search-box input:focus {
    outline: none;
    border-color: var(--california-gold);
    box-shadow: 0 0 0 4px rgba(253, 181, 21, 0.3);
}

.search-box button {
    border-radius: 999px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 20px rgba(0, 86, 165, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Category Cards */
.help-categories {
    margin-bottom: 50px;
    display: flex;
    flex-wrap: wrap;
}

.help-categories .col-md-6 {
    float: none;
    flex: 1 1 320px;
    max-width: 100%;
}

.category-card {
    background: white;
    border: 1px solid var(--berkeley-blue-light);
    padding: 14px 28px;
    margin-bottom: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    animation: fadeUp 0.6s ease both;
}

.category-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.category-card h2 {
    color: var(--berkeley-blue);
    font-size: 1.5em;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 55px;
}

.category-card h2 .glyphicon {
    background: var(--berkeley-blue-light);
    color: var(--berkeley-blue);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.category-card p {
    color: #5c6c7a;
    margin-bottom: 0;
    line-height: 1.6;
}

.category-card-double {
    grid-column: span 2;
}

.help-links {
    list-style: none;
    padding: 0;
}

.help-links li {
    margin-bottom: 4px;
}

.help-links a {
    color: #304052;
    text-decoration: none;
    padding: 6px 0;
    display: block;
    border-left: 3px solid transparent;
    padding-left: 12px;
    transition: all 0.2s ease;
}

.help-links a:hover {
    color: var(--berkeley-blue);
    border-left-color: var(--berkeley-blue);
    background-color: var(--berkeley-blue-light);
    text-decoration: none;
}

.help-links a:focus-visible {
    outline: 3px solid rgba(253, 181, 21, 0.7);
    outline-offset: 2px;
    color: var(--berkeley-blue-dark);
    border-left-color: var(--berkeley-blue);
}

/* Quick Access Section */
.help-quick-access {
    background: #f8f9fa;
    padding: 30px;
    margin-top: 40px;
}

.help-quick-access h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.quick-link {
    text-align: center;
}

.quick-link h4 {
    color: #0066cc;
    margin-bottom: 15px;
}

.quick-link ul {
    list-style: none;
    padding: 0;
}

.quick-link li {
    margin-bottom: 8px;
}

/* Sidebar Navigation */
.help-sidebar {
    background: #f8f9fa;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    position: sticky;
    top: 10px;
    /* max-height: calc(100vh - 40px); */
    font-size: 0.95em;
    /* Add scroll if content is too long */
}

/* Make nav container expand */
.help-nav-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.help-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    border-bottom: 1px solid #ddd;
    /* Takes up available space */
}

.help-nav>li {
    margin-bottom: 5px;
}

.help-nav>li>a {
    display: block;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.help-nav>li>a:hover {
    background-color: var(--berkeley-blue-light);
    color: #333;
    text-decoration: none;
}

.help-nav>li>a.active {
    background-color: var(--berkeley-blue);
    color: white;
    text-decoration: none;
}

.help-nav>li>a i {
    margin-right: 8px;
    width: 16px;
}

/* Navigation Sections */
.nav-section>.nav-toggle {
    display: block;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.nav-toggle:hover {
    background-color: #e9ecef;
    text-decoration: none;
    color: #333;
}

.nav-toggle:focus {
    outline: none;
    text-decoration: none;
    color: #333;
}

.nav-toggle.active-parent {
    pointer-events: none;
    cursor: default;
}

/* Chevron icon using CSS */
.nav-toggle:after {
    content: "\e114";
    font-family: "Glyphicons Halflings";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    font-size: 12px;
    line-height: 1;
}

.nav-toggle.collapsed:after {
    transform: translateY(-50%) rotate(-90deg);
    /* Right arrow when collapsed */
}

.nav-submenu {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.nav-submenu.collapsing {
    transition: height 0.35s ease;
}

.nav-submenu li {
    margin-bottom: 4px;
}

.nav-submenu li a {
    display: block;
    margin-left: 30px;
    padding: 5px 10px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95em;
}

.nav-submenu li a:hover {
    background-color: var(--berkeley-blue-light);
    color: var(--berkeley-blue);
    text-decoration: none;
}

.nav-submenu li a.active {
    background-color: var(--berkeley-blue);
    color: white;
    text-decoration: none;
    font-weight: bold;
}

/* Ensure proper spacing */
.help-nav>li {
    margin-bottom: 2px;
}

.nav-section {
    margin-bottom: 5px;
}

.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links li {
    margin-bottom: 5px;
}

.quick-links a {
    display: block;
    padding: 5px 10px;
    color: #666;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.quick-links a:hover {
    background-color: #e9ecef;
    color: #333;
    text-decoration: none;
}

.quick-links i {
    margin-right: 5px;
    width: 14px;
}

/* Content Area */
.help-content {
    flex: 1;
    line-height: 1.65;
}

.help-main {
    position: relative;
}

.help-sidebar__toc {
    margin-top: 24px;
}

.help-sidebar__toc .help-article-toc {
    margin: 0;
}

.eyebrow-text {
    display: inline-block;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--berkeley-purple-medium);
    margin-bottom: 14px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 12px;
    z-index: 1000;
    padding: 10px 16px;
    background-color: var(--berkeley-blue, #002676);
    color: var(--berkeley-white, #ffffff);
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 12px;
}

.help-content a {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.help-content a:hover,
.help-content a:focus {
    color: var(--berkeley-blue);
    border-color: var(--berkeley-blue-light);
    text-decoration: none;
}

.help-content a:focus-visible {
    outline: 3px solid rgba(253, 181, 21, 0.85);
    outline-offset: 3px;
}

.help-article__header {
    border-bottom: 1px solid var(--berkeley-gray-medium);
    padding: 15px 25px;
    margin-bottom: 25px;
}

.help-article__title {
    margin: 0 0 12px;
    color: var(--berkeley-blue-dark, #010133);
}

.help-article__intro {
    margin: 0;
    color: #4c5d6f;
}

.help-article__meta {
    margin-top: 14px;
    color: #5a6772;
    font-size: 0.9em;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.help-article__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.help-article__body {
    display: grid;
}

.help-article-toc ul {
    list-style: none;
    padding: 0 6px;
    margin: 12px 0 0;
    display: grid;
    gap: 6px;
}

.help-article-toc ul ul {
    margin: 3px 0 0 16px;
    display: grid;
    gap: 3px;
}

.help-article-toc a {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #304052;
}

.help-article-toc a:hover,
.help-article-toc a:focus {
    color: var(--berkeley-blue-dark);
}

.help-article-section {
    padding: 15px 25px;
}

.help-article-section h3 {
    color: var(--berkeley-blue-medium);
}

.help-article-section h4 {
    font-weight: 600;
    color: #1f3f5b;
}

.help-article-section h4+p {
    margin-top: 0.5rem;
}

.help-article-section ol,
.help-article-section ul {
    margin: 0 0 20px 20px;
}

.help-article-figure {
    margin: 24px 0;
    text-align: center;
}

.help-article-figure img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.help-article-figure figcaption {
    margin-top: 10px;
    font-size: 0.9em;
    color: #556372;
    font-style: italic;
}

.help-article time {
    font-variant-numeric: tabular-nums;
}

.help-article code {
    background-color: var(--berkeley-purple-medium);
    color: var(--berkeley-white);
}

.help-article code.table {
    background-color: var(--berkeley-blue-light);
    border: 1px solid var(--berkeley-blue-medium);
    color: var(--berkeley-blue-dark);
}

.tip-note {
    margin: 10px 0 20px;
    padding: 10px;
    border-left: 4px solid var(--berkeley-green-medium);
    background: #f4f9ff;
}

.tip-note p {
    margin: 0;
}

.tip-note .note,
.tip-note .tip {
    font-weight: 700;
    margin-right: 8px;
    color: var(--berkeley-green-dark);
    text-transform: uppercase;
}

@media (min-width: 992px) {
    .help-sidebar__toc {
        position: sticky;
        top: 130px;
    }
}

/* Add these styles to make sidebar full height */
.help-page {
    display: flex !important;
    flex-wrap: wrap;
    /* min-height: calc(100vh - 120px); */
    margin-top: 20px;
}

.help-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.help-category-grid .category-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Responsive Design */
@media (max-width: 768px) {
    .help-sidebar {
        margin-bottom: 20px;
        min-height: auto;
    }

    .help-content {
        padding: 15px;
    }

    .help-page-content {
        padding: 20px;
    }

    .help-home .hero-section {
        padding: 50px 24px;
        border-radius: 0;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .search-box button {
        width: 100%;
        border-radius: 12px;
    }

    .search-box input {
        border-radius: 12px;
    }

    .category-card-double {
        grid-column: auto;
    }
}

/* Responsive - disable flex on mobile */
@media (max-width: 991px) {
    .container .row {
        display: block;
    }

    .container .row .col-md-3,
    .container .row .col-md-9 {
        display: block;
    }

    .help-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 20px;
        min-height: auto;
        display: block;
    }

    .help-nav-container {
        display: block;
        overflow-y: visible;
    }

    .help-page {
        display: block !important;
    }

    .help-page .col-md-3,
    .help-page .col-md-9 {
        display: block;
    }
}

/* Print Styles */
@media print {
    .help-sidebar {
        display: none;
    }

    .help-content {
        padding: 0;
    }

    .help-page-content {
        box-shadow: none;
        border: none;
    }
}

.help-support-card {
    background-color: var(--berkeley-gray-light);
    border: 1px solid var(--berkeley-gray-light);
    border-top: 4px solid var(--california-gold);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 36px 30px;
    gap: 16px;
}

.help-support-card .btn {
    padding: 12px 28px;
    font-weight: 600;
}

.category-card:focus-within {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Search Results */
.help-search-results {
    padding: 32px;
}

.search-results-header h1 {
    margin-bottom: 10px;
}

.search-results-header p {
    color: #4c5d6f;
    margin-bottom: 25px;
}

.search-results-form {
    margin-bottom: 35px;
}

.search-results-meta {
    margin-bottom: 25px;
    color: #4c5d6f;
}

.search-results-meta strong {
    color: var(--berkeley-blue);
}

.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.search-results-item {
    padding: 22px 26px;
    border: 1px solid var(--berkeley-gray-medium);
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-results-item:hover {
    transform: translateY(-3px);
    border-color: var(--berkeley-blue-medium);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.search-results-item h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.3em;
}

.search-results-item h3 a {
    color: var(--berkeley-blue);
    text-decoration: none;
}

.search-results-item h3 a:hover,
.search-results-item h3 a:focus {
    text-decoration: underline;
}

.search-results-category {
    font-size: 0.9em;
    color: var(--berkeley-blue-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.search-results-description {
    margin-bottom: 14px;
    color: #4c5d6f;
}

.search-results-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-results-tags .tag {
    background-color: var(--berkeley-blue-light);
    color: var(--berkeley-blue-dark);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.search-empty-state {
    background: #ffffff;
    border: 1px solid var(--berkeley-gray-light);
    padding: 28px;
    margin-top: 30px;
}

.search-empty-state h2 {
    margin-top: 0;
    margin-bottom: 16px;
}

.search-empty-state--fallback {
    background: transparent;
    border: none;
    padding: 0;
}

.search-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.search-category-card {
    background: #ffffff;
    border: 1px solid var(--berkeley-gray-light);
    padding: 20px 22px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.search-category-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--berkeley-blue);
}

.search-category-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-category-card li {
    margin-bottom: 8px;
}

.search-category-card a {
    color: #304052;
    text-decoration: none;
}

.search-category-card a:hover,
.search-category-card a:focus {
    color: var(--berkeley-blue);
    text-decoration: underline;
}

.help-search-results mark {
    background-color: var(--berkeley-gold-light);
    color: var(--berkeley-blue-dark);
    padding: 0 4px;
    border-radius: 3px;
}

@media (max-width: 992px) {
    .help-search-results {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .help-search-page {
        padding: 20px 0 40px;
    }

    .help-search-results {
        padding: 22px 18px;
    }

    .search-results-item {
        padding: 18px 20px;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {

    .category-card,
    .help-links a,
    .search-box button,
    .help-home .hero-section {
        transition-duration: 0.001ms !important;
        animation: none !important;
    }
}