/* News Page Styles */

/* News Header Section */
.news-header {
    background: #F7F3E2;
    padding: 3rem 0;
    margin-bottom: 0;
    width: 100%;
}

.news-header-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.news-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.news-header p {
    font-size: 1.2rem;
    color: #636e72;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* News Tabs */
.news-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    background: transparent;
    padding: 0;
    margin: 0 0 2rem 0;
    border-bottom: none;
    width: 100%;
}

/* Store Filter */
.news-store-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.news-store-filter label {
    font-weight: 600;
    color: #2d3436;
    font-size: 1rem;
}

.store-filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    color: #2d3436;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-filter-select:focus {
    outline: none;
    border-color: #0D9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.news-tab {
    background: #E5E7EB;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #4B5563;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    position: relative;
    border-radius: 8px 8px 0 0;
    margin-right: 0.5rem;
}

.news-tab:hover {
    color: #1F2937;
    background: #D1D5DB;
}

.news-tab.active {
    color: #1F2937;
    border-bottom-color: #1F2937;
    background: white;
    border-bottom-width: 3px;
}

/* News Main Content */
.news-main {
    padding: 2rem 0 4rem;
    background: white;
    min-height: 60vh;
    width: 100%;
}

/* News Content Wrapper */
.news-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.news-main-content {
    min-width: 0;
}

/* Sidebar */
.news-sidebar {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 0.75rem;
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-post {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: linear-gradient(to right, #F0FDFA 0%, #FFFFFF 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #E5E7EB;
}

.recent-post:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.recent-post-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0D9488 0%, #14B8A6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    border-radius: 6px;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recent-post-date {
    font-size: 0.8rem;
    color: #636e72;
}

.recent-post-store {
    font-size: 0.8rem;
    color: #0D9488;
    font-weight: 500;
}

/* Recent Posts Section (Horizontal) */
.recent-posts-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.recent-posts-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 0.75rem;
}

.recent-posts-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.recent-post-horizontal {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.recent-post-horizontal:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recent-post-horizontal-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-post-horizontal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-horizontal-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0D9488 0%, #14B8A6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border-radius: 8px;
}

.recent-post-horizontal-content {
    flex: 1;
    min-width: 0;
}

.recent-post-horizontal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-horizontal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recent-post-horizontal-date {
    font-size: 0.85rem;
    color: #636e72;
}

.recent-post-horizontal-store {
    font-size: 0.85rem;
    color: #0D9488;
    font-weight: 500;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

/* News Article Cards */
.news-card {
    background: linear-gradient(to bottom, transparent 0%, #E6FFFA 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #E5E7EB;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.news-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #0D9488 0%, #14B8A6 100%);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-tag {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: #0D9488;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-tag.report {
    background: #0D9488;
}

.news-card-tag.guide {
    background: #0D9488;
}

.news-card-tag.blog {
    background: #0D9488;
}

.news-card-store {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    color: #1F2937;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.news-card-content {
    padding: 1.25rem;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-excerpt {
    font-size: 0.85rem;
    color: #636e72;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0;
    border-top: none;
}

.news-card-author {
    font-size: 0.85rem;
    color: #6B7280;
    font-weight: 500;
}

.news-card-date {
    font-size: 0.85rem;
    color: #6B7280;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-container .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.load-more-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* No Articles State */
.no-articles {
    text-align: center;
    padding: 4rem 2rem;
    color: #636e72;
}

.no-articles-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2d3436;
}

.no-articles p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Loading State */
.news-loading {
    text-align: center;
    padding: 3rem;
}

.news-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2d3436;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.news-loading p {
    color: #636e72;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 900px) {
    .news-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .news-sidebar {
        order: -1;
        position: static;
        padding: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .news-store-filter {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .store-filter-select {
        min-width: 250px;
    }
    
    .recent-posts-horizontal {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .recent-post-horizontal {
        padding: 1rem;
    }
    
    .recent-post-horizontal-image {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .news-header {
        padding: 2rem 0;
    }
    
    .news-header h1 {
        font-size: 2.5rem;
    }
    
    .news-header p {
        font-size: 1.1rem;
    }
    
    .news-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-card-image {
        height: 200px;
    }
    
    .news-card-content {
        padding: 1.25rem;
    }
    
    .news-card-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .news-header h1 {
        font-size: 2rem;
    }
    
    .news-header p {
        font-size: 1rem;
    }
    
    .news-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .news-tab {
        width: 200px;
        text-align: center;
    }
}

/* Animation for card loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.6s ease-out;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5) { animation-delay: 0.5s; }
.news-card:nth-child(6) { animation-delay: 0.6s; }
.news-card:nth-child(7) { animation-delay: 0.7s; }
.news-card:nth-child(8) { animation-delay: 0.8s; }
