/* Resources CSS (List, News, Show pages) */

.page-container {
    padding: 4rem 0;
    min-height: 60vh;
}

.page-title,
.landing-title,
.article-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #fff;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* List Items */
.list-section {
    padding: 2rem 0;
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.list-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.list-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-body .date {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.card-body h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.card-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: all 0.3s;
}

.page-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Article Detail */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
}

.article-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.article-content {
    color: #e2e8f0;
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    border-radius: 8px;
    margin: 2rem 0;
}

/* Show Landing */
.show-landing {
    max-width: 900px;
    margin: 0 auto;
}

.landing-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.landing-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: block;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.gallery-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-info {
    padding: 1.25rem;
}

.gallery-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.gallery-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
}

/* ===== Resources (show/list/news) Mobile - Tablet ===== */
@media (max-width: 768px) {
    .page-container {
        padding: 2rem 0;
    }

    /* Override inline-styled show landing padding & title */
    .show-landing[style] {
        padding-top: 2.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .show-landing > p {
        letter-spacing: 2px !important;
        font-size: 0.72rem !important;
    }

    .landing-title {
        font-size: 2rem !important;
        margin-bottom: 2rem !important;
    }

    .landing-content {
        margin-bottom: 2rem;
    }

    /* Override inline landing-content padding 2.5rem for mobile */
    .landing-content[style] {
        padding: 1.6rem !important;
    }

    /* Override inline CTA div inside show articles */
    .show-landing > div[style*="text-align: center; margin: 3rem 0"] {
        margin: 2rem 0 !important;
        padding: 1.8rem 1.2rem !important;
    }

    .show-landing > div[style*="text-align: center; margin: 3rem 0"] h3 {
        font-size: 1.35rem !important;
    }

    .show-landing > div[style*="text-align: center; margin: 3rem 0"] p {
        font-size: 0.95rem !important;
        margin-bottom: 1.3rem !important;
    }

    .article-detail {
        padding: 1.5rem;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.75;
    }

    .article-content p {
        margin-bottom: 1.2rem;
    }

    .gallery-section {
        padding: 3rem 0 !important;
    }

    .gallery-section > .container > p:first-child {
        letter-spacing: 2px !important;
        font-size: 0.72rem !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-card img {
        height: 150px;
    }

    .gallery-info {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 2rem !important;
    }

    .list-section {
        padding: 1.5rem 0;
    }

    .list-grid {
        gap: 1.2rem;
    }

    .card-body {
        padding: 1.2rem;
    }

    .card-body h2 {
        font-size: 1.15rem;
    }

    .page-title,
    .article-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
}

/* ===== Resources - Small Phone ===== */
@media (max-width: 480px) {
    .page-container {
        padding: 1.5rem 0;
    }

    .show-landing[style] {
        padding-top: 2rem !important;
        padding-bottom: 1rem !important;
    }

    .show-landing > p {
        letter-spacing: 1.8px !important;
        font-size: 0.68rem !important;
    }

    .landing-title {
        font-size: 1.65rem !important;
        margin-bottom: 1.6rem !important;
    }

    .landing-content[style] {
        padding: 1.3rem 1.1rem !important;
        border-radius: 3px !important;
    }

    .landing-content img {
        margin-bottom: 1rem !important;
        border-radius: 3px !important;
    }

    .show-landing > div[style*="text-align: center; margin: 3rem 0"] {
        margin: 1.8rem 0 !important;
        padding: 1.6rem 1rem !important;
    }

    .show-landing > div[style*="text-align: center; margin: 3rem 0"] p {
        font-size: 0.92rem !important;
        margin-bottom: 1.2rem !important;
    }

    .show-landing > div[style*="text-align: center; margin: 3rem 0"] h3 {
        font-size: 1.15rem !important;
        margin-bottom: 0.5rem !important;
    }

    .show-landing .btn-primary {
        padding: 0.85rem 1.6rem !important;
        font-size: 0.82rem !important;
        letter-spacing: 1px !important;
    }

    .article-detail {
        padding: 1.2rem 1rem;
    }

    .article-header {
        padding-bottom: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .article-content {
        font-size: 0.96rem;
    }

    .article-content img {
        margin: 1.5rem 0;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .gallery-card img {
        height: 200px;
    }

    .gallery-info {
        padding: 1rem 1.1rem;
    }

    .gallery-info h3 {
        font-size: 1.05rem;
    }

    .gallery-info p {
        font-size: 0.88rem;
    }

    .gallery-section {
        padding: 2.5rem 0 !important;
    }

    .section-title {
        font-size: 1.6rem !important;
        margin-bottom: 1.8rem !important;
    }

    .page-title,
    .article-title {
        font-size: 1.7rem;
        margin-bottom: 1.3rem;
    }

    .list-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
    }

    .card-body {
        padding: 1.1rem;
    }

    .pagination {
        gap: 0.6rem;
        margin-top: 2.2rem;
        flex-wrap: wrap;
    }

    .page-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.85rem;
    }
}

/* ===== Resources - Ultra-small Phone (380px) ===== */
@media (max-width: 380px) {
    .page-container {
        padding: 1.3rem 0;
    }

    .show-landing[style] {
        padding-top: 1.8rem !important;
    }

    .landing-title {
        font-size: 1.48rem !important;
        margin-bottom: 1.4rem !important;
    }

    .landing-content[style] {
        padding: 1.1rem 0.95rem !important;
    }

    .show-landing > div[style*="text-align: center; margin: 3rem 0"] {
        margin: 1.6rem 0 !important;
        padding: 1.4rem 0.9rem !important;
    }

    .show-landing > div[style*="text-align: center; margin: 3rem 0"] p {
        font-size: 0.88rem !important;
    }

    .show-landing > div[style*="text-align: center; margin: 3rem 0"] h3 {
        font-size: 1.05rem !important;
    }

    .show-landing .btn-primary {
        padding: 0.78rem 1.4rem !important;
        font-size: 0.78rem !important;
    }

    .article-detail {
        padding: 1rem 0.9rem;
    }

    .article-content {
        font-size: 0.92rem;
        line-height: 1.7;
    }

    .page-title,
    .article-title {
        font-size: 1.55rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-body h2 {
        font-size: 1.06rem;
    }

    .card-body p {
        font-size: 0.9rem;
    }

    .gallery-section {
        padding: 2.2rem 0 !important;
    }

    .gallery-info {
        padding: 0.9rem;
    }

    .gallery-info h3 {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.48rem !important;
        margin-bottom: 1.6rem !important;
    }
}