/* ================================================
   CONTEXTURA.WORLD — Condia-inspired redesign
   Garamond font, clean article layout
   ================================================ */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600&display=swap');

/* --- GLOBAL --- */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
}

/* --- TOP ANNOUNCEMENT BAR --- */
body::before {
    content: "CONTEXTURA.WORLD — THE UNDILUTED STORY";
    display: block;
    background: #003DA5;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-align: center;
    padding: 8px 0;
}

/* --- HEADER --- */
#header {
    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;
    padding: 16px 32px;
    margin: 0 !important;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

#header h1 {
    margin: 0;
    padding: 0;
}

#header h1 a.logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

#header h1 a.logo strong {
    font-family: 'EB Garamond', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #003DA5;
    letter-spacing: -0.5px;
    display: block;
    line-height: 1;
}

#header h1 a.logo .slogan {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #008751;
    display: block;
    margin-top: 3px;
}

/* --- SIDEBAR NAVIGATION --- */
#sidebar {
    background: #ffffff;
    border-right: 1px solid #f0f0f0;
}

#sidebar .inner {
    padding: 24px 20px;
}

#sidebar nav#menu header.major h2 {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #999;
    border-bottom: 2px solid #CF101A;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

#sidebar nav#menu ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

#sidebar nav#menu ul li {
    border-bottom: 1px solid #f5f5f5;
}

#sidebar nav#menu ul li a {
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1a1a1a;
    padding: 12px 0;
    display: block;
    text-decoration: none;
    transition: color 0.15s;
}

#sidebar nav#menu ul li a:hover {
    color: #CF101A;
    background: transparent;
}

/* --- TOGGLE BUTTON --- */
a.toggle {
    background: #003DA5 !important;
    border-radius: 0 !important;
    top: 80px !important;
}

/* --- MAIN CONTENT AREA --- */
#main {
    background: #ffffff;
}

#main .inner {
    padding: 40px 48px;
    max-width: 860px;
}

/* --- PAGE/SECTION TITLE --- */
#main section header.main h1 {
    font-family: 'EB Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 2px solid #CF101A;
    padding-bottom: 12px;
    margin-bottom: 28px;
    letter-spacing: -0.5px;
}

/* --- ARTICLE LIST CARDS (homepage/section pages) --- */
#main .posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

#main .posts article {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    padding: 0;
}

#main .posts article:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: #e0e0e0;
}

#main .posts article img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

#main .posts article .content-wrap {
    padding: 16px;
}

#main .posts article h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.35;
}

#main .posts article h2 a {
    color: #1a1a1a;
    text-decoration: none;
}

#main .posts article h2 a:hover {
    color: #CF101A;
}

#main .posts article .post-meta,
#main .posts article p.date {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

#main .posts article p {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 12px 0;
}

/* --- READ MORE BUTTON --- */
#main .posts article .button,
#main .posts article a.button {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: transparent;
    color: #CF101A;
    border: 1.5px solid #CF101A;
    padding: 7px 16px;
    border-radius: 2px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s;
    margin: 0 16px 16px;
}

#main .posts article .button:hover,
#main .posts article a.button:hover {
    background: #CF101A;
    color: #ffffff;
}

/* --- SINGLE ARTICLE PAGE --- */
#main section div h1 {
    font-family: 'EB Garamond', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

/* Article meta — category, author, date, read time */
#main .article-meta,
#main section .meta {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

/* Article hero image */
#main section div img:first-of-type {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 28px;
}

/* Article body text */
#main section div p {
    font-family: 'EB Garamond', serif;
    font-size: 1.18rem;
    line-height: 1.85;
    color: #2a2a2a;
    margin-bottom: 1.4em;
}

/* Article subheadings */
#main section div h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 2em 0 0.6em;
    letter-spacing: -0.3px;
}

#main section div h3 {
    font-family: 'EB Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 1.5em 0 0.5em;
}

/* Blockquote — pull quote style */
#main section div blockquote {
    border-left: 3px solid #CF101A;
    background: #fafafa;
    padding: 20px 28px;
    margin: 2em 0;
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.7;
    color: #333;
}

/* Category tag on article */
#main section div .category-tag,
#main .tag {
    display: inline-block;
    background: #003DA5;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 16px;
    text-decoration: none;
}

/* --- SOCIAL SHARE BAR --- */
.share-bar {
    display: flex;
    gap: 12px;
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.share-bar span {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
}

.share-bar a {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 2px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-twitter { background: #000000; color: #ffffff !important; }
.share-whatsapp { background: #25D366; color: #ffffff !important; }
.share-linkedin { background: #0077B5; color: #ffffff !important; }

/* --- FOOTER --- */
#footer {
    background: #003DA5;
    padding: 28px 32px;
    margin: 0 !important;
}

#footer .copyright {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    text-align: center;
}

#footer a { color: #CF101A; }

/* --- MOBILE --- */
@media (max-width: 736px) {
    #header {
        padding: 12px 16px;
    }

    #header h1 a.logo strong {
        font-size: 1.4rem;
    }

    #main .inner {
        padding: 24px 16px;
    }

    #main .posts {
        grid-template-columns: 1fr;
    }

    #main section div h1 {
        font-size: 1.7rem;
    }

    #main section div p {
        font-size: 1.05rem;
    }

    #main section div blockquote {
        padding: 14px 18px;
        font-size: 1.1rem;
    }

    .share-bar {
        flex-wrap: wrap;
    }
}