/* help_center.css */

html {
    scroll-behavior: smooth;
}

/* Help Center Container */
.help-center-container {
    display: flex;
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
    background-color: #E0E3FF;
    font-family: 'Exo 2', sans-serif;
    scroll-behavior: auto;
}

/* Left Sidebar */
.help-sidebar {
    width: 250px;
    background-color: #ffffff;
    color: #2c3e50;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    top: 41px;
    left: 0;
    z-index: 100;
    border-right: 1px solid #d1d5db;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
}

.sidebar-header {
    padding: 0 20px 15px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

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

.sidebar-nav li {
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-nav .nav-link {
    display: block;
    padding: 12px 20px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: #E0E3FF;
    color: #3b82f6;
    text-decoration: none;
    border-right: 3px solid #3b82f6;
}

.sidebar-footer {
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.archive-link {
    color: #dc2626;
    font-size: 12px;
    text-decoration: none;
    line-height: 1.4;
}

.archive-link:hover {
    text-decoration: underline;
    color: #b91c1c;
}

/* Main Content Area */
.help-main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px 30px;
    background-color: #E0E3FF;
    min-height: calc(100vh - 41px);
}

/* Search Container */
.search-container {
    margin-bottom: 30px;
    text-align: center;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 45px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: #334155;
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #4f46e5;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #4338ca;
}

/* Content Sections */
.content-sections {
    margin-right: 300px;
    padding-right: 0;
}

/* Welcome Section Styles */
.welcome-intro {
    background: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    border-left: 4px solid #4f46e5;
}

.welcome-intro p {
    font-size: 16px;
    line-height: 1.6;
    color: #334155;
    margin: 0;
}

.welcome-image-placeholder {
    text-align: center;
    margin-bottom: 40px;
}

.image-placeholder {
    background: #f8fafc;
    color: #64748b;
    padding: 60px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 18px;
    border: 2px dashed #cbd5e1;
}

.important-pages-section {
    margin-top: 40px;
}

.important-pages-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 30px;
    text-align: center;
}

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.page-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.page-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #4f46e5;
}

/* Fixed image container styling */
.page-image {
    height: 160px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
    position: relative;
    padding: 0;
}

/* Style for actual images */
.page-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    display: block; 
    border: none;
}

.page-image img:not([src]),
.page-image img[src=""] {
    display: none;
}

/* Fallback for broken images or placeholders */
.page-image img:not([src]),
.page-image img[src=""],
.page-image .image-placeholder {
    background: #f1f5f9;
    color: #64748b;
    padding: 20px;
    font-size: 14px;
    border: none;
    border-radius: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
}

.page-content {
    padding: 20px;
    text-align: center;
}

.page-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.page-content p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.page-link {
    display: inline-block;
    background: #4f46e5;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #4338ca;
    text-decoration: none;
    color: white;
    transform: translateX(2px);
}

/* Optional overlay effect for enhanced interactivity */
.page-image-overlay {
    position: relative;
}

.page-image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(79, 70, 229, 0.8), rgba(99, 102, 241, 0.6));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.page-card:hover .page-image-overlay::before {
    opacity: 1;
}

.page-image-overlay .overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 16px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-card:hover .page-image-overlay .overlay-text {
    opacity: 1;
}

