/* Guidelines page specific styles */
.guidelines-main {
    max-width: none;
    padding: 1.5rem;
}

.guidelines-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    background-color: var(--card-bg);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    border: 1px solid var(--border-color);
    border-top: none;
    padding: 2rem;
    margin-bottom: 2rem;
}

.guidelines-content {
    min-width: 0; /* Prevent flex overflow */
}

/* Blueprint Navigation Styles */
.blueprint-nav {
    font-family: var(--font-family-title);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.5rem 2rem;
    margin-bottom: 0;
    position: relative;
}

.blueprint-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    flex-wrap: nowrap; /* Prevent wrapping */
}

.blueprint-nav-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.blueprint-nav-item {
    margin: 0;
    flex-shrink: 0; /* Prevent items from shrinking */
}

.blueprint-nav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    background-color: var(--bg-secondary);
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition);
    white-space: nowrap;
    min-width: max-content; /* Ensure button is wide enough for content */
}

.blueprint-nav-link:hover {
    background-color: var(--bg-color);
    color: var(--text-color);
    border-color: var(--primary-color);
    transform: translateY(-0.5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blueprint-nav-item.current .blueprint-nav-link {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}


.page-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 0 0;
    line-height: 1.2;
}


/* Safety notice panel */
.guidance-notice {
    background-color: #fff8e6;
    border-left: 4px solid #f59e0b;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.guidance-notice p {
    margin: 0;
    color: #92400e;
    font-size: 0.95rem;
    line-height: 1.6;
}

.guidance-notice a {
    color: #92400e;
    text-decoration: underline;
    font-weight: 500;
}

.guidance-notice a:hover {
    color: #78350f;
}

.page-excerpt {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.page-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.page-icon {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}


/* Child pages list */
.child-pages-list {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    margin-left: 0;
}

.child-pages-list h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 0;
    padding-bottom: 0;
    border-bottom: none;
    color: var(--text-color);
}

.child-pages-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
    margin-left: 0 !important;
}

.child-pages-list li {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem !important;
    transition: all 0.2s ease;
    margin-left: 0 !important;
}

.child-pages-list li:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.child-pages-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.child-pages-list a:hover {
    text-decoration: underline;
}

.child-pages-list p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}



/* ==========================================================================
   Blueprint Hero Header with Background Image
   ========================================================================== */

/**
 * Blueprint hero header layout
 * Uses featured image as full-width background with text overlay
 */
.blueprint-page-header-hero {
    position: relative;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: black;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: background-size 1s ease;
}

.blueprint-page-header-hero:hover {
    background-size: 105%; 
}

/**
 * Dark overlay for better text readability
 * Creates subtle gradient from bottom to top
 */
.blueprint-hero-overlay {
    position: relative;
    z-index: 2;
    text-align: left;
    padding: 2rem;
    width: 100%;
    height: 325px;
    display: flex;
    align-items: flex-end;
    min-height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

/**
 * Blueprint hero title styling
 * White text with shadow for readability over images
 */
.blueprint-page-header-hero .page-title {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8),
                 0 0 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
    line-height: 100%;
}

/**
 * Blueprint hero excerpt styling
 * Maintains readability with white text and shadow
 */
.blueprint-page-header-hero .blueprint-page-excerpt p {
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8),
                 0 0 8px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin: 0 auto;
    font-size: 1rem !important;
    font-weight: 600;
}

/* ==========================================================================
   Responsive adjustments for blueprint hero header
   ========================================================================== */

@media (max-width: 768px) {
    .blueprint-page-header-hero {
        min-height: 300px;
        background-size: cover;
        background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 1) 80%
    );
    }
    
    .blueprint-hero-overlay {
        padding: 2rem 1.5rem;
    }
    
    .blueprint-page-header-hero .page-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .blueprint-page-header-hero {
        min-height: 250px;
        background-size: cover;
    }
    
    .blueprint-hero-overlay {
        padding: 1.5rem 1rem;
    }
    
    .blueprint-page-header-hero .page-title {
        font-size: 1.75rem;
    }
}

/**
 * Accessibility: Ensure text remains readable in high contrast mode
 */
@media (prefers-contrast: high) {
    .blueprint-hero-overlay {
        background: rgba(0, 0, 0, 0.85);
    }
    
    .blueprint-page-header-hero .page-title,
    .blueprint-page-header-hero .page-excerpt {
        text-shadow: none;
    }
}


.page-content {
    line-height: 1.7;
    color: var(--text-color);
}




.page-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    scroll-margin-top: 100px;
}

.page-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 2rem 0 1rem 0;
    scroll-margin-top: 100px;
}

.page-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 1.5rem 0 0.75rem 0;
    scroll-margin-top: 100px;
}

/* Side panel TOC */
.guidelines-toc {
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
    position: sticky;
    top: 2rem;
    height: fit-content;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
}

.toc-container {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.toc-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.toc-nav {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

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

.toc-list li {
    margin-bottom: 0.25rem;
}

.toc-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    border-radius: 4px;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.toc-list a:hover {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.toc-list a.active {
    background-color: rgba(0, 136, 204, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.toc-list .toc-h3 {
    padding-left: 1.5rem;
}

.toc-list .toc-h4 {
    padding-left: 2.25rem;
    font-size: 0.8rem;
}

/* Reading progress */
.reading-progress {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Scroll indicators for all screen sizes */
.blueprint-nav::before,
.blueprint-nav::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    cursor: pointer;
}

.blueprint-nav::before {
    left: 0.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.blueprint-nav::after {
    right: 0.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.blueprint-nav.show-left-arrow::before {
    opacity: 0.8;
    pointer-events: auto;
}

.blueprint-nav.show-right-arrow::after {
    opacity: 0.8;
    pointer-events: auto;
}

.blueprint-nav.show-left-arrow::before:hover,
.blueprint-nav.show-right-arrow::after:hover {
    opacity: 1;
    background-color: var(--bg-color);
    transform: translateY(-50%) scale(1.05);
}
@media (max-width: 1024px) {
    .guidelines-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .guidelines-toc {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 2rem;
        position: static;
        max-height: none;
    }
    
    .toc-nav {
        max-height: 200px;
    }
}

@media (max-width: 768px) {
    .guidelines-main {
        padding: 1rem;
    }
    
    .guidelines-layout {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-excerpt {
        font-size: 1rem;
    }
    
    .page-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .page-content h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem 0;
    }
    
    .toc-container {
        padding: 1rem;
    }
    
/* Responsive design */
}

@media (max-width: 480px) {
    .guidelines-layout {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .breadcrumb {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .blueprint-nav-link {
        padding: 0.875rem 1rem;
        font-size: 0.8rem;
    }
}

/* collection-filters, filter-btn, page-navigation, and next-page-link
   have been moved to misc.css as they are shared with guidance templates. */