/* ================================
   KNOWLEDGE HUB COLLECTION PAGE - OPTIMIZED FOR 100% ZOOM
   ================================ */

/* OVERRIDE BODY MAX-WIDTH */
body.page-template-knowledge-hub-collection {
    max-width: 100% !important;
    width: 100% !important;
}

/* Ensure main element has no padding/margin */
.knowledge-hub-collection-page {
    padding: 0;
    margin: 0;
    width: 100%;
}

/* ================================
   Collection Hero Section
   ================================ */
.knowledge-hub-collection-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 80px 0;
    background: radial-gradient(ellipse at 20% 30%, #2B4150 0%, #2B4150 25%, #207C7E 55%, #1D95D1 100%) !important;
}

/* Background Elements */
.knowledge-hub-collection-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* SVG pattern - UPDATED SIZE AND POSITIONING */
.knowledge-hub-collection-hero-pattern {
    position: absolute;
    top: -3%;
    left: 40%; /* MOVED RIGHT from 30% */
    right: -10%; /* MOVED RIGHT from -3% */
    bottom: -3%;
    overflow: hidden;
    background-image: url('https://arrowheadprstg.wpengine.com/wp-content/uploads/2026/01/subelement.svg');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 750px; /* FIXED SIZE */
    opacity: 1;
    z-index: 2;
}

/* Hero Content */
.knowledge-hub-collection-hero .container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* Equal 40px padding - matches other collection pages */
    width: 100%;
}

.knowledge-hub-collection-hero-content {
    max-width: 750px; /* Body text width */
    text-align: left;
    margin: 0;
}

/* Label - REDUCED SIZE */
.knowledge-hub-collection-label {
    color: #6EB510;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    display: block;
    animation: fadeInUp 0.8s ease-out;
}

/* Title - REDUCED SIZE - NARROWER THAN BODY */
.knowledge-hub-collection-title {
    color: #FFFFFF;
    font-family: 'Urbanist', sans-serif;
    font-size: 52px;
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 20px 0;
    max-width: 600px; /* CONSTRAINED - narrower than content container */
    animation: fadeInTyping 1.2s ease-out;
}

/* Typing animation */
@keyframes fadeInTyping {
    0% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* Fade in up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Description - FULL WIDTH */
.knowledge-hub-collection-description {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    /* No max-width constraint - uses full content container width */
}

/* ================================
   RESPONSIVE HERO PATTERN
   ================================ */

/* Small to Medium Desktop (1000px - 1400px) - Move pattern further right */
@media (min-width: 1000px) and (max-width: 1400px) {
    .knowledge-hub-collection-hero-pattern {
        left: 45% !important;
        right: -12% !important;
        background-position: 100% center !important;
    }
}

/* Hide SVG pattern on screens less than 1000px */
@media (max-width: 999px) {
    .knowledge-hub-collection-hero-pattern {
        display: none !important;
    }
}

/* ================================
   Filter Bar
   ================================ */
.knowledge-hub-filter-bar {
    background: #FFFFFF;
    padding: 20px 0;
    border-bottom: 2px solid #F5F5F5;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.knowledge-hub-filter-bar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.knowledge-hub-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: left;
}

/* Filter Button - REDUCED SIZE */
.knowledge-hub-filter-btn {
    background: #2B4150;
    border: 2px solid #2B4150;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
}

.knowledge-hub-filter-btn:hover {
    background: transparent;
    border-color: #2B4150;
    color: #2B4150;
}

.knowledge-hub-filter-btn.active {
    background: #2B4150;
    border-color: #2B4150;
    color: #FFFFFF;
}

/* ================================
   Articles Grid Section
   ================================ */
.knowledge-hub-collection-grid-section {
    padding: 100px 0;
    background: #F8F8F8;
}

.knowledge-hub-collection-grid-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.knowledge-hub-collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Article Card */
.knowledge-hub-collection-card {
    position: relative;
    background: #FFFFFF;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.knowledge-hub-collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.knowledge-hub-collection-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Card Image - REDUCED HEIGHT */
.knowledge-hub-collection-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #E5E5E5;
}

.knowledge-hub-collection-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.knowledge-hub-collection-card:hover .knowledge-hub-collection-card-image img {
    transform: scale(1.05);
}

/* Card Content - REDUCED PADDING */
.knowledge-hub-collection-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
    background: #FFFFFF;
}

/* Category/Date styling */
.knowledge-hub-collection-card-category {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.knowledge-hub-collection-card-category-name {
    color: #2B4150;
}

.knowledge-hub-collection-card-category-name::after {
    content: '|';
    color: #CCCCCC;
    margin: 0 8px;
}

.knowledge-hub-collection-card-date {
    color: #999999;
    font-weight: 400;
}

/* Card Title - REDUCED SIZE */
.knowledge-hub-collection-card-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #2B4150;
    margin: 0 0 14px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.knowledge-hub-collection-card:hover .knowledge-hub-collection-card-title {
    color: #1D95D1;
}

/* Card Excerpt - REDUCED SIZE */
.knowledge-hub-collection-card-excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

/* Article Link with Arrow */
.knowledge-hub-collection-card-link-text {
    display: inline-flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1D95D1 !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.knowledge-hub-collection-card-link-text::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 12px;
    margin-left: 10px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='12' viewBox='0 0 20 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 1L19 6M19 6L14 11M19 6H1' stroke='%231d95d1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
}

.knowledge-hub-collection-card:hover .knowledge-hub-collection-card-link-text::after {
    transform: translateX(5px);
}

/* No Articles Message - REDUCED SIZE */
.no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #666666;
}

