/* 
 Theme Name:   HindiKosh - Child Theme
 Theme URI:    
 Description:  
 Author:       Rajender Singh Bisht
 Author URI:   https://www.hindikosh.org
 Template:     hello-elementor
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

 /* == Add your own styles below this line ==
--------------------------------------------*/


html,
body{
width:100%;
overflow-x:hidden;
}

/* Archive, Category, Search, Tag Common Styles - Exact Purana Wala (No Changes, + Strong Fix for Full Titles) */
.container1 {
    width: 100vw;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Style for search header */
.search-header {
    background: #272727;
    margin-bottom: 48px;
    padding-top: 9px;
    padding-bottom: 9px;
    text-align: center;
    width: 100%;
}
.search-header .header-background {
    padding: 20px;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
.search-title {
    color: #fff;
    font-size: 2rem;
    margin: 0;
    padding: 10px 0;
}

/* Container2 ensures proper grid layout */
.container2 {
    max-width: 1120px;
    margin: auto;
    padding: 0;
}

/* Adjust padding for tablets */
@media (max-width: 768px) {
    .container2 {
        padding-left: 25px;
        padding-right: 25px;
    }
}

/* Adjust padding for mobile devices */
@media (max-width: 480px) {
    .container2 {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Grid layout styling */
.search-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0;
    margin: 0;
    width: 100%;
    grid-auto-rows: auto;
}

/* Responsive grid for smaller screens */
@media (max-width: 1024px) {
    .search-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .search-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .search-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.search-item {
    border: 1.5px solid #A6A6A6 !important;
    border-radius: 0;
    background: none !important; /* Force no background */
    text-align: left;
    padding: 0;
    transition: none;
}

.search-content {
    padding: 0;
}
.search-heading {
    font-size: 17px;
    margin-top: 5px;
    font-weight: bold;
    line-height: 1.4;    
    padding-bottom: 15px;
    text-align: left;
    margin-bottom: 0;
    color: #000;
    /* Strong Fix: Full text display, no truncation, exact like screenshot */
    white-space: normal !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    word-wrap: break-word !important;
    hyphens: auto !important;
    text-overflow: unset !important;
}
.search-heading h2 {
    margin: 0 !important;
    padding: 0 !important;
}
.no-results {
    text-align: center;
    font-size: 1.2em;
    margin-top: 20px;
}

/* Pagination Styling */
.pagination-container {
    text-align: center;
    margin-top: 30px;
    padding-bottom: 20px;
    display: flex;
    justify-content: center;
}
.pagination-container .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}
.pagination-container .page-numbers:hover,
.pagination-container .page-numbers.current {
    background: #005177;
}

/* Search Specific (If Needed - From Old search.php) */
@media (max-width: 768px) {
    .search-grid {
        grid-template-columns: repeat(1, 1fr); /* Single column layout */
        gap: 1px; /* Reduce gap between posts */
    }
    .search-item {
        padding: 10px; /* Reduce padding */
        margin-bottom: 10px; /* Decrease bottom margin */
    }
    .search-heading {
        text-align: center;
    }
}

#search-results .search-item {
    background: #333; /* Search specific */
    padding: 15px;
    padding-bottom: 0px;
    transition: all 0.3s ease-in-out;
}
#search-results .search-item:hover {
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}
#search-results .search-heading {
    padding-bottom: 10px;
    text-align: center;
}

/* Homepage Styles (Separate - No Conflict with Archives) */
#homepage {
    font-family: 'Roboto', sans-serif;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Exact Screenshot Style: Blue Bar with Over/Underline Black Lines */
.section-title {
    font-size: 20px;
    color: #fff;  /* White text */
    margin: 0 auto 30px;  /* Center and space below */
    text-align: center;
    font-weight: 700;  /* Bold */
    letter-spacing: 1px;
    position: relative;
    background: #004296;  /* Solid blue bar */
    padding: 15px 0;  /* Vertical padding for bar height */
    width: 100%;  /* Full width */
    border: none;
    border-radius: 0;  /* Straight edges */
    box-shadow: none;  /* No shadow for clean look */
    transition: background 0.3s ease;
    display: block;
}

/* Black Line Above the Bar */
.section-title::before {
    content: '';
    position: absolute;
    top: -2px;  /* Position above */
    left: 0;
    right: 0;
    height: 1px;  /* Thin black line */
    background: #000;  /* Black line */
    z-index: 1;
}

