/* ============================================
   ARTICLES LANDING PAGE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0f0f0f;
    color: #f0f0f0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a1a1a;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #303030;
}

.navbar-logo img {
    max-height: 50px;
    width: auto;
    transition: transform 0.2s ease;
}

.navbar-logo img:hover {
    transform: scale(1.05);
}

.navbar-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.navbar-links a {
    color: #f0f0f0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: 4px;
}

.navbar-links a:hover {
    background-color: rgba(0, 179, 55, 0.1);
    color: #00B337;
}

.navbar-links a.active {
    background-color: rgba(0, 179, 55, 0.2);
    color: #00B337;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #f0f0f0;
    cursor: pointer;
    padding: 0.5rem;
}

/* Main Content */
.articles-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #9a9a9a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: #00B337;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.breadcrumbs a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.breadcrumbs span {
    color: #666;
    font-size: 0.75rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #00B337;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #9a9a9a;
    max-width: 700px;
    margin: 0 auto;
}

/* Search and Filter Section */
.search-filter-section {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #303030;
    border-radius: 12px;
    padding: 1.5rem;
}

.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9a9a9a;
    font-size: 1.1rem;
}

.search-container input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: #2a2a2a;
    border: 1px solid #303030;
    border-radius: 8px;
    color: #f0f0f0;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #00B337;
    box-shadow: 0 0 0 3px rgba(0, 179, 55, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9a9a9a;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.clear-search-btn:hover {
    color: #f0f0f0;
}

.filter-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-container label {
    color: #9a9a9a;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-container select {
    padding: 0.75rem 1rem;
    background: #2a2a2a;
    border: 1px solid #303030;
    border-radius: 8px;
    color: #f0f0f0;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 180px;
}

.filter-container select:focus {
    outline: none;
    border-color: #00B337;
}

/* Results Count */
.results-count {
    margin-bottom: 1.5rem;
    color: #9a9a9a;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-count strong {
    color: #f0f0f0;
}

.refresh-articles-btn {
    padding: 0.5rem 1rem;
    background: rgba(0, 179, 55, 0.1);
    border: 1px solid rgba(0, 179, 55, 0.3);
    border-radius: 6px;
    color: #00B337;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.refresh-articles-btn:hover {
    background: rgba(0, 179, 55, 0.2);
    border-color: #00B337;
}

.refresh-articles-btn:active {
    transform: scale(0.98);
}

.refresh-articles-btn i {
    transition: transform 0.3s ease;
}

.refresh-articles-btn.refreshing i {
    animation: spin 1s linear infinite;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.article-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #303030;
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    height: 600px; /* Fixed height for uniformity */
}

.article-card-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #1a1a1a;
    position: relative;
}

.article-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px; /* Fixed height to match container */
    object-fit: cover;
    transition: transform 0.3s ease;
    z-index: 1; /* Ensure image appears above placeholder */
}

.article-card:hover .article-card-thumbnail img {
    transform: scale(1.05);
}

.article-card-thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 200px; /* Fixed height to match container */
    min-height: 200px;
    max-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 3rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    opacity: 0.6;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
    z-index: 0; /* Placeholder is background layer */
}

.article-card-thumbnail-placeholder i {
    display: block;
    line-height: 1;
    font-size: 3rem;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.article-card:hover .article-card-thumbnail-placeholder {
    opacity: 0.8;
    color: #555;
}

.article-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    /* Content area takes remaining space after 200px thumbnail */
    /* This ensures consistency whether image exists or not */
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00B337 0%, #e4007c 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.article-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #00B337;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 179, 55, 0.2);
}

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

.article-card-header {
    margin-bottom: 1rem;
    min-height: 80px; /* Ensure consistent header height */
}

.article-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 179, 55, 0.2);
    border: 1px solid rgba(0, 179, 55, 0.4);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #00B337;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.article-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
    line-height: 1.4;
    min-height: 56px; /* Ensure consistent title height (2 lines) */
    max-height: 56px; /* Limit to 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-card-description {
    color: #9a9a9a;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
    min-height: 60px; /* Ensure consistent description height */
    max-height: 90px; /* Limit description to 3 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #303030;
}

.article-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-card-meta i {
    font-size: 0.75rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    min-height: 80px; /* Ensure consistent tag area height */
    max-height: 140px; /* Increased to show more tags */
    overflow: hidden;
    position: relative;
    padding-bottom: 20px; /* Space for fade effect */
}

