/* =====================================
   BASE RESET
   ===================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

html,
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
}

/* =====================================
   LAYOUT CONTAINERS
   ===================================== */
.rh-container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.homepage-wrapper {
    padding: 20px;
}

.homepage-layout {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr; /* categories | articles | right sidebar */
    gap: 20px;
}

/* =====================================
   HEADER
   ===================================== */
.main-header {
    background-color: #ffc500;
    color: white;
    padding: 4px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
    height: 42px;
}

.logo-container img {
    height: 45px;
}

/* generic search box (header + mobile) */
.search-container {
    display: flex;
    height: 32px;
}

.search-container input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
}

.search-container button {
    background-color: #0077cc;
    border: none;
    padding: 6px 12px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-container svg {
    stroke: white;
}

/* =====================================
   FOOTER
   ===================================== */
.footer {
    background-color: #1e1e2f;
    color: white;
    text-align: center;
    padding: 20px;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    margin: 0 10px;
    color: #ccc;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

/* =====================================
   SIDEBARS
   ===================================== */
.sidebar {
    padding: 0;
    border-radius: 8px;
    height: fit-content;
}

.sidebar h2 {
    margin-bottom: 5px;
    text-align: center;
    padding-bottom: 2px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 8px;
}

ul {
    list-style: inside;
}

.sidebar-box {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: block;
    width: 100%;
    height: auto;
}

/* =====================================
   LATEST POSTS
   ===================================== */
.latest-posts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.latest-post-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #000;
}

.latest-post-item:hover {
    text-decoration: none;
}

.latest-post-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.latest-post-item .post-info p {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: #000;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-post-item .post-info p:hover {
    color: #005fa3;
}

/* =====================================
   RECENT POSTS
   ===================================== */
.recent-posts-list {
    list-style: none;
    padding-left: 0;
}

.recent-posts-list li {
    margin-bottom: 8px;
}

.recent-posts-list li a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-posts-list li a:hover {
    color: #005fa3;
}

/* =====================================
   ARTICLE CARDS & GRID
   ===================================== */
.article-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 245px;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.overlay-content {
    padding: 12px;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
}

.overlay-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
    margin: 0;
    text-decoration: none;
}

.article-card h3 a {
    text-decoration: none;
    color: inherit;
}

.article-card h3 a:hover {
    color: #005fa3;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* =====================================
   CATEGORY PAGES
   ===================================== */
.category-title-wraper {
    text-align: center;
    margin: 30px 0 10px;
}

.category-title {
    font-size: 2rem;
}

.category-articles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-article-card {
    display: flex;
    gap: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

.card-thumb img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.card-details h2 {
    margin-bottom: 10px;
}

.category-article-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 8px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-article-card h2:hover {
    color: #005fa3;
}

.category-article-card a {
    text-decoration: none;
    color: inherit;
}

.card-meta {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #0077cc;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #005fa3;
}

/* =====================================
   PAGINATION
   ===================================== */
.pagination {
    text-align: center;
    margin: 30px 0;
}

.page-link {
    display: inline-block;
    margin: 0 5px;
    padding: 2px 12px;
    background: #eee;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}

.page-link.active {
    background: #0077cc;
    color: white;
}

/* =====================================
   ARTICLE PAGE
   ===================================== */
.article-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    padding-top: 15px;
}

.article-title {
    font-size: 26px;
    margin-bottom: 0px;
}
.article-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}
.article-hero img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 5px;
    height: 120px;
      object-fit: cover;

}

.article-body {
    line-height: 1.7;
}

/* =====================================
   STATIC PAGES
   ===================================== */
.static-page h1 {
    margin-bottom: 20px;
}

.static-body {
    background: white;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
}

/* =====================================
   MODERN CATEGORIES GRID (SIDEBAR + MOBILE)
   ===================================== */
.modern-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 4px;
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 8px;
}

.modern-category-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0077cc, #005fa3);
    color: white;
    padding: 12px 16px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.modern-category-card:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #005fa3, #003f7f);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-category-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-category-card.active {
    background: linear-gradient(135deg, #ffc500, #e0a800);
    color: #000;
    font-weight: 700;
}

/* =====================================
   HAMBURGER + MOBILE MENU
   ===================================== */