/* Black Line Below the Bar */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;  /* Position below */
    left: 0;
    right: 0;
    height: 1px;  /* Thin black line */
    background: #000;  /* Black line */
    z-index: 1;
}

/* Hover: Darker blue */
.section-title:hover {
    background: #02347e;
}

/* Top News Grid (3 columns on desktop, like screenshot) */
.top-stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Top Stories - Screenshot style */
.top-story {
    background: #f8f9fa;           /* Light background jaise screenshot */
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s;
    border: 1.5px solid #A6A6A6;
}

.top-story:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.story-content {
    padding: 0;
}

.story-content h3 {
    font-size: 19px;
    color: #004296;               /* Blue title jaise screenshot */
    margin: 0 0 12px 0;
    line-height: 1.6;
    font-weight: 700;
}

.story-excerpt {
    color: #333;
    line-height: 1.6;
    margin-bottom: 14px;
    font-size: 15px;
}

.read-more-btn {
    color: #004296;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* Purane image styles ko hide/remove kar sakte ho (optional) */
.story-image {
    display: none;
}

/* Text-only card style for all sections (Most Read, National, Recent) */
.text-only-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1.5px solid #A6A6A6;
    transition: box-shadow 0.3s ease, transform 0.2s;
}

.text-only-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.item-content h4,
.recent-item h4 {
    font-size: 18px;
    color: #004296;           /* Blue heading */
    margin: 0 0 12px 0;
    line-height: 1.6;
    font-weight: 700;
}

.card-excerpt {
    color: #444;
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 14px 0;
}

.read-more-btn {
    color: #004296;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
}

/* Hide all old image containers */
.story-image,
.item-image,
.recent-item .item-image {
    display: none !important;
}

/* Grid spacing thoda adjust (optional) */
.news-grid,
.hello-grid,
.recent-grid {
    gap: 22px;
}

/* Most Read News Grid (3 columns) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.news-item .item-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.item-content {
    padding: 10px;
}

.item-content h4 {
    font-size: 18px;
    line-height: 1.6;    
    margin: 0 0 5px;
    color: #000;
}

/* National News Grid (3 columns, thumbnails height fixed at 180px for consistency) */
.hello-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.hello-item .item-image img {
    width: 100%;
    height: 180px;  /* Explicitly set to match Weekly/Most Read for same size */
    object-fit: cover;
    border-radius: 8px;
}

/* Recent News Grid (3 columns, similar to others) */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.recent-item .item-content {
    padding: 10px;
}

.recent-item .item-category {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .top-stories-grid, .news-grid, .hello-grid, .recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-stories-grid, .news-grid, .hello-grid, .recent-grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 24px;
    }
}

/* Reduced spacing: Less top padding and no top margin on sections */
.top-news-section-one, .weekly-news-section, .hello-news-section, .recent-news-section {
    margin-bottom: 30px;  /* Reduced from 50px */
    padding: 5px 0 20px 0;  /* Reduced top padding from 20px to 10px */
    margin-top: 0;  /* Explicitly no top margin to reduce space above sections */
}

.top-news-section-one {
    margin-top: 36px;  /* Explicitly no top margin to reduce space above sections */
}

/* Single Post Styles */
.single-post-container {
    max-width: 760px;
    margin: 12px auto;
    padding: 20px;
    padding-bottom: 50px;
}

/* Post Title */
.post-title {
    font-size: 2.6rem;
    line-height: 4rem;
    color: #000;
    font-weight: bold;
    text-align: left;
    margin: 15px 0 10px;
    font-family: Roboto, Arial, sans-serif; 
}

/* Post Meta: Author & Date */
.post-meta {
    text-align: left;
    color: #000;
    font-size: 16px;
    margin-top: 25px;
    margin-bottom: 40px;
    position: relative;
    padding: 10px 0;
}

.post-meta::before,
.post-meta::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: #7d7d7d;
}

/* Desktop default */
.meta-sep {
    margin: 0 12px;
    color: #7d7d7d;
}

.meta-item {
    display: inline;
}

/* Mobile view */
@media (max-width: 768px) {
    .meta-sep {
        display: none;   /* | hide */
    }

    .meta-item {
        display: block;  /* har item new line */
        margin-bottom: 1px;
    }
}