.content-section {
    display: none;
    scroll-margin-top: 100vh;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* Announcements */
.announcement-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.announcement-item h3 {
    background: #f8f9fa;
    padding: 15px 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #e9ecef;
}

.announcement-content {
    padding: 20px;
}

.announcement-content p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.read-more-btn:hover {
    background: #5a6268;
}

.future-renovations {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* Help Columns Layout */
.help-columns {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.help-column {
    flex: 1;
}

.help-column h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #4f46e5;
}

.help-items {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.help-item {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.help-item:last-of-type {
    border-bottom: none;
}

.help-item:hover {
    background-color: #f8fafc;
}

.help-item h4 {
    padding: 15px 20px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: color 0.2s ease;
}

.help-item h4:hover {
    color: #4f46e5;
}

.help-answer {
    padding: 0 20px 20px;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: none;
}

.help-answer.show {
    display: block;
}

.help-answer p {
    color: #64748b;
    line-height: 1.6;
    margin: 15px 0 0;
    font-size: 13px;
}

.see-all {
    padding: 15px 20px;
    margin: 0;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.see-all a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.see-all a:hover {
    text-decoration: underline;
}

/* Help Notes */
.help-note {
    margin-top: 30px;
    padding: 20px;
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 12px;
}

.help-note p {
    margin: 5px 0;
    font-size: 13px;
    color: #92400e;
}

/* Right Sidebar TOC */
.right-sidebar {
    position: fixed;
    right: 20px;
    top: 140px;
    width: 250px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.toc-header {
    padding: 15px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
}

.toc-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.toc-content {
    padding: 15px 20px;
}

.toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-content li {
    margin-bottom: 8px;
}

.toc-content a {
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    display: block;
    padding: 5px 0;
    border-left: 3px solid transparent;
    padding-left: 10px;
    transition: all 0.2s ease;
}

.toc-content a:hover,
.toc-content a.active {
    color: #4f46e5;
    border-left-color: #4f46e5;
    text-decoration: none;
}

/* All Questions Section */
.all-questions-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.questions-search {
    margin-bottom: 20px;
}

.questions-search-input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.questions-search-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.questions-categories {
    margin-bottom: 25px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.filter-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.question-item {
    background: white;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid transparent;
}

.question-item:hover {
    background: #f8fafc;
    border-left-color: #4f46e5;
    transform: translateX(2px);
}

.question-item h4 {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin: 0;
    flex: 1;
}

.question-category {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 10px;
    white-space: nowrap;
}

.question-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 500;
    white-space: nowrap;
}

.question-status.answered {
    background: #dcfce7;
    color: #166534;
}

.question-status.in-progress {
    background: #fef3c7;
    color: #92400e;
}

.question-status.unanswered {
    background: #fee2e2;
    color: #991b1b;
}

.no-questions-found {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

/* Hover animations and transitions */
.help-item::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    transition: left 0.5s ease;
}

.help-item:hover::before {
    left: 100%;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f1f5f9;
    border-top: 2px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar styling */
.help-sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar {
    width: 6px;
}

.help-sidebar::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.help-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.right-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.help-sidebar::-webkit-scrollbar-thumb:hover,
.right-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus states for accessibility */
.nav-link:focus,
.help-item h4:focus,
.search-input:focus,
.search-btn:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* Keyboard focus for All Questions */
.question-item.keyboard-focused {
    outline: 2px solid #4f46e5;
    outline-offset: -2px;
    background-color: #f0f9ff !important;
}

/* Mobile Sidebar Toggle */
.mobile-sidebar-toggle {
    position: fixed;
    top: 50px;
    left: 10px;
    z-index: 1001;
    background: #4f46e5;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Smooth transitions for responsive changes */
.content-sections,
.help-main-content,
.right-sidebar {
    transition: margin 0.3s ease, padding 0.3s ease;
}

/* Enhanced mobile responsiveness */
@media (max-width: 1200px) {
    .right-sidebar {
        display: none !important;
    }
    
    .content-sections {
        margin-right: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .help-center-container {
        flex-direction: column;
    }
    
    .help-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        top: 0;
        left: 0;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: none;
    }
    
    .help-main-content {
        margin-left: 0 !important;
        padding: 15px;
    }
    
    .content-sections {
        margin-right: 0 !important;
        padding-right: 0 !important;
    }
    
    .help-columns {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        margin: 0 15px;
    }
    
    .pages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .welcome-intro {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .mobile-sidebar-toggle {
        display: block;
    }
    
    /* Page image mobile improvements */
    .page-image {
        height: 120px;
        padding: 8px;
    }
    
    .page-image-alt {
        min-height: 100px;
        padding: 10px;
    }
    
    .page-image-alt img {
        max-height: 80px;
    }
    
    /* All Questions mobile improvements */
    .category-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .question-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 15px;
    }
    
    .question-category,
    .question-status {
        margin-left: 0;
    }
    
    .questions-search-input {
        font-size: 16px; 
    }
}

@media (max-width: 480px) {
    .help-main-content {
        padding: 10px;
    }
    
    .content-section h2 {
        font-size: 24px;
    }
    
    .help-column h3 {
        font-size: 18px;
    }
    
    .announcement-item h3 {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .announcement-content {
        padding: 15px;
    }
    
    .welcome-intro {
        padding: 15px;
    }
    
    .welcome-intro p {
        font-size: 14px;
    }
    
    .important-pages-section h3 {
        font-size: 20px;
    }
    
    .page-content {
        padding: 15px;
    }
    
    .pages-grid {
        gap: 15px;
    }
    
    /* Page image very small screen adjustments */
    .page-image {
        height: 100px;
        padding: 5px;
    }
    
    .page-image-alt {
        min-height: 80px;
        padding: 8px;
    }
    
    .page-image-alt img {
        max-height: 60px;
    }
    
    /* All Questions very small screen adjustments */
    .all-questions-container {
        padding: 15px;
    }
    
    .filter-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .question-item h4 {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .question-category,
    .question-status {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* Landscape mobile improvements */
@media (max-width: 768px) and (orientation: landscape) {
    .help-sidebar {
        display: none;
    }
    
    .help-main-content {
        margin-left: 0 !important;
        padding-top: 10px;
    }
    
    .mobile-sidebar-toggle {
        display: block !important;
    }
}

/* Print styles */
@media print {
    .help-sidebar,
    .right-sidebar,
    .search-container,
    .mobile-sidebar-toggle {
        display: none !important;
    }
    
    .help-main-content {
        margin-left: 0 !important;
        padding: 0;
        background: white;
    }
    
    .content-sections {
        margin-right: 0 !important;
    }
    
    .help-answer {
        display: block !important;
    }
    
    .help-center-container {
        background: white;
    }
}

/* Bottom Sheet Navigation */
.help-sections-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 8px;
}

.help-sections-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.4);
}

.help-sections-btn i {
    font-size: 16px;
}

/* Bottom Sheet Overlay */
.help-bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.help-bottom-sheet.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.help-bottom-sheet.active .bottom-sheet-content {
    transform: translateY(0);
}

.bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.bottom-sheet-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.close-sheet {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-sheet:hover {
    background: #e2e8f0;
    color: #334155;
}

.sections-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
}

.section-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 80px;
    justify-content: center;
}

.section-card:hover {
    background: #f8fafc;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-card.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.section-card i {
    font-size: 20px;
    color: #4f46e5;
    margin-bottom: 4px;
}

.section-card.active i {
    color: white;
}

.section-card span {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    line-height: 1.2;
}

.section-card.active span {
    color: white;
}

/* Show only on mobile */
@media (max-width: 768px) {
    .help-sidebar {
        display: none !important;
    }
    
    .help-sections-btn {
        display: flex;
    }
    
    .help-main-content {
        margin-left: 0 !important;
        padding-bottom: 80px; /* Space for floating button */
    }
}

/* Very small screens - single column */
@media (max-width: 480px) {
    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }
    
    .section-card {
        padding: 12px;
        min-height: 70px;
    }
    
    .section-card i {
        font-size: 18px;
    }
    
    .section-card span {
        font-size: 12px;
    }
}

/* Add current section indicator */
.current-section-indicator {
    background: #f0f9ff;
    color: #1e40af;
    border: 1px solid #3b82f6;
    margin: 10px 20px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    font-weight: 500;
}

/* Animation for section cards */
.section-card {
    animation: slideUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.content-section{
    padding: 30px 0 !important;
}

.section-card:nth-child(1) { animation-delay: 0.1s; }
.section-card:nth-child(2) { animation-delay: 0.15s; }
.section-card:nth-child(3) { animation-delay: 0.2s; }
.section-card:nth-child(4) { animation-delay: 0.25s; }
.section-card:nth-child(5) { animation-delay: 0.3s; }
.section-card:nth-child(6) { animation-delay: 0.35s; }
.section-card:nth-child(7) { animation-delay: 0.4s; }
.section-card:nth-child(8) { animation-delay: 0.45s; }

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

/* Breadcrumb Navigation */
.help-breadcrumb {
    background: transparent;
    padding: 8px 16px;
    margin-bottom: 15px;
    margin-right: 320px; 
    border-radius: 6px;
    position: absolute;
    top: 41px;
    z-index: 90;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    flex-wrap: nowrap; 
    overflow: hidden;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-item:hover {
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
}

.breadcrumb-item.current {
    color: #4f46e5;
    font-weight: 600;
    cursor: default;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-item.current:hover {
    background: #f0f9ff;
    color: #4f46e5;
}

.breadcrumb-separator {
    color: #656f7a;
    font-size: 10px;
    user-select: none;
    flex-shrink: 0;
}

.breadcrumb-icon {
    font-size: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}

.breadcrumb-item.current .breadcrumb-icon {
    color: #4f46e5;
}

/* Subsection styling */
.breadcrumb-nav .subsection {
    color: #7c3aed;
    background: #f3f4f6;
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 12px;
}

.breadcrumb-item:nth-child(1) { animation-delay: 0.05s; }
.breadcrumb-item:nth-child(3) { animation-delay: 0.1s; }
.breadcrumb-item:nth-child(5) { animation-delay: 0.15s; }

@keyframes breadcrumbFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.breadcrumb-item.updating {
    animation: breadcrumbPulse 0.2s ease;
}

@keyframes breadcrumbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Breadcrumb tooltip */
.breadcrumb-item[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.breadcrumb-item[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid transparent;
    border-top-color: #1f2937;
    margin-bottom: 1px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .help-breadcrumb {
        margin-right: 0; /* Remove right margin when TOC is hidden */
    }
}

@media (max-width: 768px) {
    .help-breadcrumb {
        padding: 6px 12px;
        margin-bottom: 10px;
        margin-right: 0;
        position: sticky;
        top: 0;
    }
    
    .breadcrumb-nav {
        font-size: 12px;
        gap: 4px;
    }
    
    .breadcrumb-item {
        padding: 2px 4px;
        gap: 4px;
    }
    
    .breadcrumb-item.current {
        max-width: 120px;
    }
    
    .breadcrumb-icon {
        font-size: 12px;
    }
    
    .breadcrumb-nav .subsection {
        max-width: 100px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .help-breadcrumb {
        padding: 4px 8px;
    }
    
    .breadcrumb-nav {
        font-size: 11px;
        gap: 3px;
    }
    
    .breadcrumb-item {
        padding: 1px 3px;
        gap: 3px;
    }
    
    .breadcrumb-item.current {
        max-width: 80px;
    }
    
    .breadcrumb-icon {
        font-size: 11px;
    }
    
    .breadcrumb-separator {
        font-size: 9px;
    }
    
    .breadcrumb-nav .subsection {
        max-width: 60px;
        font-size: 10px;
    }
}

/* Very small screens - stack vertically if needed */
@media (max-width: 360px) {
    .breadcrumb-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .breadcrumb-separator {
        display: none;
    }
    
    .breadcrumb-item {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Special handling when All Questions section is active */
.content-section.active#all-questions ~ .help-breadcrumb {
    margin-right: 0; /* No TOC in All Questions section */
}

.help-item.expanded h4::after {
    content: '\f106'; 
    font-family: FontAwesome;
    float: right;
    color: #4f46e5;
}

.help-item:not(.expanded) h4::after {
    content: '\f107'; 
    font-family: FontAwesome;
    float: right;
    color: #94a3b8;
}

.financial-resources-cta {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
    color: white;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

.resources-cta-content {
    display: flex;
    align-items: center;
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.resources-icon {
    flex-shrink: 0;
}

.resources-icon i {
    font-size: 48px;
    color: #fbbf24;
}

.resources-text {
    flex: 1;
}

.resources-text h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

.resources-text p {
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.resources-action {
    flex-shrink: 0;
}

.resources-btn {
    background: rgb(0, 123, 255);
    border: none;
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.resources-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    text-decoration: none;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .financial-resources-cta {
        padding: 25px 20px;
        margin-top: 30px;
    }
    
    .resources-cta-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .resources-icon i {
        font-size: 40px;
    }
    
    .resources-text h3 {
        font-size: 22px;
    }
    
    .resources-text p {
        font-size: 15px;
    }
    
    .resources-btn {
        padding: 10px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .financial-resources-cta {
        padding: 20px 15px;
    }
    
    .resources-text h3 {
        font-size: 20px;
    }
    
    .resources-text p {
        font-size: 14px;
    }
    
    .resources-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}