/**
 * AVSOPS News & Organization Tabs Styles
 *
 * @package AVSOPS
 * @version 1.0.0
 */

/* ==========================================================================
   Organization Tabs Navigation - Modern Card Style
   ========================================================================== */

.avsops-org-tabs {
    margin-bottom: 2rem;
    padding: 0;
    border-bottom: none;
}

.avsops-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: center;
}

.avsops-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    min-width: 160px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    color: #555;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.avsops-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    transition: background 0.25s ease;
}

.avsops-tab:hover {
    border-color: #005ea2;
    color: #005ea2;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,94,162,0.15);
}

.avsops-tab:hover::before {
    background: #005ea2;
}

.avsops-tab:focus {
    outline: none;
    border-color: #005ea2;
    box-shadow: 0 0 0 3px rgba(0,94,162,0.2);
}

.avsops-tab.active {
    background: linear-gradient(135deg, #005ea2 0%, #00395d 100%);
    border-color: #005ea2;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,94,162,0.35);
}

.avsops-tab.active::before {
    background: transparent;
}

.avsops-tab.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,94,162,0.4);
}

.avsops-tab.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.avsops-tab .tab-icon {
    font-size: 1.4rem;
    width: 1.4rem;
    height: 1.4rem;
    opacity: 0.85;
}

.avsops-tab.active .tab-icon {
    opacity: 1;
}

.avsops-tab .tab-label {
    white-space: nowrap;
}

.avsops-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #f0f2f5;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    transition: all 0.25s ease;
}

.avsops-tab:hover .tab-count {
    background: rgba(0,94,162,0.12);
    color: #005ea2;
}

.avsops-tab.active .tab-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}


/* ==========================================================================
   Tab Panels
   ========================================================================== */

.avsops-tab-panel {
    display: none;
    padding-top: 25px;
}

.avsops-tab-panel.active {
    display: block;
}

.avsops-tab-panel[hidden] {
    display: none !important;
}


/* ==========================================================================
   News Section Styles
   ========================================================================== */

.avsops-org-news-section {
    /* Container */
}

.avsops-news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.avsops-section-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.avsops-news-actions {
    display: flex;
    gap: 10px;
}


/* ==========================================================================
   Submit News Button
   ========================================================================== */

.avsops-submit-news-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #0073aa;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.avsops-submit-news-btn:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

.avsops-submit-news-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.avsops-submit-news-btn.avsops-login-required {
    background: #666;
}

.avsops-submit-news-btn.avsops-login-required:hover {
    background: #555;
}


/* ==========================================================================
   News List
   ========================================================================== */

.avsops-news-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.avsops-news-item {
    display: flex;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.avsops-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}


/* News Thumbnail */
.avsops-news-item .news-thumbnail {
    flex-shrink: 0;
    width: 150px;
}

.avsops-news-item .news-thumbnail img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.avsops-news-item .news-thumbnail a {
    display: block;
}


/* News Content */
.avsops-news-item .news-content {
    flex: 1;
    min-width: 0;
}

.avsops-news-item .news-header {
    margin-bottom: 10px;
}

.avsops-news-item .news-title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.avsops-news-item .news-title a {
    color: #333;
    text-decoration: none;
}

.avsops-news-item .news-title a:hover {
    color: #0073aa;
    text-decoration: underline;
}

.avsops-news-item .news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.avsops-news-item .news-meta > * {
    display: inline-flex;
    align-items: center;
}

.avsops-news-item .news-meta > *:not(:last-child)::after {
    content: "\2022";
    margin-left: 8px;
    color: #ccc;
}


/* News Excerpt */
.avsops-news-item .news-excerpt {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.avsops-news-item .news-excerpt p {
    margin: 0;
}


/* News Footer */
.avsops-news-item .news-footer {
    display: flex;
    gap: 15px;
    font-size: 13px;
}

.avsops-news-item .news-read-more,
.avsops-news-item .news-external-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.avsops-news-item .news-read-more:hover,
.avsops-news-item .news-external-link:hover {
    text-decoration: underline;
}

.avsops-news-item .news-external-link::after {
    content: "\2197";
    margin-left: 4px;
}


/* ==========================================================================
   No News State
   ========================================================================== */

.avsops-no-news {
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
}

.avsops-no-news p {
    margin: 0 0 10px 0;
    color: #666;
}

.avsops-no-news p:last-child {
    margin-bottom: 0;
}

.avsops-no-news a {
    color: #0073aa;
}


/* ==========================================================================
   News Pagination
   ========================================================================== */

.avsops-news-pagination {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.avsops-news-pagination .news-more-note {
    margin: 0;
    font-size: 13px;
    color: #666;
}


/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .avsops-tabs-nav {
        gap: 0.75rem;
        justify-content: stretch;
    }

    .avsops-tab {
        flex: 1 1 calc(50% - 0.75rem);
        min-width: 0;
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .avsops-tab .tab-icon {
        font-size: 1.2rem;
        width: 1.2rem;
        height: 1.2rem;
    }

    .avsops-news-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .avsops-news-item {
        flex-direction: column;
        gap: 15px;
    }

    .avsops-news-item .news-thumbnail {
        width: 100%;
    }

    .avsops-news-item .news-thumbnail img {
        height: 180px;
    }

    .avsops-news-item .news-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .avsops-tabs-nav {
        gap: 0.5rem;
    }

    .avsops-tab {
        flex: 1 1 100%;
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
        min-width: 100%;
    }

    .avsops-tab .tab-icon {
        display: none;
    }

    .avsops-tab .tab-count {
        min-width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .avsops-submit-news-btn {
        width: 100%;
        justify-content: center;
    }

    .avsops-news-actions {
        width: 100%;
    }
}