.menu-toggle {
    display: none;              /* desktop: hidden */
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    margin-left: 12px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;        /* thicker */
    background: #1e1e2f;
    margin: 5px 0;       /* spacing */
    border-radius: 2px;
}

/* Slide-in container */
.mobile-menu {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 360px;
    height: 100%;
    background: #ffffff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.25);
    padding: 20px 18px 30px;
    overflow-y: auto;
}

.mobile-menu-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-section {
    margin-top: 40px;
}

.mobile-search {
    width: 100%;
}

.mobile-search .search-container {
    width: 100%;
}

.mobile-search input {
    width: 100%;
}

.mobile-categories-box {
    margin-top: 10px;
}

/* =====================================
   RESPONSIVE
   ===================================== */

/* <= 1024px: remove left categories column, show hamburger, hide header search */
@media (max-width: 1024px) {
    /* two columns: articles | right sidebar */
    .homepage-layout {
        grid-template-columns: 2fr 1fr;
    }

    /* hide left sidebar */
    .categories-sidebar {
        display: none;
    }

    /* hide header search (only the one directly in header) */
    .header-container > .search-container {
        display: none;
    }

    /* show hamburger */
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
                display: block;
    }
}

/* <= 768px: stack main and right sidebar */
@media (max-width: 768px) {
    .homepage-layout {
        grid-template-columns: 1fr;
    }

    .category-article-card {
        flex-direction: column;
    }

    .logo-container img {
        height: 40px;
    }

    .header-container {
        padding: 0 12px;
    }
}
p{
      margin-block-start: 5px;
    margin-block-end: 5px;
}

 h2{    font-size: 21px;
    margin-block-start: 0px;
    margin-block-end: 0px;}
 h3{font-size:19px ;  margin-block-start: 0px;
    margin-block-end: 0px;}
 h4{font-size:18px;    margin-block-start: 0px;
    margin-block-end: 0px;}
.wrapper-below-article-container {
  margin-left: 20.5%;
  margin-right: 20.5%;
  margin-top: 15px;
  min-height: 1px; /* just to avoid 0-height edge cases */
}
@media (max-width: 1024px) {
  .wrapper-below-article-container {
    margin-left: auto;
    margin-right: auto;
    margin-top: 15px;
  }
.search-container input
{
        border: 1px solid black;
}
.search-container {
    height: 32px;
    margin-bottom: 10px;
}
}


    /* default: desktop */
#wrapper-articlepage__hero-desktop {
  display: block;
}

#wrapper-articlepage__hero-mobile {
  display: none;
}

/* mobile: swap which hero is visible */
@media (max-width: 768px) {
  #wrapper-articlepage__hero-desktop {
    display: none;
  }

  #wrapper-articlepage__hero-mobile {
    display: block;
    margin-top: 12px; /* tweak if you want spacing above hero */
  }
}

.card-meta {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}
.category-article-card a {
    text-decoration: none;
    color: inherit;
}
.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #0077cc;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    float: right;
}

.logo-container{
    padding-top: 5px;
}

.wrapper-top-article-container .mgid-top-widget {
    min-height: 300px;
}

 .headlines-ads {
      margin: 20px 0;
    }
    .headline-ad {
      display: flex;
      gap: 10px;
      text-decoration: none;
      border-radius: 6px;
      padding: 10px;
      border: 1px solid rgba(0, 0, 0, 0.06);
      background: #fff;
    }
    .headline-ad__image-wrap {
      position: relative;
      flex: 0 0 70px;
    }
    .headline-ad__image-wrap img {
      width: 70px;
      height: 70px;
      object-fit: cover;
      border-radius: 4px;
    }
    .headline-ad__badge {
      position: absolute;
      bottom: 4px;
      left: 4px;
      font-size: 10px;
      padding: 2px 4px;
      background: #f0b400;
      color: #000;
      border-radius: 3px;
      text-transform: uppercase;
    }
    .headline-ad__content {
      flex: 1;
    }
    .headline-ad__title {
      font-size: 14px;
      margin: 0 0 4px;
      color: #111;
    }
    .headline-ad__desc {
      font-size: 12px;
      margin: 0 0 4px;
      color: #555;
    }
    .headline-ad__source {
      font-size: 11px;
      color: #888;
    }