/* Mobile view */
@media (max-width: 768px) {
    .post-meta {
        font-size: 17px;   /* yahan size adjust kar lo */
        line-height: 1.6; /* thoda readable ho jaata hai */
    }
}

.post-meta::before { top: 0; }
.post-meta::after { bottom: 0; }


/* Post Content */
.post-content {
    font-size: 18px;
    line-height: 30px;
    font-family: Roboto, Arial, sans-serif; 
    color: #000;
}

.post-content p {
    margin: 15px 0;
}

/* Headings in content */
.post-content h3 {
    padding-top: 12px;
    font-size: 25px;
    line-height: 38px;
    font-weight: bold;
    font-family: "Open Sans", Arial, sans-serif;
    color: #000;
}

.single-post{
a {
    color: #055ab5;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

a:hover {
    color: #0c4786;
    text-decoration: underline;
}
}


/* Post Tags */
.post-tags {
    font-size: 16px;
    color: #000;
    margin: 27px 0 15px;
}

.post-tags strong {
    font-weight: bold;
    text-transform: normal;
}

.post-tags a {
    color: #5c5c5c;
    text-decoration: none;
    font-weight: normal;
}

.post-tags a:hover {
    color: #0f0f0f;
    text-decoration: underline;
}

/* Social Share */
.social-share {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 25px 0;
    position: relative;
    padding: 15px 0;
}

.social-share::before,
.social-share::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #7d7d7d;
}

.social-share::before { top: 0; }
.social-share::after { bottom: 0; }

.social-share span {
    font-weight: bold;
    margin-right: 5px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff !important;
    font-size: 18px;
    text-decoration: none;
    transition: transform 0.25s ease;
}

.social-icon:hover {
    transform: scale(1.15);
}

.facebook  { background-color: #3b5998; }
.linkedin  { background-color: #0077b5; }
.whatsapp  { background-color: #25d366; }
.twitter   { background-color: #1da1f2; }  /* या #000 अगर X का काला लोगो चाहते हैं */

/* Related Posts */
.related-posts {
    margin-top: 35px;
}

/* Related Posts - Left align titles and excerpts */
.related-posts h2 {
    font-size: 21px;
    font-weight: bold;
    text-align: left;          /* Heading ko bhi left kar dete hain (optional, agar chahein) */
    margin-left: 0;
}

.related-post-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}

.related-item {
    text-align: left !important;   /* Force left alignment for whole card */
    border: 1.5px solid #A6A6A6 !important;
}

.related-item .item-content {
    text-align: left;
}

.related-item h4 {
    text-align: left;
    margin-bottom: 10px;
}


.related-item .card-excerpt {
    text-align: left;
    margin-bottom: 12px;
    color: #000;
}

.related-post-grid {
    text-align: left;              /* Grid container bhi left rakhen */
}

.related-title {
    font-size: 17px;
    line-height: 21px;
    margin-top: 6px;
    text-align: left;
    color: #000;
}

/* Default links */
a {
    color: #055ab5;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0c4786;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
        line-height: 3rem;
    }

    .related-post-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .related-title {
        font-size: 19px;
        line-height: 25px;
    }
}

@media (max-width: 480px) {
    .related-post-grid {
        grid-template-columns: 1fr;
    }
}

/* 404 Page Styles */
.custom-404 {
    text-align: center;
    padding-top: 15px;
    padding-bottom: 52px;
}

.error-404-content img {
    max-width: 100%; /* Makes the image responsive */
    height: auto; /* Maintains aspect ratio */
    max-height: 300px; /* Prevents the image from getting too large */
    margin-bottom: 20px;
}

.error-404-content h1 {
    font-size: 33px; /* Adjusts heading size for smaller screens */
    color: #333;
}

.error-404-content p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.btn-home {
    display: inline-block;
    padding: 10px 20px;
    background-color: #08417e;
    color: #fff;
    text-decoration: none;
    font-size:18px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.btn-home:hover {
    background-color: #05305f;
    color: #fff;
}

/* Media query for small screens */
@media (max-width: 768px) {
    .custom-404 {
    padding-top: 15px;
    padding-bottom: 52px;
    }

    .error-404-content img {
        max-height: 200px; /* Smaller image on mobile */
    }

    .error-404-content h1 {
        font-size: 27px; /* Smaller text for mobile */
    }

    .error-404-content p {
        font-size: 18px;
    }

    .btn-home {
        font-size: 19px;
        padding: 12px 18px;
    }
}
