/* ===== PREPARE FOR CATEGORY PAGES CSS ===== */

/* ===== HERO SECTION ===== */
.resource-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--kr-white);
}

.resource-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.resource-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.resource-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(102, 51, 153, 0.85) 0%,
        rgba(74, 34, 102, 0.9) 50%,
        rgba(195, 169, 76, 0.8) 100%
    );
    z-index: 2;
}

.resource-hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    color: var(--kr-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== BREADCRUMBS ===== */
.resource-breadcrumbs {
    margin-bottom: var(--space-xl);
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: var(--space-sm);
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.breadcrumb-item a:hover {
    color: var(--kr-white);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--kr-white);
    font-weight: var(--font-weight-medium);
}

/* ===== HERO INFO ===== */
.resource-hero-info {
    max-width: 800px;
}

.resource-organization {
    display: inline-block;
    background: rgba(195, 169, 76, 0.9);
    color: var(--kr-white);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.resource-title {
    color: var(--kr-white) !important;
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.resource-lead {
    font-size: var(--font-size-xl);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-xl);
    max-width: 60ch;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    padding: var(--space-2xl) 0;
    position: relative;
}

.resource-about {
    background: var(--kr-white);
}

.related-resources {
    background: var(--kr-sand-light);
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    color: var(--kr-purple-primary);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-md);
    position: relative;
    display: inline-block;
}

.section-header .subtitle {
    font-size: var(--font-size-lg);
    color: var(--kr-charcoal-light);
    max-width: 60ch;
    margin: 0 auto;
}

/* ===== ABOUT/CONTENT SECTION ===== */
.about-content {
    max-width: var(--container-lg);
    margin: 0 auto;
}

.about-text {
    font-size: var(--font-size-lg);
    line-height: 1.7;
    color: var(--kr-charcoal);
    max-width: none;
}

/* Style the formatted HTML content */
.about-text h1, .about-text h2, .about-text h3 {
    color: var(--kr-purple-primary);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-lg);
}

.about-text h1 {
    font-size: var(--font-size-2xl);
    border-bottom: 2px solid var(--kr-gold-primary);
    padding-bottom: var(--space-sm);
}

.about-text h2 {
    font-size: var(--font-size-xl);
}

.about-text h3 {
    font-size: var(--font-size-lg);
}

