/*
Theme Name: The WordPress Times
Theme URI: https://www.techuguys.com
Author: Josh Anozie
Author URI: https://www.techuguys.com
Description: A clean, professional news and blog WordPress theme designed by TechUGuys.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-wordpress-times
Tags: blog, news, responsive, magazine, clean
*/

/* ===============================
   BASE RESET
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "treubuchet ms", "Georgia", "Times New Roman", serif;
    background-color: #f4f4f4;
    color: #111;
    line-height: 1.6;
}

/* ================= TOP BAR ================= */
.container-top-bar {
    background-color: #fff;
    max-width: 1200px;
    margin: 0 auto;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 13px;
}

/* LEFT */
.top-left {
    display: flex;
    gap: 12px;
}

/* CENTER */
.top-center {
    text-align: center;
    font-weight: 600;
    flex: 1;
}

/* RIGHT */
.top-right {
    color: #555;
    white-space: nowrap;
}

/* SOCIAL ICONS */
.social-icons a {
    color: #000 !important;
    text-decoration: none;
}

.social-icons a i {
    color: #000 !important;
}

/* MOBILE */
@media (max-width: 768px) {
    .top-bar-inner {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .top-center {
        order: 1;
    }

    .top-left {
        order: 2;
        justify-content: center;
    }

    .top-right {
        order: 3;
    }
}

/* ===============================
   SITE CONTAINER
================================ */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
}

/* ===============================
   HEADER
================================ */
.headerImg {
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}

/* ================= NAVBAR ================= */
.navbar {
    border-top: 3px solid #000;
    border-bottom: 3px solid #000;
    background: #fff;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px;
}

/* NAV LINKS (DESKTOP) */
.navbar-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.navbar-nav a {
    font-family: "Trebuchet MS", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin: 0 12px;
    text-decoration: none;
}

.navbar-nav a:hover,
.navbar-nav .current-menu-item>a {
    text-decoration: underline;
}

/* MENU BUTTON */
.nav-toggle {
    display: none;
    font-family: "Trebuchet MS", sans-serif;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 16px;
    border: 2px solid #000;
    background: #fff;
    cursor: pointer;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .navbar {
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
    }

    .nav-inner {
        text-align: center;
    }

    .nav-toggle {
        display: inline-block;
        margin: 5px auto;
    }

    .navbar-nav {
        display: none;
        flex-direction: column;
        align-items: center;
        margin-top: 10px;
    }

    .navbar-nav.show {
        display: flex;
    }

    .navbar-nav a {
        padding: 8px 0;
        margin: 0;
    }
}

/* ===============================
   MAIN LAYOUT
================================ */
.content-area {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
}

/* ===============================
   POSTS GRID
================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-item {
    border-bottom: 1px solid #ddd;
    padding-bottom: 15px;
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 10px;
}

.news-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.news-description {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

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

.read-more {
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    color: #000;
}

/* ===============================
   SIDEBAR
================================ */
.ads-section {
    border-left: 1px solid #ddd;
    padding-left: 20px;
}

