/* =========================================================================
   THE LAHORE TIMES — FRONT PAGE ONLY
   Loaded exclusively on the homepage via functions.php (is_front_page()),
   so nothing here can bleed into single posts.

   Every rule is scoped to .newspaper-container — no bare `img`, `h3`, etc.
   ========================================================================= */

.newspaper-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    font-family: "Georgia", "Times New Roman", serif;
    color: #111;
}

/* Accessible H1 (visible masthead stays the site logo) */
.newspaper-container .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

/* ---- Masthead meta bar ---- */
.newspaper-header {
    text-align: center;
    margin-bottom: 10px;
}
.newspaper-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    border-top: 2px solid #111;
    border-bottom: 1px solid #111;
    padding: 6px 0;
    margin-top: 10px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* ---- Section titles ---- */
.newspaper-container .section-title {
    font-size: 16px;
    text-transform: uppercase;
    border-bottom: 2px solid #111;
    padding-bottom: 4px;
    margin: 0 0 15px;
}
.newspaper-container .section-title a {
    color: #111;
    text-decoration: none;
}
.newspaper-container .section-title a:hover {
    text-decoration: underline;
}

/* =========================================================================
   TITLE OVERFLOW FIX
   min-width:0 on grid children + overflow-wrap stops long headlines from
   blowing out their boxes.
   ========================================================================= */
.newspaper-container article,
.newspaper-container .featured-card,
.newspaper-container .category-card,
.newspaper-container .newspaper-main,
.newspaper-container .newspaper-sidebar {
    min-width: 0;
}
.newspaper-container h2,
.newspaper-container h3,
.newspaper-container h4,
.newspaper-container p,
.newspaper-container a {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* =========================================================================
   UNCROPPED IMAGES
   aspect-ratio reserves the box (no CLS); object-fit: contain shows the
   whole image; the light background fills letterbox space.
   ========================================================================= */
.newspaper-container .featured-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f4f2ee;
}
.newspaper-container .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.newspaper-container .story-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;          /* fixed frame — can't outgrow the sidebar */
    overflow: hidden;
    background: #f4f2ee;
}
.newspaper-container .story-image a {
    display: block;
    width: 100%;
    height: 100%;
}
.newspaper-container .story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.newspaper-container .cat-primary-post img,
.newspaper-container .lhr-uncropped img {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: contain;
    background: #f4f2ee;
    display: block;
    margin-bottom: 8px;
    border-radius: 2px;
}

/* ---- Top Stories (featured tag) ---- */
.featured-tag-section { margin-bottom: 30px; }
.featured-tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.featured-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.featured-category {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: #111;
    color: #fff;
    font-size: 10px;
    text-transform: uppercase;
    padding: 3px 8px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.featured-content { padding: 12px; }
.featured-content h3 {
    font-size: 15px;
    line-height: 1.3;
    margin: 0 0 8px;
    font-family: "Georgia", "Times New Roman", serif;
}
.featured-content h3 a { color: #111; text-decoration: none; }
.featured-content h3 a:hover { color: #0056b3; text-decoration: underline; }
.featured-content p {
    font-size: 12px;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* ---- Lead story + sidebar grid ---- */
.newspaper-grid {
    display: grid;
    grid-template-columns: 2.7fr 1fr;
    gap: 30px;
}
.lead-story {
    border-bottom: 1px solid #ccc;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.lead-story h2 {
    font-size: 34px;
    line-height: 1.15;
    margin: 15px 0 10px;
}
.lead-story h2 a { color: #111; text-decoration: none; }
.lead-story h2 a:hover { text-decoration: underline; }

.newspaper-sidebar {
    border-left: 1px solid #ccc;
    padding-left: 20px;
}
.newspaper-sidebar ul { list-style: none; padding: 0; margin: 0 0 25px; }
.newspaper-sidebar li {
    border-bottom: 1px dotted #ccc;
    padding: 8px 0;
    font-size: 14px;
}
.newspaper-sidebar li a { color: #111; text-decoration: none; font-weight: bold; }
.newspaper-sidebar li a:hover { text-decoration: underline; }
.story-date { display: block; font-size: 11px; color: #666; }

/* ---- Category sections grid ---- */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 3px double #111;
}
.category-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 15px;
}
.cat-primary-post h3 {
    font-size: 16px;
    line-height: 1.3;
    margin: 5px 0 10px;
    font-family: "Georgia", "Times New Roman", serif;
}
.cat-primary-post h3 a { color: #111; text-decoration: none; }
.cat-secondary-post {
    border-top: 1px dotted #ccc;
    padding-top: 6px;
    margin-top: 6px;
}
.cat-secondary-post h4 {
    font-size: 13px;
    margin: 0;
    line-height: 1.3;
    font-weight: normal;
}
.cat-secondary-post h4 a { color: #333; text-decoration: none; }
.cat-primary-post h3 a:hover,
.cat-secondary-post h4 a:hover { text-decoration: underline; color: #0056b3; }
.no-posts { font-size: 12px; color: #777; font-style: italic; }

/* ---- Responsive ---- */
@media (max-width: 992px) {
    .sections-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .newspaper-grid { grid-template-columns: 1fr; }
    .newspaper-sidebar {
        border-left: none;
        border-top: 2px solid #111;
        padding-left: 0;
        padding-top: 20px;
    }
    .featured-tag-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .sections-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .featured-tag-grid { grid-template-columns: 1fr; }
}