/*
Theme Name: The Public Lens
Author: The Public Lens
Description: Lightweight responsive Hindi news magazine theme.
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: the-public-lens
*/

:root {
    --red: #e30613;
    --dark: #252525;
    --black: #111111;
    --border: #e8e8e8;
    --light: #f3f3f3;
    --text: #202020;
    --max: 1200px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: #fff;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: min(calc(100% - 32px), var(--max));
    margin: 0 auto;
}

/* =========================
   TOP BAR
========================= */

.tpl-topbar {
    background: var(--black);
    color: #ddd;
    font-size: 13px;
}

.tpl-topbar-inner {
    min-height: 34px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tpl-social {
    display: flex;
    gap: 14px;
}

.tpl-social a {
    color: #fff;
    text-decoration: none;
}

/* =========================
   HEADER
========================= */

.tpl-header {
    background: var(--dark);
    color: #fff;
}

.tpl-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-title {
    font-size: 25px;
    font-weight: 800;
    text-decoration: none;
}

.custom-logo {
    max-height: 64px;
    width: auto;
}

/* =========================
   SEARCH
========================= */

.tpl-search {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.tpl-search input {
    width: 280px;
    height: 50px;
    padding: 0 15px;
    border: 0;
    outline: none;
    font-size: 16px;
}

.tpl-search button {
    height: 50px;
    border: 0;
    background: var(--red);
    color: #fff;
    padding: 0 20px;
    font-size: 16px;
    cursor: pointer;
}

.tpl-menu-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 0;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* =========================
   MAIN NAVIGATION
========================= */

.tpl-main-nav {
    background: var(--dark);
}

.tpl-main-nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    overflow-x: auto;
}

.tpl-main-nav .menu li {
    margin: 0;
    padding: 0;
}

.tpl-main-nav .menu li a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 14px 17px;
    font-weight: 700;
    font-size: 17px;
    white-space: nowrap;
}

.tpl-main-nav .menu li a:hover {
    background: var(--red);
}

/* =========================
   BREAKING NEWS
========================= */

.tpl-breaking {
    background: #f3f3f3;
    border-bottom: 1px solid var(--border);
}

.tpl-breaking-inner {
    display: flex;
    min-height: 58px;
    align-items: center;
    overflow: hidden;
}

.tpl-breaking-label {
    background: var(--red);
    color: #fff;
    padding: 12px 20px;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 800;
}

.tpl-breaking-list {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 18px;
}

.tpl-breaking-list a {
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
}

/* =========================
   MAIN CONTENT
========================= */

.tpl-main {
    padding: 28px 0 50px;
}

.tpl-section-title,
.tpl-archive-title {
    border-left: 5px solid var(--red);
    padding-left: 12px;
}

/* =========================
   HERO SECTION
========================= */

.tpl-hero {
    width: min(calc(100% - 32px), var(--max));
    max-width: var(--max);
    margin: 0 auto 30px;

    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 20px;

    align-items: stretch;
}

/* MAIN HERO */

.tpl-hero-main {
    position: relative;
    min-width: 0;
    height: 500px;
    overflow: hidden;
    background: #222;
    border: 1px solid var(--border);
}

.tpl-hero-main img {
    width: 100%;
    height: 500px;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

/* RIGHT HERO COLUMN */

.tpl-hero-side {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
}

/* RIGHT HERO ARTICLES */

.tpl-hero-side article {
    position: relative;
    min-width: 0;
    min-height: 240px;
    height: 240px;
    overflow: hidden;
    background: #222;
    border: 1px solid var(--border);
}

/* RIGHT HERO IMAGES */

.tpl-hero-side article img {
    width: 100%;
    height: 240px;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

/* HERO OVERLAY */

.tpl-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;

    padding: 35px 20px 20px;

    color: #fff;

    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0),
        rgba(0,0,0,.92)
    );
}

.tpl-hero-overlay h1,
.tpl-hero-overlay h2 {
    margin: 7px 0 0;
    line-height: 1.25;
}

.tpl-hero-overlay h1 {
    font-size: 36px;
}

.tpl-hero-overlay h2 {
    font-size: 23px;
}

.tpl-hero-overlay a {
    color: #fff;
    text-decoration: none;
}

.tpl-category {
    display: inline-block;
    background: var(--red);
    color: #fff;
    padding: 4px 9px;
    font-size: 13px;
    font-weight: 700;
}

/* =========================
   HOME LAYOUT
========================= */

.tpl-home-layout {
    width: min(calc(100% - 32px), var(--max));
    margin: 30px auto 0;

    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
    gap: 28px;
}