.article-tags::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px; /* Increased fade height for better peek-through */
    background: linear-gradient(to bottom, transparent 0%, rgba(15, 15, 15, 0.3) 30%, rgba(15, 15, 15, 0.7) 70%, rgba(15, 15, 15, 0.95) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-tags.has-overflow::after {
    opacity: 1;
}

.article-tag {
    padding: 0.35rem 0.65rem; /* Consistent padding */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #303030;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #9a9a9a;
    transition: all 0.2s ease;
    height: 29px; /* Fixed height for consistency */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* Prevent text wrapping */
    box-sizing: border-box;
    line-height: 1;
    min-width: fit-content; /* Allow natural width but maintain height */
}

.article-tags-more {
    padding: 0.35rem 0.65rem; /* Match article-tag padding */
    background: rgba(0, 179, 55, 0.15);
    border: 1px solid rgba(0, 179, 55, 0.4);
    border-radius: 4px;
    font-size: 0.75rem;
    color: #00B337;
    font-weight: 600;
    cursor: default;
    align-self: flex-start;
    position: relative;
    z-index: 1; /* Ensure it appears above fade */
    box-shadow: 0 2px 4px rgba(0, 179, 55, 0.2);
    height: 29px; /* Match article-tag height */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1;
}

.article-tag-colored {
    font-weight: 500;
    border-width: 1px;
    border-style: solid;
    height: 29px; /* Ensure colored tags match height */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1;
}

.article-tag-colored:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.article-tag-selected {
    box-shadow: 0 0 0 2px rgba(0, 179, 55, 0.5);
    font-weight: 600;
}

/* Quick Filters Section */
.quick-filters-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #303030;
    border-radius: 12px;
}

.quick-filters-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #9a9a9a;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quick-filter-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #303030;
    border-radius: 20px;
    color: #f0f0f0;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quick-filter-btn:hover {
    background: rgba(0, 179, 55, 0.1);
    border-color: #00B337;
    color: #00B337;
    transform: translateY(-2px);
}

.quick-filter-btn.active {
    background: rgba(0, 179, 55, 0.2);
    border-color: #00B337;
    color: #00B337;
    font-weight: 600;
}

/* Active Tag Filters */
.active-tag-filters {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 179, 55, 0.05);
    border: 1px solid rgba(0, 179, 55, 0.2);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.active-filters-label {
    font-size: 0.875rem;
    color: #9a9a9a;
    font-weight: 500;
    margin-right: 0.5rem;
}

.active-tag-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.active-tag-filter:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.active-tag-filter i {
    font-size: 0.625rem;
    opacity: 0.7;
}

.clear-tag-filters-btn {
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #666;
    border-radius: 15px;
    color: #f0f0f0;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.clear-tag-filters-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #999;
}

/* Loading Placeholder */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #9a9a9a;
}

.loading-placeholder i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #00B337;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #9a9a9a;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #666;
}

.no-results h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
}

/* SEO Content Section - Hidden visually but accessible to crawlers and screen readers */
.seo-content {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
    /* Content remains in DOM and accessible to search engines and screen readers */
}

.seo-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #f0f0f0;
}

.seo-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #f0f0f0;
}

.seo-content p {
    margin-bottom: 1rem;
    color: #c0c0c0;
    line-height: 1.7;
}

.seo-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #c0c0c0;
}

.seo-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.seo-content strong {
    color: #f0f0f0;
}

/* Footer */
.articles-footer {
    margin-top: 4rem;
    padding: 3rem 2rem 2rem;
    background: #1a1a1a;
    border-top: 1px solid #303030;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #f0f0f0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #9a9a9a;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9a9a9a;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: #00B337;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #303030;
    border-radius: 8px;
    color: #9a9a9a;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: rgba(0, 179, 55, 0.2);
    border-color: #00B337;
    color: #00B337;
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #303030;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: #9a9a9a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: #00B337;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1a1a1a;
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid #303030;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .navbar-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .articles-main {
        padding: 1.5rem 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .search-filter-section {
        padding: 1rem;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-container label {
        margin-bottom: 0.5rem;
    }

    .filter-container select {
        width: 100%;
        min-width: unset;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.75rem;
    }

    .article-card {
        padding: 0;
    }
    
    .article-card-content {
        padding: 1.25rem;
    }

    .article-card h2 {
        font-size: 1.1rem;
    }
    
    .article-card-thumbnail {
        height: 150px;
    }
    
    .quick-filters-section {
        padding: 1rem;
    }
    
    .quick-filters {
        gap: 0.5rem;
    }
    
    .quick-filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .active-tag-filters {
        padding: 0.75rem;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 1.5rem;
}

.pagination-info {
    color: #9a9a9a;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.pagination-info span {
    color: #f0f0f0;
    font-weight: 600;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #303030;
    border-radius: 8px;
    color: #f0f0f0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(0, 179, 55, 0.1);
    border-color: rgba(0, 179, 55, 0.4);
    color: #00B337;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn i {
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .pagination {
        gap: 1rem;
        padding: 1rem;
    }
    
    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .pagination-info {
        font-size: 0.85rem;
        min-width: 60px;
    }
}

