/* Newspaper Blog Styles */

.newspaper-theme {
    background-color: #f4f1ea;
    /* CSS noise pattern for paper texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    color: #1a1a1a;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    min-height: 100vh;
}

.newspaper-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
}

/* Masthead Styles */
.newspaper-header {
    border-bottom: 4px solid #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.masthead-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.masthead-left,
.masthead-right {
    flex: 1;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.masthead-left p,
.masthead-right p {
    margin: 0;
    line-height: 1.2;
}

.masthead-left .bold,
.masthead-right .bold {
    font-weight: 700;
}

.masthead-right {
    text-align: right;
}

.masthead-center {
    flex: 2;
    text-align: center;
}

.newspaper-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 4.5rem);
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.quill-logo {
    height: 1.3em;
    width: auto;
    object-fit: contain;
}

/* Navigation */
.newspaper-nav {
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    padding: 10px 0;
    margin-top: 10px;
    background-color: #1a1a1a;
}

.nav-links-newspaper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.nav-links-newspaper li a {
    color: #f4f1ea;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.nav-links-newspaper li a:hover {
    color: #d1c8b4;
}

.search-container input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #f4f1ea;
    color: #f4f1ea;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    padding: 5px;
    outline: none;
    width: 200px;
}

.search-container input::placeholder {
    color: #a8a090;
    font-style: italic;
}

/* Global Hamburger Menu Override for Blog */
.global-hamburger-container {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1000;
    /* Reset theme variables back to standard dark mode for the dropdown */
    --bg-color: #0b0c10;
    --text-color: #f4f4f5;
}

/* Hamburger icon is on beige background, so it must be dark ink */
.global-hamburger-container .hamburger {
    position: relative;
    z-index: 1001;
}

.global-hamburger-container .hamburger span {
    background-color: #1a1a1a;
}

/* When the menu opens, the background becomes dark, so the 'X' must be white */
.global-hamburger-container .hamburger.open span {
    background-color: #f4f4f5;
}

/* Ensure text inside the menu uses the dark theme colors and not the beige theme ones */
.global-hamburger-container .nav-links {
    color: var(--text-color);
}

.global-hamburger-container .nav-links a,
.global-hamburger-container .software-dropdown-btn span {
    color: var(--text-color);
}

/* Content Area */
.blog-main-newspaper {
    padding: 20px 0;
}

/* --- NEWSPAPER LAYOUT --- */
.front-page-top {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.hero-article-container a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hero-article-container a:hover h2 {
    text-decoration: underline;
}

.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border: 2px solid #1a1a1a;
    margin-bottom: 0.9375rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    line-height: 1;
}

.hero-meta {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.hero-snippet {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Sidebar */
.sidebar-header {
    border-top: 4px solid #1a1a1a;
    border-bottom: 2px solid #1a1a1a;
    padding: 5px 0;
    margin-bottom: 15px;
}

.sidebar-header h3 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.sidebar-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dotted #1a1a1a;
    text-decoration: none;
    color: inherit;
}

.sidebar-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-item:hover h4 {
    text-decoration: underline;
}

.sidebar-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.sidebar-item h4 {
    margin: 0 0 5px 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    line-height: 1.2;
}

.sidebar-item .meta {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
}

/* Categories Section */
.section-divider {
    height: 4px;
    background-color: #1a1a1a;
    margin: 40px 0 20px 0;
}

.category-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    text-transform: uppercase;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
}

.category-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border-top: 4px solid #1a1a1a;
    padding-top: 15px;
}

.blog-card:hover h2 {
    text-decoration: underline;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 2px solid #1a1a1a;
    margin-bottom: 15px;
}

.blog-card-meta {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.blog-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    line-height: 1.1;
}

.blog-card-subheading {
    font-size: 1rem;
    margin: 0 0 15px 0;
    line-height: 1.5;
    flex-grow: 1;
}

.newspaper-footer {
    border-top: 4px solid #1a1a1a;
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.newspaper-footer a {
    color: inherit;
    text-decoration: none;
}

.newspaper-footer a:hover {
    text-decoration: underline;
}

/* Media Queries for Mobile */
@media (max-width: 900px) {
    .front-page-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .masthead-top {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "title title"
            "left right";
        gap: 15px;
        align-items: end;
    }

    .masthead-center {
        grid-area: title;
        text-align: center;
        margin-bottom: 5px;
    }

    .masthead-left {
        grid-area: left;
        text-align: left;
    }

    .masthead-right {
        grid-area: right;
        text-align: right;
    }

    .newspaper-title {
        font-size: 2.2rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links-newspaper {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links-newspaper li:nth-child(3) {
        order: 10;
        margin-top: 10px;
    }
    
    .newspaper-nav {
        padding: 15px 0;
    }
    
    .search-container input {
        width: 100%;
        text-align: center;
    }
    
    .category-sections {
        grid-template-columns: 1fr;
    }
}