/* ================================
   KNOWLEDGE HUB POST TEMPLATE - FIXED PADDING
   ================================ */

:root {
    --kh-primary: #2B4150;
    --kh-accent: #5CC2CF;
    --kh-secondary: #207C7E;
    --kh-green: #6EB510;
    --kh-light-blue: #E8F8FA;
    --kh-text: #333333;
    --kh-text-light: #666666;
    --kh-border: #E5E5E5;
}

/* ================================
   Hero Section - FIXED TO MATCH INSIGHTS
   ================================ */
.kh-post-hero {
    position: relative;
    padding: 80px 0 60px !important; /* FORCE with !important */
    background: #2B4150;
    overflow: hidden;
    margin-top: 0;
}

/* Lines pattern - STRETCHED TO COVER FULL HEIGHT */
.kh-post-hero::before {
    content: '';
    position: absolute;
    top: -5%;
    bottom: -5%;
    right: -3%;
    width: 100%;
    height: 110%;
    background-image: url('https://arrowheadprstg.wpengine.com/wp-content/uploads/2026/01/lineelement.svg');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 41%;
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}

.kh-post-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* Category Badge */
.kh-post-category {
    display: inline-block;
    padding: 6px 18px;
    background: #6EB510;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Post Title */
.kh-post-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    color: #FFFFFF;
    margin: 0 0 28px 0;
    animation: fadeInTyping 1.5s ease-out;
    max-width: 800px;
}

@keyframes fadeInTyping {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Post Excerpt */
.kh-post-excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 36px 0;
    font-weight: 400;
    max-width: 800px;
}

/* Post Meta */
.kh-post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 800px;
}

.kh-post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.kh-post-meta-icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

/* ========== RESPONSIVE - MATCHING INSIGHTS ========== */

/* Small to Medium Desktop (1000px - 1400px) */
@media (min-width: 1175px) and (max-width: 1400px) {
    .kh-post-hero::before {
        right: -8%;
        background-size: 45%;
    }
}