/* =========================
   NEWS GRID
========================= */

.tpl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.tpl-card {
    border: 1px solid var(--border);
    background: #fff;
    overflow: hidden;
}

.tpl-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.tpl-card-body {
    padding: 14px;
}

.tpl-card h3 {
    margin: 8px 0;
    line-height: 1.35;
}

.tpl-card h3 a {
    text-decoration: none;
}

.tpl-meta {
    font-size: 12px;
    color: #777;
}

/* =========================
   SIDEBAR
========================= */

.tpl-sidebar .widget {
    border: 1px solid var(--border);
    padding: 18px;
    margin-bottom: 20px;
    background: #fff;
}

.tpl-sidebar .widget-title {
    border-bottom: 2px solid var(--red);
    padding-bottom: 8px;
    margin-top: 0;
}

.tpl-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tpl-sidebar li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}

/* =========================
   SINGLE POST
========================= */

.tpl-post {
    max-width: 860px;
    margin: auto;
}

.tpl-post-title {
    font-size: 42px;
    line-height: 1.2;
}

.tpl-post-content {
    font-size: 18px;
}

.tpl-post-content p {
    margin-bottom: 18px;
}

.tpl-post-thumb {
    margin-bottom: 20px;
}

.tpl-share {
    display: flex;
    gap: 10px;
    margin: 28px 0;
}

.tpl-share a {
    background: var(--dark);
    color: #fff;
    padding: 8px 13px;
    text-decoration: none;
}

/* =========================
   PAGINATION
========================= */

.tpl-pagination {
    margin: 30px 0;
}

.tpl-pagination .page-numbers {
    display: inline-block;
    padding: 7px 11px;
    border: 1px solid var(--border);
    margin-right: 4px;
    text-decoration: none;
}

.tpl-pagination .current {
    background: var(--red);
    color: #fff;
}

/* =========================
   FOOTER
========================= */

.tpl-footer {
    background: #202020;
    color: #ddd;
    padding: 35px 0;
}

.tpl-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.tpl-footer a {
    color: #ddd;
    text-decoration: none;
}

.tpl-copy {
    border-top: 1px solid #444;
    margin-top: 25px;
    padding-top: 15px;
    font-size: 13px;
}

/* =========================
   TABLET
========================= */

@media (max-width: 992px) {

    .tpl-search {
        display: none;
    }

    .tpl-menu-toggle {
        display: block;
    }

    .tpl-main-nav {
        display: none;
    }

    .tpl-main-nav.is-open {
        display: block;
    }

    .tpl-main-nav .menu {
        display: block;
    }

    .tpl-main-nav .menu li a {
        border-bottom: 1px solid #444;
    }

    .tpl-hero {
        width: calc(100% - 24px);
        grid-template-columns: 1fr;
    }

    .tpl-hero-main {
        height: 420px;
    }

    .tpl-hero-main img {
        height: 420px;
    }

    .tpl-hero-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .tpl-hero-side article {
        height: 240px;
    }

    .tpl-hero-side article img {
        height: 240px;
    }

    .tpl-home-layout {
        width: calc(100% - 24px);
        grid-template-columns: 1fr;
    }

    .tpl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 640px) {

    .container {
        width: calc(100% - 20px);
    }

    .tpl-topbar-inner {
        padding: 0 10px;
    }

    .tpl-header-inner {
        min-height: 65px;
    }

    .tpl-breaking-inner {
        min-height: 48px;
    }

    .tpl-breaking-label {
        padding: 10px 12px;
        font-size: 15px;
    }

    .tpl-breaking-list {
        padding: 0 10px;
        gap: 18px;
    }

    .tpl-breaking-list a {
        font-size: 15px;
    }

    .tpl-hero {
        width: calc(100% - 20px);
        grid-template-columns: 1fr;
    }

    .tpl-hero-main {
        height: 280px;
    }

    .tpl-hero-main img {
        height: 280px;
    }

    .tpl-hero-overlay {
        padding: 30px 14px 14px;
    }

    .tpl-hero-overlay h1 {
        font-size: 25px;
    }

    .tpl-hero-overlay h2 {
        font-size: 20px;
    }

    .tpl-hero-side {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .tpl-hero-side article {
        height: 220px;
    }

    .tpl-hero-side article img {
        height: 220px;
    }

    .tpl-home-layout {
        width: calc(100% - 20px);
    }

    .tpl-grid {
        grid-template-columns: 1fr;
    }

    .tpl-footer-grid {
        grid-template-columns: 1fr;
    }

    .tpl-post-title {
        font-size: 30px;
    }
}