/* ==========================================================================
   Articles Shared Styles & Grids
   ========================================================================== */

.latest-articles, .all-articles-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 5rem) clamp(1.2rem, 4vw, 2.5rem);
    position: relative;
    z-index: 3;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: var(--card-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(20, 23, 26, 0.08);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(233, 226, 205, 0.6);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
}

.article-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.article-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s var(--ease);
}

.article-card:hover .article-img {
    transform: scale(1.05);
}

/* Placeholders for when images aren't uploaded yet */
.placeholder-bg-1 { background: linear-gradient(135deg, var(--emerald), var(--emerald-deep)); }
.placeholder-bg-2 { background: linear-gradient(135deg, var(--ink-soft), var(--ink)); }
.placeholder-bg-3 { background: linear-gradient(135deg, var(--gold-light), var(--gold)); }

.article-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.article-category {
    background: rgba(15, 92, 76, 0.1);
    color: var(--emerald-deep);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
}

.article-content h4 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    color: var(--ink);
}

.article-content h4 a {
    transition: color 0.2s ease;
}

.article-content h4 a:hover {
    color: var(--emerald);
}

.article-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold);
    margin-top: auto;
    transition: color 0.2s ease;
}

.read-more .icon-arrow {
    width: 14px;
    height: 14px;
    transform: rotate(180deg); /* RTL fix */
    transition: transform 0.2s ease;
}

.read-more:hover {
    color: var(--emerald-deep);
}

.read-more:hover .icon-arrow {
    transform: rotate(180deg) translateX(4px);
}

.view-all-action {
    text-align: center;
}

/* ==========================================================================
   Single Article View Layout
   ========================================================================== */
.article-header {
    background: var(--ink);
    color: var(--text-on-dark);
    padding: clamp(3rem, 6vw, 5rem) clamp(1.2rem, 4vw, 2.5rem);
    text-align: center;
    position: relative;
}

.article-header h1 {
    max-width: 800px;
    margin: 1rem auto;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.3;
}

.article-meta-large {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: rgba(238, 240, 238, 0.7);
    font-size: 0.95rem;
    margin-top: 1.5rem;
}

.article-body {
    max-width: 800px;
    margin: -3rem auto 4rem;
    background: var(--card-white);
    padding: clamp(2rem, 5vw, 4rem);
    border-radius: 24px;
    box-shadow: var(--shadow-lift);
    position: relative;
    z-index: 10;
}

.article-body-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.article-text {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--ink-soft);
}

.article-text h2, .article-text h3 {
    color: var(--emerald-deep);
    margin: 2rem 0 1rem;
}

.article-text p {
    margin-bottom: 1.5rem;
}

.article-text blockquote {
    border-right: 4px solid var(--gold);
    padding-right: 1.5rem;
    margin: 2rem 0;
    font-family: var(--font-accent);
    font-size: 1.4rem;
    color: var(--emerald-deep);
}
