/*
 * Shared styles for the Pixel Exploits blog.
 * The palette and typography are inspired by modern tech sites: deep blues for
 * strength and stability and light neutrals for contrast. We use flexible
 * layouts (Flexbox and Grid) to ensure the site works well on small and large
 * screens. Colours and sizing are defined in CSS variables for easy
 * maintenance.
 */

/* Reset margins and paddings */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
    color: #222;
}

/* Layout container for consistent horizontal padding */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header styling */
header {
    background-color: #0d3b66;
    color: #ffffff;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.75;
}

/* Hero section */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Latest posts */
.latest-posts {
    margin-top: 3rem;
}

.latest-posts h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 600;
    color: #0d3b66;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.post-card {
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 1rem;
}

.post-category {
    display: inline-block;
    background-color: #0d3b66;
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.post-card-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #0d3b66;
}

.post-meta {
    font-size: 0.75rem;
    color: #555555;
    margin-bottom: 0.75rem;
}

.post-excerpt {
    font-size: 0.9rem;
    color: #444444;
    line-height: 1.4;
}

/* Footer */
footer {
    background-color: #0d3b66;
    color: #ffffff;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-container p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.social-links {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #ffffff;
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

.social-links a:hover {
    opacity: 0.7;
}

/* Article page */
.article-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 50vh;
    display: flex;
    align-items: flex-end;
    color: #ffffff;
}

.article-hero-content {
    position: relative;
    z-index: 1;
    padding-bottom: 2rem;
}

.article-hero-content h1 {
    font-size: 2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.article-hero-content .post-category {
    background-color: #e6b800;
    /* golden accent for variety */
    color: #0d3b66;
    margin-bottom: 0.5rem;
}

.article-body-wrapper {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    align-items: flex-start;
}

.share-fixed {
    position: sticky;
    top: 120px;
    align-self: flex-start;
}

.share-fixed ul {
    list-style: none;
}

.share-fixed li {
    margin-bottom: 1rem;
}

.share-fixed a {
    color: #0d3b66;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.share-fixed a:hover {
    color: #112a50;
}

.article-content {
    flex: 1;
    max-width: 700px;
    font-size: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.article-content strong {
    font-weight: 600;
}

/* Related posts */
.related-posts {
    margin-top: 4rem;
    padding: 3rem 0;
    background-color: #f4f4f4;
}

.related-posts h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.6rem;
    color: #0d3b66;
}

/* Smaller cards inside related posts have reduced height */
.post-card.small img {
    height: 150px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        height: 50vh;
    }
    .article-hero {
        height: 40vh;
        align-items: center;
        text-align: center;
    }
    .article-body-wrapper {
        flex-direction: column;
    }
    .share-fixed {
        position: static;
        display: flex;
        justify-content: center;
        margin-bottom: 1rem;
    }
    .share-fixed ul {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
    }
}