/**
 * FFL-BRO FNews - Public Styles
 * Version: 1.0.0
 * Customer-facing news display with BRO Theme standards
 */

/* =====================================================
   NEWS FEED - GRID LAYOUT
   ===================================================== */

.fflbro-fnews-feed {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fflbro-fnews-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* =====================================================
   ARTICLE CARDS - HOVER SLIDE WITH ORANGE BORDER
   ===================================================== */

.fflbro-fnews-article {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fflbro-fnews-article::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #FF6600;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.fflbro-fnews-article:hover {
    transform: translateX(8px);
    border-color: #FF6600;
    box-shadow: -4px 4px 12px rgba(255, 102, 0, 0.1);
}

.fflbro-fnews-article:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

/* =====================================================
   ARTICLE IMAGE
   ===================================================== */

.fflbro-fnews-article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.fflbro-fnews-article-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #999;
}

/* =====================================================
   ARTICLE CONTENT
   ===================================================== */

.fflbro-fnews-article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fflbro-fnews-article-category {
    display: inline-block;
    padding: 4px 12px;
    background: #E3F2FD;
    color: #1976D2;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
    margin-bottom: 12px;
    width: fit-content;
}

.fflbro-fnews-article-title {
    font-size: 18px;
    font-weight: 700;
    color: #1F3D66;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fflbro-fnews-article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fflbro-fnews-article-title a:hover {
    color: #FF6600;
}

.fflbro-fnews-article-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =====================================================
   ARTICLE META
   ===================================================== */

.fflbro-fnews-article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #999;
}

.fflbro-fnews-article-source {
    font-weight: 600;
    color: #2E5C99;
}

.fflbro-fnews-article-date {
    color: #999;
}

/* =====================================================
   READ MORE BUTTON
   ===================================================== */

.fflbro-fnews-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #FF6600;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: auto;
}

.fflbro-fnews-read-more:hover {
    background: #E55A00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
    color: #ffffff;
}

/* =====================================================
   FEED HEADER
   ===================================================== */

.fflbro-fnews-feed-header {
    background: linear-gradient(135deg, #2E5C99 0%, #1F3D66 100%);
    padding: 24px 30px;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fflbro-fnews-feed-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.fflbro-fnews-feed-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 6px;
}

/* =====================================================
   CATEGORY FILTER
   ===================================================== */

.fflbro-fnews-categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.fflbro-fnews-category-btn {
    padding: 8px 18px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fflbro-fnews-category-btn:hover,
.fflbro-fnews-category-btn.active {
    background: #2E5C99;
    border-color: #2E5C99;
    color: #ffffff;
}

/* =====================================================
   LIST LAYOUT
   ===================================================== */

.fflbro-fnews-feed-list .fflbro-fnews-article {
    display: flex;
    flex-direction: row;
    height: auto;
}

.fflbro-fnews-feed-list .fflbro-fnews-article-image {
    width: 280px;
    height: auto;
    min-height: 200px;
    flex-shrink: 0;
}

.fflbro-fnews-feed-list .fflbro-fnews-article-content {
    flex: 1;
}

/* =====================================================
   WIDGET SIDEBAR VERSION
   ===================================================== */

.fflbro-fnews-widget {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.fflbro-fnews-widget-header {
    background: linear-gradient(135deg, #2E5C99 0%, #1F3D66 100%);
    padding: 16px 20px;
    border-bottom: 3px solid #FF6600;
}

.fflbro-fnews-widget-title {
    color: #ffffff;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fflbro-fnews-widget-item {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.fflbro-fnews-widget-item:last-child {
    border-bottom: none;
}

.fflbro-fnews-widget-item:hover {
    background: #f9fafb;
}

.fflbro-fnews-widget-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1F3D66;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.fflbro-fnews-widget-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fflbro-fnews-widget-item-title a:hover {
    color: #FF6600;
}

.fflbro-fnews-widget-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #999;
    margin-top: 6px;
}

.fflbro-fnews-widget-item-source {
    font-weight: 600;
    color: #2E5C99;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */

.fflbro-fnews-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.fflbro-fnews-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.fflbro-fnews-empty-title {
    font-size: 20px;
    font-weight: 600;
    color: #666;
    margin: 0 0 8px 0;
}

.fflbro-fnews-empty-text {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* =====================================================
   LOADING STATE
   ===================================================== */

.fflbro-fnews-loading-container {
    text-align: center;
    padding: 60px 20px;
}

.fflbro-fnews-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(46, 92, 153, 0.2);
    border-top-color: #2E5C99;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.fflbro-fnews-loading-text {
    margin-top: 16px;
    color: #666;
    font-size: 14px;
}

/* =====================================================
   PAGINATION
   ===================================================== */

.fflbro-fnews-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.fflbro-fnews-page-btn {
    padding: 10px 18px;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fflbro-fnews-page-btn:hover {
    background: #2E5C99;
    border-color: #2E5C99;
    color: #ffffff;
}

.fflbro-fnews-page-btn.active {
    background: #FF6600;
    border-color: #FF6600;
    color: #ffffff;
}

.fflbro-fnews-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .fflbro-fnews-feed {
        padding: 12px;
    }
    
    .fflbro-fnews-feed-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .fflbro-fnews-feed-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .fflbro-fnews-feed-title {
        font-size: 22px;
    }
    
    .fflbro-fnews-article-image {
        height: 180px;
    }
    
    .fflbro-fnews-feed-list .fflbro-fnews-article {
        flex-direction: column;
    }
    
    .fflbro-fnews-feed-list .fflbro-fnews-article-image {
        width: 100%;
        height: 180px;
    }
    
    .fflbro-fnews-categories {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .fflbro-fnews-category-btn {
        font-size: 12px;
        padding: 6px 14px;
    }
}

@media (max-width: 480px) {
    .fflbro-fnews-article-title {
        font-size: 16px;
    }
    
    .fflbro-fnews-article-summary {
        font-size: 13px;
    }
    
    .fflbro-fnews-pagination {
        flex-wrap: wrap;
    }
}
