html {
    overflow-x: hidden;
}

body {
    line-height: 1.6;
}

/* Main Content */
#main {
    scroll-margin-top: calc(var(--header-height) + 8px);
}

/* ===== HERO SECTION ===== */
.knowledge-hero {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--espresso) 0%, rgba(60, 36, 21, 0.95) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /*padding-top: var(--header-height);*/
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: repeating-linear-gradient(
        45deg, 
        transparent, 
        transparent 35px, 
        rgba(212, 165, 116, 0.5) 35px, 
        rgba(212, 165, 116, 0.5) 70px
    );
    animation: drift 20s linear infinite;
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to { transform: translate(70px, 70px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 1000px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--warm-beige);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 2rem;
}

.hero-badge::before,
.hero-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: var(--warm-beige);
    opacity: 0.3;
}

.hero-badge::before { left: -60px; }
.hero-badge::after { right: -60px; }

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 0.9;
    color: var(--pure-white);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.hero-title .accent {
    background: linear-gradient(
        92deg, 
        var(--warm-beige) 0%, 
        var(--light-beige) 25%, 
        var(--warm-beige) 50%, 
        var(--warm-beige-dark) 75%, 
        var(--warm-beige) 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--sand);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--warm-beige);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--sand);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    opacity: 0.7;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--warm-beige);
    opacity: 0.5;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== FILTER SECTION ===== */
.filter-section {
    background: var(--cream);
    padding: 3rem 0 2rem;
    /*position: sticky;
    top: var(--header-height);
    z-index: var(--z-dropdown)*/;
    border-bottom: 1px solid var(--gray-200);
}

.filter-container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    border: 2px solid transparent;
    background: var(--pure-white);
    border-radius: 60px;
    font-size: 1rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--warm-beige);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    pointer-events: none;
}

.filter-pills {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 0.625rem 1.5rem;
    background: var(--pure-white);
    border: 2px solid var(--pure-white);
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.filter-pill::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--warm-beige);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: 0;
}

.filter-pill span {
    position: relative;
    z-index: 1;
}

.filter-pill:hover {
    border-color: var(--warm-beige);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.1);
}

.filter-pill.active {
    background: var(--warm-beige);
    border-color: var(--warm-beige);
    color: var(--espresso);
}

.filter-pill.active::before {
    width: 100%;
    height: 100%;
}

.filter-count {
    display: inline-block;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.filter-pill.active .filter-count {
    background: rgba(60, 36, 21, 0.15);
}

/* ===== ARTICLES SECTION ===== */
.articles-section {
    background: var(--cream);
    padding: 4rem 0;
    min-height: 100vh;
}

.articles-container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Featured Article */
.featured-article {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: var(--espresso);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 5rem;
    min-height: 500px;
    box-shadow: var(--shadow-xl);
}

.featured-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--warm-beige) 0%, var(--warm-taupe) 100%);
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: var(--transition-smooth);
}

.featured-article:hover .featured-image img {
    transform: scale(1.05);
    opacity: 1;
}

.featured-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--pure-white);
}

.featured-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm-beige);
    margin-bottom: 2rem;
}

.featured-label::before {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--warm-beige);
}

.featured-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.5rem 0;
}

.featured-title a {
    color: var(--pure-white);
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.featured-title a:hover {
    color: var(--warm-beige);
}

.featured-excerpt {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--sand);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 165, 116, 0.2);
}

.featured-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--warm-beige);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--pure-white);
}

.author-avatar img {
    border-radius: 50%;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--pure-white);
}

.author-role {
    font-size: 0.875rem;
    color: var(--warm-beige);
    opacity: 0.8;
}

.read-time {
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--warm-beige);
    font-weight: 600;
}

/* Article Grid */
.hero-stats,
.articles-grid { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.article-card {
    background: var(--pure-white);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
    border: 1px solid var(--gray-100);
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    opacity: 1;
    transform: scale(1);
}

.article-card .stretched-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.article-card .stretched-link:focus-visible {
    outline: 3px solid var(--warm-beige);
    outline-offset: 4px;
    border-radius: 16px;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warm-beige), var(--warm-taupe));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.article-card:focus-visible {
    outline: 3px solid var(--warm-beige);
    outline-offset: 4px;
}

.article-card .article-image {
    position: relative;
    z-index: 1;
}