/* ================================
   CTA Section
   ================================ */
.knowledge-hub-collection-cta {
    background: linear-gradient(135deg, #2B4150 0%, #207C7E 100%);
    padding: 100px 0;
    text-align: center;
}

.knowledge-hub-collection-cta .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.knowledge-hub-collection-cta-content {
    max-width: 700px;
    margin: 0 auto;
}

/* CTA Title - REDUCED SIZE */
.knowledge-hub-collection-cta-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: #FFFFFF;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

/* CTA Description - REDUCED SIZE */
.knowledge-hub-collection-cta-description {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 36px 0;
    line-height: 1.6;
}

/* CTA Button - REDUCED SIZE */
.btn-knowledge-hub-collection-cta {
    display: inline-block;
    background: #5CC2CF;
    color: #FFFFFF;
    padding: 12px 42px !important;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn-knowledge-hub-collection-cta:hover {
    background: #6EB510;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
    color: #FFFFFF;
}

/* ================================
   TABLET RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
    .knowledge-hub-collection-title {
        font-size: 42px;
        max-width: 450px; /* Adjust for tablet */
    }
    
    .knowledge-hub-collection-hero-content {
        max-width: 550px; /* Slightly narrower on tablet */
        padding-right: 0;
    }
    
    .knowledge-hub-collection-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================
   MOBILE FIX - SINGLE COLUMN CARDS & STACKED FILTERS
   ================================ */

/* Mobile (768px and below) */
@media screen and (max-width: 768px) {
    .knowledge-hub-collection-hero .container,
    .knowledge-hub-filter-bar .container,
    .knowledge-hub-collection-grid-section .container,
    .knowledge-hub-collection-cta .container {
        padding: 0 20px !important; /* Mobile padding with !important */
    }
    
    .knowledge-hub-collection-hero {
        padding: 80px 0;
    }
    
    .knowledge-hub-collection-label {
        font-size: 14px;
        letter-spacing: 2px;
    }
    
    .knowledge-hub-collection-title,
    .knowledge-hub-collection-hero .knowledge-hub-collection-title,
    .knowledge-hub-collection-hero-content .knowledge-hub-collection-title {
        font-size: 40px !important;
        max-width: 100% !important;
        line-height: 1.1 !important;
    }
    
    .knowledge-hub-collection-description {
        font-size: 16px;
    }
    
    .knowledge-hub-collection-hero-content {
        max-width: 100%; /* Full width on mobile */
        padding-right: 0; /* No padding on mobile - SVG is hidden */
    }
    
    .knowledge-hub-filter-bar {
        position: static;
        padding: 24px 0 !important; /* More padding for stacked buttons */
    }
    
    /* STACK FILTER BUTTONS - SHOW MAX 5 */
    .knowledge-hub-filters {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
    }
    
    /* Show only first 5 filter buttons on mobile */
    .knowledge-hub-filter-btn {
        flex-shrink: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .knowledge-hub-filter-btn:nth-child(n+6) {
        display: none !important;
    }
    
    /* FORCE SINGLE COLUMN GRID */
    .knowledge-hub-collection-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        width: 100% !important;
    }
    
    /* ENSURE CARDS TAKE FULL WIDTH */
    .knowledge-hub-collection-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    /* FIX CARD IMAGE HEIGHT */
    .knowledge-hub-collection-card-image {
        height: 200px !important;
        width: 100% !important;
    }
    
    .knowledge-hub-collection-card-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    /* ENSURE CARD CONTENT ISN'T SQUISHED */
    .knowledge-hub-collection-card-content {
        padding: 20px !important;
        width: 100% !important;
    }
    
    .knowledge-hub-collection-card-title {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 14px !important;
    }
    
    .knowledge-hub-collection-card-excerpt {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
    
    .knowledge-hub-collection-grid-section {
        padding: 80px 0;
    }
    
    .knowledge-hub-collection-cta {
        padding: 80px 0;
    }
    
    .knowledge-hub-collection-cta-title {
        font-size: 28px;
    }
    
    .knowledge-hub-collection-cta-description {
        font-size: 16px;
    }
    
    .btn-knowledge-hub-collection-cta {
        width: 100%;
        padding: 14px 28px;
    }
}

/* Small Mobile (480px and below) */
@media screen and (max-width: 480px) {
    .knowledge-hub-collection-title,
    .knowledge-hub-collection-hero .knowledge-hub-collection-title,
    .knowledge-hub-collection-hero-content .knowledge-hub-collection-title {
        font-size: 40px !important;
        line-height: 1.1 !important;
    }
    
    .knowledge-hub-collection-card-content {
        padding: 18px !important;
    }
    
    .knowledge-hub-collection-card-image {
        height: 180px !important;
    }
    
    .knowledge-hub-collection-card-title {
        font-size: 18px !important;
    }
    
    .knowledge-hub-filter-btn {
        font-size: 13px !important;
        padding: 10px 18px !important;
    }
}

/* ================================
   ACCESSIBILITY
   ================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .knowledge-hub-collection-label,
    .knowledge-hub-collection-title,
    .knowledge-hub-collection-description,
    .knowledge-hub-collection-card,
    .knowledge-hub-collection-card-image img {
        animation: none;
        transition: none;
    }
}