@import 'base.css';

/* ================================
   Page Header
   ================================ */

.page-header {
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    align-content: center;
    position: relative;
    height: 7rem;
}



.page-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

/* ================================
   Archive Filters
   ================================ */

.archive-filters {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(95, 87, 55, 0.1);
}

.archive-filters h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.archive-filters .form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.archive-filters .form-select {
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.archive-filters .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(95, 87, 55, 0.1);
    background: white;
}

/* Search Container */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(95, 87, 55, 0.1);
    background: white;
}

.search-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(95, 87, 55, 0.3);
}

/* ================================
   Archive Grid & Items
   ================================ */

.archive-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Divider */
.split {
    display: block;
    width: 80%;
    margin: 0 auto;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    opacity: 0.3;
}

/* ================================
   Latest Issue Content
   ================================ */

.latest-issue-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

/* ================================
   Issue Card
   ================================ */

.issue-card {
    background: var(--card-gradient);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(95, 87, 55, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.research-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


.issue-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(218, 165, 32, 0.15);
}

/* Issue Cover */
.issue-cover {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(95, 87, 55, 0.18);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    object-fit: cover;
    border: 2px solid rgba(218, 165, 32, 0.1);
}

.issue-cover:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 35px rgba(95, 87, 55, 0.25);
    border-color: rgba(218, 165, 32, 0.25);
}

/* Issue Info */
.issue-info h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.issue-date {
    color: #8B7355;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Download Button */
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #4a4229);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
    color: white;
    text-decoration: none;
        background: linear-gradient(180deg, #9b8036, #a58419);

}

.download-btn i,
.download-btn span {
    position: relative;
    z-index: 1;
}

.download-btn i {
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Issue Stats */
.issue-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(95, 87, 55, 0.1);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.3rem 0;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: #8B7355;
    font-weight: 500;
    font-size: 0.9rem;
}

.stat-value {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ================================
   Articles Section
   ================================ */

.articles-section h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(218, 165, 32, 0.2);
}

.articles-section h4 i {
    color: var(--gold-accent);
    font-size: 1.3rem;
}

/* Hero Content */
.hero-content {
    animation: fadeInLeft 1s ease-out;
}

/* Research Tabs */
.research-tabs {
    background: linear-gradient(160deg, #7a7258 0%, #6b644a 40%, #5f5737 100%);
    border-radius: 18px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    overflow-y: auto;
    height: 40em;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.06),
                0 10px 40px rgba(95, 87, 55, 0.2);
    border: 1px solid rgba(218, 165, 32, 0.15);
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
.research-tabs::-webkit-scrollbar {
    width: 6px;
}

.research-tabs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin: 10px 0;
}

.research-tabs::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-accent), var(--accent-color));
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.research-tabs::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e6b422, var(--gold-accent));
}

/* Firefox scrollbar */
.research-tabs {
    scrollbar-width: thin;
    scrollbar-color: var(--gold-accent) rgba(255, 255, 255, 0.05);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-content.active {
    display: block;
}

/* Research List */
.research-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.research-item {
    background: rgba(255, 255, 255, 0.07);
    padding: 16px 20px;
    border-radius: 12px;
    border-right: 4px solid var(--gold-accent);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: grid;
    grid-template-columns: 1fr minmax(140px, 180px) 44px;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.research-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.research-item:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(-6px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-right-color: #e6b422;
}

.research-item:hover::before {
    opacity: 1;
}

.research-item h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #fff;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    width: 85%;
}

.research-item .author {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    font-style: italic;
    position: relative;
    z-index: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    padding: 2px;
}

.research-item .z-2 {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.research-item .z-2 a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(218, 165, 32, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(218, 165, 32, 0.2);
}

.research-item .z-2 a:hover {
    background: var(--gold-accent);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
}

.research-item .z-2 a i {
    font-size: 0.85rem;
}

/* ================================
   Statistics Section
   ================================ */

.stat-card {
    padding: 2rem 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-number {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 1rem;
}

/* ================================
   No Results Message
   ================================ */

.no-results {
    padding: 4rem 2rem;
    text-align: center;
}

.no-results i {
    color: #6c757d;
    opacity: 0.5;
}

.no-results h4 {
    color: var(--text-color);
    margin: 1rem 0;
}

/* ================================
   Scroll to Top Button
   ================================ */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(95, 87, 55, 0.3);
}

/* ================================
   Animations
   ================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 992px) {
    .latest-issue-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .issue-cover {
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    .page-header {
        min-height: 200px;
        margin-top: 60px;
    }

    .page-title {
        font-size: 2rem;
    }

    .archive-filters {
        padding: 1.5rem;
    }

    .archive-filters h5 {
        font-size: 1.1rem;
    }

    .latest-issue-content {
        gap: 1.5rem;
    }

    .issue-card {
        padding: 1.5rem;
    }

    .articles-section h4 {
        font-size: 1.3rem;
    }

    .research-tabs {
        padding: 1rem;
        height: 30em;
    }

    .research-item {
        grid-template-columns: 1fr 120px 40px;
        gap: 0.5rem;
        padding: 14px 16px;
    }

    .search-container {
        border-radius: 25px;
    }

    .search-input {
        padding: 10px 45px 10px 15px;
        font-size: 0.9rem;
    }

    .search-btn {
        width: 35px;
        height: 35px;
    }

    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        min-height: 180px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .archive-filters .row > div {
        margin-bottom: 1rem;
    }

    .issue-info h3 {
        font-size: 1.2rem;
    }

    .articles-section h4 {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .research-tabs {
        height: 25em;
        padding: 0.85rem;
        border-radius: 14px;
    }

    .research-item h6 {
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .scroll-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}


/* Pagination Styles */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.custom-pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.custom-pagination .page-item {
    margin: 0;
}

.custom-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0.5rem 1rem;
    color: #8B4513;
    background-color: #fff;
    border: 2px solid #e0d4c8;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(139, 69, 19, 0.1);
}

.custom-pagination .page-link:hover {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: #fff;
    border-color: #8B4513;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 69, 19, 0.2);
}

.custom-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: #fff;
    border-color: #8B4513;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    transform: scale(1.05);
}

.custom-pagination .page-item.disabled .page-link {
    color: #ccc;
    background-color: #f8f9fa;
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.custom-pagination .page-item.disabled .page-link:hover {
    transform: none;
    background-color: #f8f9fa;
    color: #ccc;
}

.custom-pagination .page-link i {
    font-size: 0.85rem;
}

.pagination-info {
    text-align: center;
    font-size: 0.95rem;
    color: #6c757d;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Responsive Pagination */
@media (max-width: 576px) {
    .custom-pagination .page-link {
        min-width: 38px;
        height: 38px;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .custom-pagination {
        gap: 0.3rem;
    }

    .pagination-info {
        font-size: 0.85rem;
    }
}

/* Animation for pagination on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pagination-container {
    animation: fadeInUp 0.5s ease;
}