/* Hide lines pattern on screens less than 1175px */
@media (max-width: 1174px) {
    .kh-post-hero::before {
        display: none !important;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .kh-post-hero {
        padding: 80px 0 60px !important; /* KEEP SAME - don't increase */
    }
    
    .kh-post-title {
        font-size: 42px;
    }
    
    .kh-post-excerpt {
        font-size: 17px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .kh-post-hero {
        padding: 80px 0 50px !important; /* MATCHING INSIGHTS */
    }
    
    .kh-post-hero-container {
        padding: 0 20px;
    }
    
    .kh-post-category {
        font-size: 13px;
        padding: 5px 16px;
        margin-bottom: 16px;
    }
    
    .kh-post-title {
        font-size: 40px !important;
        margin-bottom: 20px;
    }
    
    .kh-post-excerpt {
        font-size: 16px;
        margin-bottom: 28px;
    }
    
    .kh-post-meta {
        gap: 16px;
        padding-top: 24px;
    }
    
    .kh-post-meta-item {
        font-size: 13px;
    }
    
    .kh-post-meta-icon {
        width: 16px;
        height: 16px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .kh-post-hero {
        padding: 70px 0 40px !important;
    }
    
    .kh-post-title {
        font-size: 28px;
    }
    
    .kh-post-excerpt {
        font-size: 15px;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .kh-post-title {
        animation: none;
    }
}

/* ================================
   Content Area
   ================================ */
.kh-post-content-wrapper {
    background: #FFFFFF;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.kh-post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

/* Featured Image (if used) */
.kh-post-featured-image {
    width: 100%;
    max-width: 1200px;
    margin: -60px auto 60px;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

.kh-post-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Article Content */
.kh-post-content {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #333333;
    max-width: 900px;
    margin: 0 auto;
}

.kh-post-content h2 {
    font-family: 'Urbanist', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #2B4150;
    margin: 52px 0 20px 0;
    line-height: 1.3;
}

.kh-post-content h3 {
    font-family: 'Urbanist', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #2B4150;
    margin: 44px 0 18px 0;
    line-height: 1.4;
}

.kh-post-content h4 {
    font-family: 'Urbanist', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #2B4150;
    margin: 36px 0 14px 0;
}

.kh-post-content p {
    margin: 0 0 24px 0;
}

.kh-post-content strong {
    font-weight: 700;
    color: #2B4150;
}

.kh-post-content em {
    font-style: italic;
}

.kh-post-content a {
    color: #1D95D1;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.kh-post-content a:hover {
    color: #6EB510;
}

.kh-post-content ul,
.kh-post-content ol {
    margin: 0 0 24px 0;
    padding-left: 32px;
}

.kh-post-content li {
    margin-bottom: 12px;
}

/* Blockquote */
.kh-post-content blockquote {
    margin: 44px 0;
    padding: 28px 36px;
    background: #E8F8FA;
    border-left: 6px solid #5CC2CF;
    font-size: 20px;
    font-style: italic;
    line-height: 1.6;
    color: #2B4150;
    border-radius: 0 8px 8px 0;
}

.kh-post-content blockquote p:last-child {
    margin-bottom: 0;
}

.kh-post-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 36px 0;
}

.kh-post-content figure {
    margin: 36px 0;
}

.kh-post-content figcaption {
    font-size: 14px;
    color: #666666;
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

/* Pullquote */
.kh-pullquote {
    margin: 52px 0;
    padding: 40px;
    background: linear-gradient(135deg, #2B4150 0%, #207C7E 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.kh-pullquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 24px;
    font-family: 'Urbanist', sans-serif;
    font-size: 160px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.kh-pullquote-text {
    font-family: 'Urbanist', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    color: #FFFFFF;
    margin: 0;
    position: relative;
    z-index: 2;
}

/* Share Section */
.kh-share-section {
    margin: 60px auto;
    padding: 36px;
    background: #FFFFFF;
    border: 2px solid #E5E5E5;
    border-radius: 12px;
    text-align: center;
    max-width: 900px;
    position: relative;
    z-index: 5;
    overflow: hidden;
}

.kh-share-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #2B4150;
    margin: 0 0 20px 0;
}

.kh-share-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.kh-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #E8F8FA;
    color: #2B4150;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.kh-share-btn:hover {
    background: #6EB510;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.kh-share-btn svg {
    width: 18px;
    height: 18px;
}

/* Related Insights */
.kh-related-section {
    margin-top: 100px;
    padding-top: 80px;
    border-top: 3px solid #E5E5E5;
}

.kh-related-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #2B4150;
    text-align: center;
    margin: 0 0 52px 0;
}

.kh-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.kh-related-card {
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.kh-related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.kh-related-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #E8F8FA;
}

.kh-related-card-content {
    padding: 20px;
}

.kh-related-card-category {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1d95d1;
    margin-bottom: 10px;
}

.kh-related-card-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #2B4150;
    line-height: 1.3;
    margin: 0 0 10px 0;
}

.kh-related-card-excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    margin: 0;
}

/* CTA Section */
.kh-cta-section {
    margin-top: 100px;
    padding: 52px 40px;
    background: #F5F5F5;
    border-radius: 0;
    text-align: center;
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
}

.kh-cta-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: #2B4150;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.kh-cta-description {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2B4150;
    margin: 0 0 28px 0;
    opacity: 0.8;
}

.kh-cta-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #6EB510;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(110, 181, 16, 0.3);
}

.kh-cta-btn:hover {
    background: #1D95D1;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(29, 149, 209, 0.4);
    color: #FFFFFF;
}

/* Article Images - Centered with Padding */
.kh-post-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 36px auto;
    padding: 0;
    border-radius: 8px;
}

/* Full-width images */
.kh-post-content img.alignfull,
.kh-post-content .wp-block-image.alignfull img {
    width: 100%;
    max-width: 100%;
}

/* Left-aligned images */
.kh-post-content img.alignleft,
.kh-post-content .wp-block-image.alignleft {
    float: left;
    margin: 18px 36px 18px 0;
    max-width: 50%;
}

/* Right-aligned images */
.kh-post-content img.alignright,
.kh-post-content .wp-block-image.alignright {
    float: right;
    margin: 18px 0 18px 36px;
    max-width: 50%;
}

/* Center-aligned images */
.kh-post-content img.aligncenter,
.kh-post-content .wp-block-image.aligncenter {
    display: block;
    margin: 36px auto;
}

/* Image captions */
.kh-post-content .wp-block-image figcaption,
.kh-post-content .wp-caption-text {
    font-size: 14px;
    color: #666666;
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

/* Clear floats after images */
.kh-post-content img::after {
    content: "";
    display: table;
    clear: both;
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    .kh-post-title {
        animation: none;
    }
}