/* =========================================
   Global Post Variables & Resets
   ========================================= */
:root {
    --brand-red: #E31E24;
    --brand-dark: #0a0a0a;
    --text-dark: #222222;
    --text-muted: #555555;
    --bg-light: #ffffff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-light);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.post-container {
    max-width: 1560px;
    width: 95%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================
   Hero Banner Section
   ========================================= */
.post-hero-section {
    background-color: var(--brand-dark);
    color: #ffffff;
    padding: 100px 0 80px;
    overflow: hidden;
}

.hero-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    flex: 1.5;
    max-width: 800px;
}

/* Outline Text Effect - Subdued for elegance */
.outline-heading {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    margin: 0 0 15px 0;
    letter-spacing: 4px;
}

.hero-date {
    font-size: 0.95rem;
    font-weight: 500;
    color: #aaaaaa;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 30px 0;
    text-transform: uppercase;
    word-wrap: break-word;
}

.category-badge {
    display: inline-block;
    background-color: var(--brand-red);
    color: #ffffff;
    padding: 8px 28px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.featured-img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(227, 30, 36, 0.12);
    object-fit: cover;
}

/* =========================================
   Main Content & Sidebar Grid
   ========================================= */
.post-body-section {
    padding: 80px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 80px;
    align-items: start;
}

/* =========================================
   Rich Text Article Styling
   ========================================= */
.main-article {
    color: var(--text-dark);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Typography hierarchy inside the article */
.main-article h1, 
.main-article h2, 
.main-article h3, 
.main-article h4, 
.main-article h5 {
    color: #000000;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 1em;
}

.main-article h2 { font-size: 2.2rem; }
.main-article h3 { font-size: 1.75rem; }
.main-article h4 { font-size: 1.4rem; }

.main-article p {
    color: var(--text-muted);
    margin-bottom: 1.8em;
}

/* Links inside the article */
.main-article a {
    color: var(--brand-red);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

.main-article a:hover {
    color: #b3161c;
}

/* Lists */
.main-article ul, 
.main-article ol {
    margin-bottom: 1.8em;
    padding-left: 2em;
    color: var(--text-muted);
}

.main-article li {
    margin-bottom: 0.6em;
}

/* Blockquotes */
.main-article blockquote {
    border-left: 4px solid var(--brand-red);
    background-color: #f9f9f9;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    font-size: 1.2rem;
    color: #444;
    border-radius: 0 8px 8px 0;
}

.main-article blockquote p:last-child {
    margin-bottom: 0;
}

/* Images inside the rich editor */
.main-article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: block;
}

/* =========================================
   Sidebar Styling
   ========================================= */
.sidebar-widget {
    margin-bottom: 50px;
    background: #fdfdfd;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eeeeee;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0 0 25px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--brand-red);
    padding-bottom: 10px;
    display: inline-block;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    overflow: hidden;
    padding: 4px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

.search-form:focus-within {
    box-shadow: 0 0 0 2px rgba(227, 30, 36, 0.2);
    border-color: var(--brand-red);
}

.search-form input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 0.95rem;
    outline: none;
    background: transparent;
}

.search-form button {
    background-color: var(--brand-red);
    color: #ffffff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.search-form button:hover {
    background-color: #c2181f;
    transform: scale(1.05);
}

/* Recent Posts List */
.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.recent-post-item:hover {
    transform: translateX(5px);
}

.recent-post-item img {
    width: 75px;
    height: 75px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.recent-post-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.4;
    font-weight: 600;
    transition: color 0.3s ease;
}

.recent-post-item:hover .recent-post-info h4 {
    color: var(--brand-red);
}

/* =========================================
   Responsive Adjustments (Mobile Optimized)
   ========================================= */
@media (max-width: 991px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-grid {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .hero-content {
        max-width: 100%;
    }

    .hero-graphic {
        justify-content: center;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    /* Screen side spacing to keep text off display borders */
    .post-container {
        width: 100%;
        padding: 0 18px;
    }

    .post-hero-section {
        padding: 50px 0 40px;
    }

    .post-body-section {
        padding: 40px 0;
    }

    /* Hero Typography Adjustments */
    .outline-heading {
        font-size: 1.5rem;
        letter-spacing: 2px;
        margin-bottom: 8px;
    }

    .hero-date {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    
    .hero-title {
        font-size: 1.65rem;
        line-height: 1.3;
        margin-bottom: 20px;
    }

    .category-badge {
        padding: 6px 20px;
        font-size: 0.75rem;
    }

    /* Article Body Typography & Justification */
    .main-article {
        font-size: 0.98rem;
        line-height: 1.65;
    }

    .main-article p {
        text-align: justify; /* Justifies text on mobile for clean edges */
        text-justify: inter-word;
        font-size: 0.98rem;
        line-height: 1.65;
        margin-bottom: 1.4em;
    }

    .main-article h1 { font-size: 1.6rem; margin-top: 1.5em; margin-bottom: 0.8em; }
    .main-article h2 { font-size: 1.4rem; margin-top: 1.5em; margin-bottom: 0.8em; }
    .main-article h3 { font-size: 1.25rem; margin-top: 1.3em; margin-bottom: 0.6em; }
    .main-article h4 { font-size: 1.1rem; margin-top: 1.2em; margin-bottom: 0.5em; }

    .main-article ul, 
    .main-article ol {
        padding-left: 1.2em;
        margin-bottom: 1.4em;
    }

    .main-article blockquote {
        padding: 1rem 1.25rem;
        margin: 1.8rem 0;
        font-size: 1.05rem;
    }

    .main-article img {
        margin: 1.5rem 0;
        border-radius: 8px;
    }

    /* Sidebar adjustments */
    .sidebar-widget {
        padding: 20px;
        margin-bottom: 30px;
    }
}