/* ===============================
   FOOTER
================================ */
.site-container3 {
    background-color: #000;
    color: #fff;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 10px 20px 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

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

.footer-divider {
    border: none;
    border-top: 1px solid #444;
    margin: 0 20px;
}

.footer-bottom {
    text-align: center;
    padding: 15px;
    font-size: 13px;
    color: #ccc;
}

/* ===============================
   MOBILE VIEW
================================ */
@media (max-width: 768px) {
    .content-area {
        grid-template-columns: 1fr;
    }

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

    .news-image {
        height: 220px;
    }

    .ads-section {
        border-left: none;
        padding-left: 0;
        margin-top: 30px;
    }

    .headerImg img {
        max-height: 60px;
    }
}

/* PAGINATION */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination {
    display: flex;
    gap: 15px;
}

.page-btn,
.page-numbers {
    background: #000;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.page-numbers.current {
    background: #333;
}



/* WORDPRESS CUSTOM LOGO FIX */
.custom-logo {
    max-height: 90px;
    width: auto;
}

.custom-logo-link img {
    max-height: 90px;
    width: auto;
}



/* WORDPRESS IMAGE SAFETY */
.news-image-frame img,
.news-description img,
article img {
    max-width: 100%;
    height: auto;
    display: block;
}





/* WORDPRESS IMAGE SAFETY */
.news-image-frame img,
.news-description img,
article img {
    max-width: 100%;
    height: auto;
    display: block;
}


@media (max-width: 768px) {
    .navbar-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar-nav li {
        margin: 8px 0;
    }
}


.navbar-nav .current-menu-item>a {
    text-decoration: underline;
}


.navbar-nav {
    width: 100%;
}


/* REMOVE MENU BULLETS (SAFETY RESET) */
.navbar-nav,
.navbar-nav li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links {
    list-style: none;

}


/* RESPONSIVE LOGO FIX */
.headerImg img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* MOBILE LOGO CONTROL */
@media (max-width: 768px) {
    .headerImg img {
        max-height: 60px;
        width: auto;
    }
}






/* ===============================
   COMMENTS
================================ */
.comments-area {
    margin-top: 40px;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    border-bottom: 1px solid #ddd;
    padding: 20px 0;
}

.comment-author {
    font-weight: bold;
}

.comment-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
}

.comment-content p {
    margin-bottom: 10px;
}

/* COMMENT FORM */
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    border-radius: 4px;
    font-family: inherit;
}

.comment-form input[type="submit"] {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-weight: bold;
    cursor: pointer;
}

.comment-form input[type="submit"]:hover {
    background: #222;
}



/* ===============================
   RELATED POSTS
================================ */
.related-posts {
    margin-top: 50px;
}

.related-posts h3 {
    margin-bottom: 20px;
    font-family: "Trebuchet MS", sans-serif;
}

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

.related-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.related-item h4 {
    font-size: 15px;
    color: #000;
}

/* MOBILE */
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .headerImg img {
        max-height: 60px;
    }
}



/* REMOVE UNDERLINE FROM CLICKABLE POST TITLES */
.news-title a,
.news-title a:visited {
    text-decoration: none;
    color: #000;
}

/* OPTIONAL: HOVER EFFECT (STILL SHOWS IT'S CLICKABLE) */
.news-title a:hover {
    text-decoration: underline;
}




.related-item a {
    text-decoration: none;
    color: #000;
}

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



.single-content a {
    text-decoration: none;
}

.single-content a:hover {
    text-decoration: underline;
}








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

.single-post {
    margin-bottom: 40px;
}

/* TITLE */
.single-title {
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 10px;
}

/* META */
.single-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
}

/* SHARE BUTTONS */
.single-share {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 20px;
}

.single-share a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
}

.single-share a:hover {
    color: #555;
}

/* FEATURED IMAGE */
.single-featured-image {
    margin-bottom: 25px;
}

.single-featured-image img {
    width: 100%;
    max-height: 420px;
    /* IMPORTANT: not too big */
    object-fit: cover;
    border-radius: 6px;
}

/* END OF NEW SINGLE */


/* NEW STUFF */


/* POST CONTENT TYPOGRAPHY */
.single-content {
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.8;
    color: #111;
}

.single-content p {
    margin-bottom: 1.4em;
}

.single-content h2,
.single-content h3,
.single-content h4 {
    margin: 1.6em 0 0.6em;
    line-height: 1.3;
}

.single-content ul,
.single-content ol {
    margin: 1em 0 1em 1.5em;
}

.single-content img {
    max-width: 100%;
    height: auto;
}

/* END OF NEW STUFF */


@media (max-width: 768px) {
    .single-title {
        font-size: 24px;
    }

    .single-content {
        font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        font-size: 16px;
    }
}





/* sidebar details */

/* ===============================
   SIDEBAR RECENT POSTS
================================ */
.sidebar-recent-posts {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sidebar-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.sidebar-post-content {
    flex: 1;
}

.sidebar-post-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    line-height: 1.4;
}

.sidebar-post-title:hover {
    text-decoration: underline;
}

