/* ============================================================
   Linguascope Blog — Stylesheet
   Brand colours: yellow #FFE500 | green #186533 | orange #e85c00
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@400;500;700&display=swap');

:root {
    --yellow:  #FFE500;
    --green:   #186533;
    --orange:  #e85c00;
    --white:   #ffffff;
    --ink:     #1a1a1a;
    --muted:   #555;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.06);
    --card-hover-shadow: 0 8px 24px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    background-color: var(--yellow);
    font-family: 'DM Sans', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────────────────── */

#header {
    background-color: var(--white);
    border-bottom: 4px solid var(--yellow);
    padding: 16px 0;
}

#header_content {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

#header img {
    max-height: 60px;
    width: auto;
}

#header p {
    margin: 0;
    padding: 0;
    font-family: 'Lora', serif;
    font-style: italic;
    color: var(--muted);
    font-size: 1rem;
}

/* ── Menu / Nav ─────────────────────────────────────────── */

#menu {
    background-color: var(--green);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#menu nav {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 0;
}

#menu a, #menu a:visited {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 14px 18px;
    display: inline-block;
    border-bottom: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

#menu a:hover {
    background-color: rgba(255,255,255,0.1);
    border-bottom-color: var(--yellow);
}

/* ── Content wrapper ────────────────────────────────────── */

#content_holder {
    min-height: calc(100vh - 180px);
    background-color: var(--yellow);
    padding-bottom: 80px;
}

/* ── Loading state ──────────────────────────────────────── */

.loading {
    text-align: center;
    padding: 80px 20px;
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--green);
    opacity: 0.8;
}

/* ── Article grid list ──────────────────────────────────── */

#article_list {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 0;
}

#article_list h2.section-title {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    font-weight: 400;
    font-style: italic;
    color: var(--green);
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(24,101,51,0.2);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ── Individual card ────────────────────────────────────── */

.article {
    background-color: var(--white);
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

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

.article-thumb {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    display: block;
}

.article-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article_date {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 8px;
}

.article h3 {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 6px 0;
    padding: 0;
}

.article h3 a,
.article h3 a:hover,
.article h3 a:visited,
.article h3 a:link {
    color: var(--ink);
    text-decoration: none;
}

.article h3 a:hover {
    color: var(--green);
}

.article h4 {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    margin: 0 0 10px 0;
    padding: 0;
}

.article p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--muted);
    margin: 0 0 16px 0;
    flex: 1;
}

.article button {
    align-self: flex-start;
    background-color: var(--orange);
    color: var(--white);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 8px 16px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: auto;
}

.article button:hover {
    background-color: #c04d00;
    transform: translateX(2px);
}

/* ── Article full view ──────────────────────────────────── */

#article_view {
    width: 90%;
    max-width: 780px;
    margin: 36px auto 0;
    background-color: var(--white);
    box-shadow: var(--card-shadow);
    overflow: auto;
}

#article_header {
    padding: 0;
}

#article_header img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.article-header-text {
    padding: 28px 36px 20px;
    border-bottom: 2px solid var(--yellow);
}

.article-header-text h2 {
    font-family: 'Lora', serif;
    font-size: 1.9rem;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 10px 0;
    color: var(--ink);
}

.article-header-text h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    margin: 0;
}

#article_content {
    padding: 28px 36px 40px;
    font-family: 'Lora', serif;
    font-size: 1rem;
    line-height: 1.75;
    color: #222;
}

#blogcontent p {
    margin: 0 0 1.2em 0;
    padding: 0;
}

#blogcontent img {
    max-width: 100%;
    height: auto;
    margin: 24px 0;
}

#blogcontent img.img_left {
    float: left;
    margin: 0 24px 24px 0;
    max-width: 45%;
}

#blogcontent h2, #blogcontent h3, #blogcontent h4 {
    clear: both;
    font-family: 'DM Sans', sans-serif;
    color: var(--green);
}

.image_div {
    margin-bottom: 32px;
}

.iframe_div {
    margin: 32px 0;
}

/* ── Back / toolbar ─────────────────────────────────────── */

.article-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 36px;
    background: var(--green);
}

.article-toolbar button,
.article-toolbar a {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 16px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
    display: inline-block;
}

.article-toolbar button:hover,
.article-toolbar a:hover {
    border-color: var(--yellow);
    background: rgba(255,229,0,0.1);
    color: var(--yellow);
}

.article-toolbar .share-link {
    margin-left: auto;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.04em;
    cursor: pointer;
    user-select: all;
    background: rgba(0,0,0,0.2);
    padding: 6px 12px;
    border: 1px dashed rgba(255,255,255,0.3);
    transition: color 0.15s;
}

.article-toolbar .share-link:hover {
    color: var(--yellow);
}

/* ── Footer ─────────────────────────────────────────────── */

#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background-color: var(--green);
    color: var(--white);
    display: flex;
    align-items: center;
    z-index: 90;
}

#footer p {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.78rem;
    opacity: 0.8;
    padding: 0;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 600px) {
    #header_content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    #article_view {
        width: 100%;
        margin: 0;
    }

    .article-header-text,
    #article_content,
    .article-toolbar {
        padding-left: 20px;
        padding-right: 20px;
    }

    .article-header-text h2 {
        font-size: 1.4rem;
    }
}