.article-card .article-body {
    position: relative;
    z-index: 1;
}

.article-card.no-image {
    background: linear-gradient(135deg, var(--pure-white) 0%, var(--gray-50) 100%);
}

.article-card.highlight {
    border-color: var(--warm-beige);
    background: linear-gradient(135deg, var(--pure-white) 0%, rgba(212, 165, 116, 0.03) 100%);
}

.article-image {
    aspect-ratio: 5 / 3;
    overflow: hidden;
    background: var(--sand);
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.article-card:hover .article-image img {
    transform: scale(1.08);
}

.article-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--espresso);
    color: var(--pure-white);
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.article-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-date {
    font-size: 0.8rem;
    color: var(--taupe-aa);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: var(--espresso);
}

.article-excerpt {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-100);
}

.article-author {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 600;
}

.article-arrow {
    width: 24px;
    height: 24px;
    color: var(--warm-beige-darker);
    transition: transform 0.3s ease;
}

.article-card:hover .article-arrow {
    transform: translateX(4px);
}

/* Load More */
.load-more-container {
    text-align: center;
    padding: 4rem 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 3rem;
    background: var(--espresso);
    color: var(--pure-white);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 50px;
    transition: var(--transition-base);
    border: 2px solid var(--espresso);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--warm-beige);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.load-more-btn:hover::before {
    width: 300%;
    height: 300%;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--warm-beige);
}

.load-more-btn span {
    position: relative;
    z-index: 2;
}

.load-more-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.load-more-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--espresso) 0%, var(--rich-brown) 100%);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 50%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.newsletter-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

.newsletter-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 6vw, 4rem);
    color: var(--pure-white);
    margin-bottom: 1rem;
    line-height: 1;
}

.newsletter-subtitle {
    font-size: 1.25rem;
    color: var(--sand);
    margin-bottom: 3rem;
    opacity: 0.9;
}

#mailpoet_form_1 form,
.newsletter-form {
    padding: 0 !important;
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

#mailpoet_form_1 .mailpoet_text,
.newsletter-input {
    flex: 1;
    padding: 1.25rem 2rem !important;
    border: 2px solid rgba(212, 165, 116, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--pure-white);
    font-size: 1rem;
    transition: all 0.3s ease;
    width: auto !important;
}

#mailpoet_form_1 .mailpoet_text::placeholder,
.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#mailpoet_form_1 .mailpoet_text:focus,
.newsletter-input:focus {
    outline: none;
    border-color: var(--warm-beige);
    background: rgba(255, 255, 255, 0.1);
}

#mailpoet_form_1 .mailpoet_submit,
.newsletter-submit {
    padding: 1.25rem 2.5rem !important;
    background: var(--warm-beige);
    color: var(--pure-white);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-base);
}

#mailpoet_form_1 .mailpoet_submit:hover,
.newsletter-submit:hover {
    background: var(--warm-beige-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
}

#mailpoet_form_1 .mailpoet_message {
    padding: 0 !important;
}

/*#mailpoet_form_1 .mailpoet_message:empty {
  margin: 0;
  padding: 0;
  height: 0;
}*/
  
/* ===== RESPONSIVE ===== */


@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .featured-image {
        height: 300px;
    }
    
    .featured-content {
        padding: 3rem;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    
    #mailpoet_form_1 .mailpoet_text,
    .newsletter-input {
        width: 100% !important;
    }

    .knowledge-hero {
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        gap: 2rem;
        flex-wrap: wrap;
    }
    
    .filter-section {
        padding: 2rem 0;
        top: 60px;
    }
    
    .filter-container {
        padding: 0 1.5rem;
    }
    
    .articles-section {
        padding: 3rem 0;
    }
    
    .articles-container {
        padding: 0 1.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .featured-content {
        padding: 2rem;
    }
    
    .featured-title {
        font-size: 1.75rem;
    }
    
    #mailpoet_form_1 form,
    .newsletter-form {
        flex-direction: column;
    }
    

}


/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

    .article-card {
        transition: none !important;
    }
    
    .hero-pattern,
    .hero-title .accent,
    .scroll-indicator,
    .newsletter-section::before {
        animation: none !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .filter-section,
    .newsletter-section,
    .load-more-container,
    .scroll-indicator {
        display: none !important;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        page-break-inside: avoid;
    }
}

.loading-results,
.no-results {
    display: none !important;
}