.sidebar-post-meta {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

/* end of sidebar */







/* ===============================
   ADSENSE SAFETY & RESPONSIVENESS
================================ */

/* Global ad wrapper */
.twt-ad-wrap,
.twt-header-ad-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

/* Inner ad container */
.twt-ad-inner,
.twt-header-ad-inner {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

/* Force AdSense to respect container */
.twt-ad-wrap ins,
.twt-header-ad-wrap ins {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
}

/* Prevent viewport stretching
body {
    overflow-x: hidden;
} */

/* Mobile spacing 
@media (max-width: 768px) {
    .twt-ad-wrap,
    .twt-header-ad-wrap {
        margin: 20px 0;
    }
}


@media (max-width: 768px) {
    .twt-header-ad-wrap {
        margin-top: 15px;
    }
} */





/* =====================================
   MOBILE ONLY — HARD OVERFLOW LOCK
   (ThemeForest safe)
===================================== */

@media (max-width: 768px) {

    /* Lock viewport width */
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        position: relative;
    }

    /* Force all major containers to stay centered */
    .site-container,
    .content-area,
    .posts-grid,
    .news-item,
    .ads-section,
    header,
    main,
    footer {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Clamp images, buttons, embeds */
    img,
    iframe,
    video,
    embed,
    object,
    button,
    .read-more,
    a {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Defensive ad containment (even after inject) */
    .twt-ad-wrap,
    .twt-header-ad-wrap,
    .twt-ad-inner,
    .twt-header-ad-inner {
        max-width: 100%;
        overflow: hidden;
        position: relative;
        left: 0;
        right: 0;
    }

    /* Kill any injected fixed width */
    .twt-ad-wrap iframe,
    .twt-header-ad-wrap iframe,
    .twt-ad-wrap ins,
    .twt-header-ad-wrap ins {
        max-width: 100% !important;
        width: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }

    /* Absolute safeguard against horizontal scroll */
    body::before {
        content: '';
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        overflow-x: hidden;
    }
}













/* =====================================
   SINGLE POST — MOBILE HARD OVERFLOW LOCK
   (ThemeForest safe)
===================================== */

@media (max-width: 768px) {

    /* Lock viewport width */
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        position: relative;
    }

    /* Force single-post containers to stay centered */
    .single-wrapper,
    .single-content,
    .single-content-inner,
    .single-post,
    .single-featured-image,
    .related-posts,
    .single-meta,
    .single-share,
    .comment-list,
    .comment-form {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Clamp images, buttons, embeds inside single posts */
    .single-content-inner img,
    .single-content-inner iframe,
    .single-content-inner video,
    .single-content-inner embed,
    .single-content-inner object,
    .single-content-inner button,
    .single-content-inner a,
    .single-content-inner .read-more {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Defensive ad containment (single posts only) */
    .single-content-inner .twt-ad-wrap,
    .single-content-inner .twt-header-ad-wrap,
    .single-content-inner .twt-ad-inner,
    .single-content-inner .twt-header-ad-inner {
        max-width: 100%;
        overflow: hidden;
        position: relative;
        left: 0;
        right: 0;
    }

    /* Kill any injected fixed-width ads */
    .single-content-inner .twt-ad-wrap iframe,
    .single-content-inner .twt-header-ad-wrap iframe,
    .single-content-inner .twt-ad-wrap ins,
    .single-content-inner .twt-header-ad-wrap ins {
        max-width: 100% !important;
        width: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }

    /* Absolute safeguard against horizontal scroll */
    body::before {
        content: '';
        position: fixed;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        pointer-events: none;
        overflow-x: hidden;
    }
}






/* ==================================================
   SIDEBAR SEARCH BOX - PERFECT RESPONSIVE DESIGN
   ✅ Compact on desktop
   ✅ Short button on mobile
   ✅ Beautiful on all devices
================================================== */

/* Search Form Container */
.sidebar-box .search-form {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
    width: 100%;
}

/* Search Input Field */
.sidebar-box .search-field,
.sidebar-box input[type="search"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
    color: #333;
    line-height: 1.4;
}

/* Input Focus State */
.sidebar-box .search-field:focus,
.sidebar-box input[type="search"]:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* Placeholder Styling */
.sidebar-box .search-field::placeholder,
.sidebar-box input[type="search"]::placeholder {
    color: #999;
    font-size: 14px;
}

/* Search Button - COMPACT on Desktop */
.sidebar-box .search-submit,
.sidebar-box button[type="submit"] {
    padding: 10px 18px;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

/* Button Hover Effect */
.sidebar-box .search-submit:hover,
.sidebar-box button[type="submit"]:hover {
    background: #333;
    border-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Button Active/Click State */
.sidebar-box .search-submit:active,
.sidebar-box button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Remove default webkit search styles */
.sidebar-box input[type="search"]::-webkit-search-decoration,
.sidebar-box input[type="search"]::-webkit-search-cancel-button,
.sidebar-box input[type="search"]::-webkit-search-results-button,
.sidebar-box input[type="search"]::-webkit-search-results-decoration {
    display: none;
}

/* ===================================
   MOBILE RESPONSIVE - SHORT BUTTON
=================================== */
@media (max-width: 768px) {

    /* Keep horizontal layout on mobile */
    .sidebar-box .search-form {
        gap: 6px;
        flex-direction: row;
        /* Keep side by side */
    }

    /* Input takes most space */
    .sidebar-box .search-field,
    .sidebar-box input[type="search"] {
        flex: 1;
        min-width: 0;
        /* Allow shrinking */
        padding: 11px 12px;
        font-size: 14px;
    }

    /* Button SHORT and compact on mobile */
    .sidebar-box .search-submit,
    .sidebar-box button[type="submit"] {
        padding: 11px 16px;
        /* Shorter width */
        font-size: 13px;
        flex-shrink: 0;
        width: auto;
        /* NOT full width */
    }
}

/* Extra small phones */
@media (max-width: 480px) {

    .sidebar-box .search-form {
        gap: 5px;
    }

    /* Even more compact on tiny screens */
    .sidebar-box .search-field,
    .sidebar-box input[type="search"] {
        padding: 10px;
        font-size: 13px;
    }

    .sidebar-box .search-submit,
    .sidebar-box button[type="submit"] {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ===================================
   TABLET (Medium screens)
=================================== */
@media (min-width: 769px) and (max-width: 1024px) {

    .sidebar-box .search-field,
    .sidebar-box input[type="search"] {
        padding: 10px 12px;
        font-size: 14px;
    }

    .sidebar-box .search-submit,
    .sidebar-box button[type="submit"] {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* ===================================
   DESKTOP (Large screens)
=================================== */
@media (min-width: 1025px) {

    /* Moderate size on desktop */
    .sidebar-box .search-field,
    .sidebar-box input[type="search"] {
        padding: 10px 12px;
        font-size: 14px;
    }

    .sidebar-box .search-submit,
    .sidebar-box button[type="submit"] {
        padding: 10px 18px;
        font-size: 14px;
    }
}


/* ===================================
   OPTIONAL: ICON BUTTON VERSION
   (Use if you want icon instead of text)
=================================== */

/* Icon button - even more compact */
.sidebar-box .search-submit.icon-btn,
.sidebar-box button[type="submit"].icon-btn {
    padding: 10px 12px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-box .search-submit.icon-btn i,
.sidebar-box button[type="submit"].icon-btn i {
    font-size: 14px;
    margin: 0;
}

/* Mobile icon button */
@media (max-width: 768px) {

    .sidebar-box .search-submit.icon-btn,
    .sidebar-box button[type="submit"].icon-btn {
        padding: 11px 12px;
        min-width: 44px;
    }
}


/* ===================================
   ACCESSIBILITY IMPROVEMENTS
=================================== */

/* Better focus visibility */
.sidebar-box .search-field:focus,
.sidebar-box input[type="search"]:focus {
    border-color: #000;
    outline: 2px solid transparent;
}

.sidebar-box .search-submit:focus,
.sidebar-box button[type="submit"]:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Remove spinner from number inputs (if any) */
.sidebar-box input[type="search"]::-webkit-inner-spin-button,
.sidebar-box input[type="search"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}