.about-text p {
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.about-text ul {
    margin: var(--space-lg) 0;
    padding-left: var(--space-xl);
}

.about-text li {
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.about-text a {
    color: var(--kr-purple-primary);
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.about-text a:hover {
    color: var(--kr-gold-primary);
    text-decoration-color: var(--kr-gold-primary);
}

.about-text strong {
    color: var(--kr-purple-primary);
    font-weight: var(--font-weight-bold);
}

/* ===== RELATED RESOURCES ===== */
.related-resource-card {
    background: var(--kr-white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--kr-gray-light);
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--kr-purple-primary);
}

.related-resource-image {
    height: 200px;
    overflow: hidden;
    background: var(--kr-gray-bg);
}

.related-resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.related-resource-card:hover .related-resource-image img {
    transform: scale(1.05);
}

.related-resource-content {
    padding: var(--space-xl);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-category {
    color: var(--kr-gold-dark);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.related-resource-content h3 {
    color: var(--kr-purple-primary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.related-description {
    color: var(--kr-charcoal-light);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.related-resource-link {
    background: var(--kr-gold-primary);
    color: var(--kr-white);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    text-align: center;
    transition: all var(--transition-fast);
    display: inline-block;
    margin-top: auto;
}

.related-resource-link:hover {
    background: var(--kr-gold-dark);
    color: var(--kr-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.view-all-resources {
    text-align: center;
    margin-top: var(--space-4xl);
}

.view-all-resources .uk-button {
    background: var(--kr-purple-primary);
    color: var(--kr-white);
    border: none;
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-lg);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.view-all-resources .uk-button:hover {
    background: var(--kr-purple-dark);
    transform: translateY(-2px);
    color: var(--kr-white);
}

/* ===== READING TOOLS ===== */
.reading-toolbar {
    background: var(--kr-sand-light) !important;
    border: 1px solid var(--kr-gray-light) !important;
    margin-bottom: var(--space-lg) !important;
    padding: var(--space-md) !important;
    border-radius: var(--radius-lg) !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--space-sm) !important;
    align-items: center !important;
}

.reading-toolbar button {
    background: var(--kr-purple-primary) !important;
    color: var(--kr-white) !important;
    border: none !important;
    padding: var(--space-sm) var(--space-md) !important;
    border-radius: var(--radius-md) !important;
    font-size: var(--font-size-sm) !important;
    font-weight: var(--font-weight-semibold) !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
}

.reading-toolbar button:hover {
    background: var(--kr-purple-dark) !important;
    transform: translateY(-1px) !important;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.high-contrast .resource-hero-overlay {
    background: rgba(0, 0, 0, 0.9);
}

.high-contrast .resource-organization {
    background: var(--kr-white);
    color: var(--kr-charcoal);
    border: 2px solid var(--kr-charcoal);
}

.high-contrast .related-resource-card {
    border: 3px solid var(--kr-charcoal);
    box-shadow: none;
}

.large-font .resource-title {
    font-size: var(--font-size-4xl);
}

.large-font .resource-lead {
    font-size: var(--font-size-2xl);
}

.large-font .about-text {
    font-size: var(--font-size-xl);
}

.enhanced-focus .related-resource-link:focus,
.enhanced-focus .breadcrumb-item a:focus,
.enhanced-focus .uk-button:focus {
    outline: 3px solid var(--kr-gold-primary);
    outline-offset: 4px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .resource-hero {
        min-height: 50vh;
    }
    
    .content-section {
        padding: var(--space-2xl) 0;
    }
}

@media (max-width: 768px) {
    .resource-hero {
        min-height: 40vh;
    }
    
    .resource-title {
        font-size: var(--font-size-3xl);
    }
    
    .resource-lead {
        font-size: var(--font-size-lg);
    }
    
    .breadcrumb-list {
        font-size: var(--font-size-xs);
    }
    
    .related-resource-content {
        padding: var(--space-lg);
    }
    
    .content-section {
        padding: var(--space-xl) 0;
    }
    
    .about-text {
        font-size: var(--font-size-base);
    }
}

@media (max-width: 640px) {
    .resource-hero {
        margin-top: 0px;
        text-align: center;
    }
    
    .resource-title {
        font-size: var(--font-size-2xl);
    }
    
    .resource-lead {
        font-size: var(--font-size-base);
    }
    
    .section-header h2 {
        font-size: var(--font-size-2xl);
    }
    
    .reading-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .resource-hero {
        background: var(--kr-white) !important;
        color: var(--kr-charcoal) !important;
        margin-top: 0;
        min-height: auto;
        padding: var(--space-lg) 0;
    }
    
    .resource-hero-background,
    .resource-hero-overlay {
        display: none;
    }
    
    .resource-title {
        color: var(--kr-charcoal) !important;
        text-shadow: none;
    }
    
    .resource-organization {
        background: var(--kr-white) !important;
        color: var(--kr-charcoal) !important;
        border: 1px solid var(--kr-charcoal) !important;
    }
    
    .related-resource-link,
    .view-all-resources {
        display: none;
    }
    
    .related-resource-card {
        background: var(--kr-white) !important;
        border: 1px solid var(--kr-charcoal) !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .related-resource-card:hover,
    .related-resource-card:hover .related-resource-image img,
    .uk-button:hover,
    .reading-toolbar button:hover {
        transform: none;
    }
    
    .related-resource-link,
    .uk-button {
        transition: none;
    }
}
.about-text p {
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text ul {
    margin: var(--space-xl) 0;
    padding-left: var(--space-2xl);
    list-style: none;
}

.about-text li {
    margin-bottom: var(--space-md);
    line-height: 1.6;
    position: relative;
    padding-left: var(--space-lg);
}

.about-text li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--kr-gold-primary);
    font-weight: bold;
    font-size: 1.2em;
}

.about-text strong {
    color: var(--kr-purple-primary);
    font-weight: var(--font-weight-bold);
    display: block;
    margin: var(--space-xl) 0 var(--space-md) 0;
    font-size: var(--font-size-xl);
    border-bottom: 2px solid var(--kr-gold-primary);
    padding-bottom: var(--space-sm);
}

.about-text a {
    color: var(--kr-purple-primary);
    font-weight: var(--font-weight-semibold);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.about-text a:hover {
    color: var(--kr-gold-primary);
    text-decoration-color: var(--kr-gold-primary);
}

/* Responsive spacing */
@media (max-width: 768px) {
    .about-text ul {
        padding-left: var(--space-xl);
    }
    
    .about-text li {
        padding-left: var(--space-md);
    }
    
    .about-text strong {
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 600px) {
    main {
      padding-top: 0px;
    }
}
a.resource-organization:hover {
    color: var(--kr-white) !important;
}
span.bold {
    font-weight: var(--font-weight-bold);
}