/**
 * Journals Listing Page CSS (Improved)
 * With better filter states and animations
 */

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
    --primary-blue: #003d82;
    --primary-blue-dark: #002a5c;
    --primary-blue-light: #0052a3;
    --accent-blue: #0066cc;
    --bg-white: #ffffff;
    --bg-light-gray: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --border-color: #d0d0d0;
    --border-light: #e0e0e0;
}

/* =====================================================
   HARD RESET (SCOPED)
   ===================================================== */

.site-content .ast-container{
	display:block;
    max-width: 1580px;
    margin: 0 auto;
    padding: 0px;
}
.journals-listing-container,
.journals-listing-container * {
    box-sizing: border-box;
}

.journals-listing-container button,
.journals-listing-container input {
    all: unset;
    box-sizing: border-box;
    font-family: inherit;
}

.journals-listing-container button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* =====================================================
   BASE LAYOUT
   ===================================================== */
.journals-listing-container {
    max-width: 100%;
    margin: 0 auto;
    background-color: var(--bg-white);
}

/* =====================================================
   HEADER
   ===================================================== */
.journals-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: #fff;
    padding: 4rem 2rem;
}

.journals-header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.page-description {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 900px;
    opacity: 0.95;
}

/* =====================================================
   SEARCH SECTION
   ===================================================== */
.journals-search-section {
    background: #f7f8fa;
    padding: 2rem;
    border-bottom: 2px solid #e3e6ea;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto 1rem;
    display: flex;
    gap: 0.75rem;
}

.journals-listing-container .search-input {
    flex: 1;
    padding: 1rem 1.3rem;
    border: 2px solid #d0d5dd;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    transition: all 0.3s ease;
}

.journals-listing-container .search-input:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.1);
}

.journals-listing-container .search-button {
    padding: 1rem 1.5rem;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.journals-listing-container .search-button img {
    height: 20px;
    filter: invert(1);
}

.journals-listing-container .search-button:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.3);
}

/* Filter Status Bar */
.filter-status-bar {
    max-width: 1400px;
    margin: 0 auto;
}

.results-count {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.results-count #visible-count {
    font-weight: 700;
    color: var(--primary-blue);
}

.clear-filters-btn {
    width: 100%;
    margin-top: 1rem !important;
    padding: 0.8rem 1.2rem !important;
    background-color: #f3f4f6 !important;
    border: 2px solid #e5e7eb !important;
    color: #6b7280!important;
    border-radius: 6px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    justify-content: center !important;
}

.clear-filters-btn:hover {
    background-color: #e0e7ff !important;
    border-color: var(--primary-blue-light) !important;
    color: var(--primary-blue) !important;
    transform: translateY(-1px) !important;
}

/* =====================================================
   CONTENT GRID
   ===================================================== */
.journals-content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    padding: 2.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.journals-listing-container .journals-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.journals-listing-container .sidebar-callout {
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    border: 2px solid var(--primary-blue-light);
    border-radius: 12px;
    padding: 1.8rem;
    margin-bottom: 2rem;
}

.journals-listing-container .sidebar-callout h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue-dark);
    margin-bottom: 0.8rem;
}

.journals-listing-container .sidebar-callout p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4b5563;
    margin-bottom: 1rem;
}

.journals-listing-container .btn-suggester {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.journals-listing-container .btn-suggester:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.3);
}

/* =====================================================
   FILTER GROUP
   ===================================================== */
.journals-listing-container .filter-group {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.journals-listing-container .filter-group h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-blue);
}

/* =====================================================
   ALPHABET FILTER (IMPROVED)
   ===================================================== */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.journals-listing-container .alphabet-btn {
    padding: 0.7rem 0.5rem !important;
    background-color: #f3f4f6 !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: #6b7280 !important;
    transition: all 0.25s ease !important;
}

.journals-listing-container .alphabet-btn:hover {
    background-color: #e0e7ff !important;
    border-color: var(--primary-blue-light) !important;
    color: var(--primary-blue) !important;
    transform: translateY(-2px) !important;
}

/* Active State */
.journals-listing-container .alphabet-btn.active {
    background-color: var(--primary-blue) !important;
    color: #fff !important;
    border-color: var(--primary-blue) !important;
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.3) !important;
}

/* =====================================================
   JOURNALS GRID
   ===================================================== */
.journals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.8rem;
}

.journals-listing-container .journal-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.journals-listing-container .journal-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 12px 28px rgba(0, 61, 130, 0.12);
}

.journals-listing-container .journal-card-inner {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.8rem;
}

/* =====================================================
   JOURNAL COVER
   ===================================================== */
.journal-cover {
    position: relative;
}

.cover-image,
.cover-placeholder {
    width: 140px;
    height: 180px;
    border-radius: 8px;
    object-fit: cover;
}

.cover-placeholder {
    background: linear-gradient(135deg, var(--primary-blue-light), var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 3.5rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 61, 130, 0.2);
}

/* =====================================================
   JOURNAL INFO
   ===================================================== */
.journal-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.journal-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.journal-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.journal-card-title a:hover {
    color: var(--primary-blue);
}

.journal-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #6b7280;
    margin: 0;
}

.journal-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.meta-detail {
    font-size: 0.9rem;
    color: #6b7280;
    padding: 0.3rem 0.7rem;
    background: #f9fafb;
    border-radius: 4px;
}

.meta-detail strong {
    color: var(--text-primary);
    font-weight: 600;
}

.open-access-tag {
    background: #d1fae5 !important;
    color: #065f46 !important;
    font-weight: 600 !important;
    padding: 0.3rem 0.8rem !important;
    border-radius: 4px !important;
}

.open-access-tag strong {
    color: #065f46 !important;
}

/* =====================================================
   NO RESULTS MESSAGE
   ===================================================== */
.no-results-message {
    text-align: center;
    padding: 4rem 2rem;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    margin-top: 2rem;
}

.no-results-message p {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.no-results-message .btn-primary {
    padding: 0.8rem 1.5rem;
    background: var(--primary-blue);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.no-results-message .btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
    font-size: 1.1rem;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.journals-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.journals-pagination a,
.journals-pagination span {
    padding: 0.7rem 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.journals-pagination .current,
.journals-pagination a:hover {
    background: var(--primary-blue);
    color: #fff;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 1200px) {
    .journals-content-wrapper {
        grid-template-columns: 260px 1fr;
        gap: 2rem;
        padding: 2rem;
    }
}

@media (max-width: 1024px) {
    .journals-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .journals-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }

    .journals-header {
        padding: 3rem 1.5rem;
    }

    .journals-search-section {
        padding: 1.5rem;
    }

    .search-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .journals-listing-container .search-button {
        width: 100%;
        justify-content: center;
    }

    .journal-card-inner {
        grid-template-columns: 100px 1fr;
        gap: 1.2rem;
    }

    .cover-image,
    .cover-placeholder {
        width: 100px;
        height: 135px;
    }

    .alphabet-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.4rem;
    }

    .journals-listing-container .alphabet-btn {
        padding: 0.6rem 0.4rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    .journals-content-wrapper {
        padding: 1rem;
    }

    .journal-card-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .journal-cover {
        margin: 0 auto;
    }

    .alphabet-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.journal-card {
    animation: fadeIn 0.3s ease-out;
}