/* Resources CSS (List, News, Show pages) */

.page-container {
    padding: 60px 35px;
    min-height: 80vh;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .page-container {
        padding: 100px 20px;
    }
}

.page-title,
.landing-title,
.article-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: left;
    color: var(--color-text-heading);
    background: none;
    -webkit-text-fill-color: initial;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .page-title,
    .landing-title,
    .article-title {
        font-size: 48px;
        margin-bottom: 30px;
        line-height: 1.1;
        letter-spacing: -1px;
    }
}

.section {
    padding: 60px 35px;
    max-width: 1200px;
    margin: 40px auto;
}

@media (min-width: 768px) {
    .section {
        padding: 80px 20px;
        margin: 60px auto;
    }
}

.section-title {
    font-size: 28px;
    color: var(--color-text-heading);
    margin-bottom: 50px;
    font-weight: 800;
    text-align: left;
}

/* List Items */
/* .list-section {
    padding: 40px 0;
} */

.list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (min-width: 768px) {
    .list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.list-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.list-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.list-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

@media (min-width: 768px) {
    .list-card img {
        height: 240px;
    }
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

@media (min-width: 768px) {
    .card-body {
        padding: 30px;
    }
}

.card-body .date {
    font-size: 13px;
    color: var(--color-primary);
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body h2,
.card-body h3 {
    font-size: 20px;
    margin: 0 0 15px 0;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text-heading);
}

.card-body h2 a,
.card-body h3 a {
    color: inherit;
}

.card-body h2 a:hover,
.card-body h3 a:hover {
    color: var(--color-primary);
}

.card-body p {
    color: var(--color-text-body);
    font-size: 15px;
    line-height: 1.7;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 60px;
}

.page-btn {
    padding: 10px 20px;
    background-color: var(--bg-section);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--color-text-heading);
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .page-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

.page-btn:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* Article Detail & Show Pages */
.article-detail,
.show-landing {
    background-color: #ffffff;
    border-radius: 30px;
    /* padding: 0; */
    margin-bottom: 60px;
    border: none;
    box-shadow: none;
}

.article-hero {
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
    box-shadow: var(--box-shadow);
}

@media (min-width: 768px) {
    .article-hero {
        margin-bottom: 50px;
        border-radius: 30px;
        height: 500px;
    }
}

.article-hero::after {
    display: none;
}

.article-hero .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-header {
    margin-bottom: 50px;
}

.landing-title,
.article-title {
    margin-top: 15px;
    margin-bottom: 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.tag {
    background-color: var(--bg-section);
    color: var(--color-primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.rich-text {
    color: var(--color-text-body);
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 50px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.rich-text p {
    margin-bottom: 25px;
    max-width: 100%;
    overflow-x: auto;
}

.rich-text h2, .rich-text h3 {
    color: var(--color-text-heading);
    margin: 50px 0 25px;
    font-weight: 800;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .action-buttons {
        flex-direction: row;
        gap: 20px;
        margin-top: 60px;
    }
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 18px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-secondary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.2);
}

.btn-secondary {
    background-color: var(--bg-section);
    color: var(--color-text-heading);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-3px);
}

/* Related Articles Section */
.related-articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 768px) {
    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .related-articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.related-article-card {
    background-color: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.related-article-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .related-article-image {
        height: 200px;
    }
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.related-article-card:hover .related-article-image img {
    transform: scale(1.05);
}

.related-article-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.related-article-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

@media (min-width: 768px) {
    .related-article-title {
        font-size: 20px;
    }
}

.related-article-title a {
    color: var(--color-text-heading);
    transition: var(--transition);
}

.related-article-title a:hover {
    color: var(--color-primary);
}

.related-article-date {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-article-summary {
    font-size: 14px;
    color: var(--color-text-body);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

@media (min-width: 768px) {
    .related-article-summary {
        font-size: 15px;
    }
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-read-more:hover {
    color: var(--color-secondary);
    transform: translateX(5px);
}

/* Improved Responsive Design for Show Page */
@media (max-width: 767px) {
    .show-landing {
        padding: 40px 20px;
    }

    .article-hero {
        height: 250px;
        border-radius: 15px;
    }

    .landing-title {
        font-size: 26px;
        line-height: 1.3;
    }

    .rich-text {
        font-size: 16px;
        line-height: 1.7;
    }

    .section-header {
        text-align: center;
    }

    .section-title {
        font-size: 24px;
        text-align: center;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .show-landing {
        padding: 60px 30px;
    }

    .article-hero {
        height: 400px;
    }

    .landing-title {
        font-size: 36px;
    }
}

/* Touch-friendly button sizes */
@media (max-width: 767px) {
    .btn-primary,
    .btn-secondary {
        padding: 16px 20px;
        font-size: 15px;
        min-height: 50px;
    }

    .action-buttons {
        gap: 12px;
    }
}

/* Improved mobile spacing */
@media (max-width: 767px) {
    .section {
        padding: 40px 20px;
        margin: 30px auto;
    }

    .article-header {
        margin-bottom: 30px;
    }

    .rich-text {
        margin-bottom: 30px;
    }
}