/* Lider.media Article Text Styling */
/* Targeting news-magazine-x theme classes with !important */

/* Target the actual theme paragraph container */
.single .newsx-single-wrap .newsx-post-content p,
.single .newsx-single-wrap .entry-content p,
.single-post .newsx-post-content p,
.single-post .entry-content p,
body.single .newsx-post-content p,
body.single-post .newsx-post-content p,
body .newsx-post-content p,
body article.post .entry-content p,
body .post-content p,
body article .article-content p,
body.single article p,
body.single .entry-content p,
body .entry-content > p,
article.post .entry-content p,
.single-post article p,
.single article.post p {
    font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 26px !important;
    color: #000000 !important;
    margin-top: 0px !important;
    margin-bottom: 14px !important;
    letter-spacing: normal !important;
    word-spacing: 0px !important;
}

/* Also target newsx-post-content directly */
.newsx-post-content p,
.newsx-single-wrap .newsx-post-content p {
    font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 26px !important;
}

/* Block editor paragraphs */
body .wp-block-post-content p,
body article .wp-block-post-content p {
    font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 26px !important;
}

/* First paragraph */
.newsx-post-content p:first-child,
body article.post .entry-content p:first-child,
body .entry-content > p:first-child,
.single-post article p:first-child {
    margin-top: 0 !important;
}

/* Last paragraph */
.newsx-post-content p:last-child,
body article.post .entry-content p:last-child,
body .entry-content > p:last-child,
.single-post article p:last-child {
    margin-bottom: 14px !important;
}


/* Hide site title text when custom logo is present */
.newsx-site-identity .site-title {
    display: none !important;
}

/* Make sure logo is visible */
.site-logo {
    display: block !important;
}

.site-logo img,
.custom-logo {
    height: 60px !important;
    width: auto !important;
}

/* Override logo max-width */
.newsx-site-identity .site-logo {
    max-width: 140px !important;
}

/* Header styling - red section with logo */
.newsx-site-header .newsx-middle-section-wrap {
    max-height: none !important;
    min-height: auto !important;
}

/* Allow grid row to show content */
.newsx-site-header .newsx-middle-section-wrap .newsx-builder-grid-row {
    min-height: auto !important;
}

/* Menu wrapper styling - ensure menus are visible */
.newsx-menu-wrapper {
    display: block !important;
    height: auto !important;
}

/* ==========================================================
   CARD STYLE MAGAZINE LAYOUT - Image above, content below
   ========================================================== */

/* Reset grid items to use flexbox for card layout */
.newsx-magazine-layout .newsx-grid-item.newsx-card-style {
  display: flex !important;
  flex-direction: column !important;
  background: #fff !important;
  overflow: hidden;
}

/* Card media container - use padding-bottom trick for aspect ratio */
.newsx-magazine-layout .newsx-grid-item.newsx-card-style .newsx-card-media {
  position: relative !important;
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 62% !important;
  flex-shrink: 0;
  overflow: hidden;
}

/* Background image link - fill the container */
.newsx-magazine-layout .newsx-grid-item.newsx-card-style .newsx-card-media .newsx-grid-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-size: cover !important;
  background-position: center !important;
  display: block !important;
}

/* Content container */
.newsx-magazine-layout .newsx-grid-item.newsx-card-style .newsx-card-content {
  padding: 15px 5px !important;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Category - red text, no background */
.newsx-magazine-layout .newsx-card-content .newsx-grid-categories {
  margin-bottom: 5px;
}

.newsx-magazine-layout .newsx-card-content .newsx-post-categories a {
  color: #D2232A !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 12px;
  font-weight: 600;
  text-transform: lowercase;
  letter-spacing: 0.3px;
}

.newsx-magazine-layout .newsx-card-content .newsx-post-categories a:hover {
  color: #a91b21 !important;
  text-decoration: none;
}

/* Title - bold black */
.newsx-magazine-layout .newsx-card-content .newsx-grid-title {
  margin: 0;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-title h2,
.newsx-magazine-layout .newsx-card-content .newsx-grid-title h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #1a1a1a;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-title a {
  color: #1a1a1a !important;
  text-decoration: none;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-title a:hover {
  color: #D2232A !important;
}

/* Excerpt - gray text */
.newsx-magazine-layout .newsx-card-content .newsx-grid-excerpt {
  margin: 5px 0;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-excerpt p {
  font-size: 14px;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

/* Author & Date meta */
.newsx-magazine-layout .newsx-card-content .newsx-grid-post-meta,
.newsx-magazine-layout .newsx-card-content .newsx-grid-date-time,
.newsx-magazine-layout .newsx-card-content .newsx-grid-author {
  font-size: 13px;
  color: #888;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-author-name {
  font-weight: 500;
  color: #555;
}

/* Featured post (first/large post) specific styles */
.newsx-magazine-layout .newsx-grid-item:first-child.newsx-card-style .newsx-grid-title h2 {
  font-size: 22px;
}

/* Hide any leftover overlay elements */
.newsx-magazine-layout .newsx-card-style .newsx-grid-over-media {
  display: none !important;
}

/* Fix meta display - author | date inline */
.newsx-magazine-layout .newsx-card-content .newsx-grid-post-meta {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0;
  font-size: 13px;
  color: #666;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-author {
  display: inline-flex !important;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-author::after {
  content: '|';
  margin: 0 8px;
  color: #ccc;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-date-time {
  display: inline-block !important;
}

.newsx-magazine-layout .newsx-card-content .newsx-grid-date {
  color: #888;
}

/* ==========================================================
   CUSTOM 3/4 + 1/4 FEATURED LAYOUT
   ========================================================== */

.lider-featured-layout {
  display: flex;
  gap: 20px;
  width: 100%;
}

/* Main featured article - 3/4 width */
.lider-featured-main {
  flex: 0 0 74%;
  max-width: 74%;
}

.lider-featured-main .newsx-grid-item.newsx-card-style {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.lider-featured-main .newsx-card-media {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56%;
  overflow: hidden;
}

.lider-featured-main .newsx-card-media .newsx-grid-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.lider-featured-main .newsx-card-content {
  padding: 15px 0;
}

.lider-featured-main .newsx-grid-title h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin: 8px 0;
}

.lider-featured-main .newsx-grid-excerpt p {
  font-size: 15px;
  line-height: 1.5;
  color: #555;
}

/* Sidebar with small articles - 1/4 width */
.lider-featured-sidebar {
  flex: 0 0 24%;
  max-width: 24%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.lider-featured-sidebar .newsx-grid-item {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.lider-featured-sidebar .newsx-grid-media {
  width: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  height: auto !important;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.lider-featured-sidebar .newsx-grid-image {
  display: block;
  width: 100%;
  height: 100% !important;
}

.lider-featured-sidebar .newsx-grid-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.lider-featured-sidebar .newsx-grid-below-media {
  padding: 10px 0;
}

.lider-featured-sidebar .newsx-post-categories a {
  color: #D2232A !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
}

.lider-featured-sidebar .newsx-grid-title h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin: 5px 0;
}

.lider-featured-sidebar .newsx-grid-title a {
  color: #1a1a1a;
}

.lider-featured-sidebar .newsx-grid-title a:hover {
  color: #D2232A;
}

.lider-featured-sidebar .newsx-grid-excerpt {
  display: none;
}

.lider-featured-sidebar .newsx-grid-post-meta,
.lider-featured-sidebar .newsx-grid-date-time {
  font-size: 12px;
  color: #888;
}

.lider-featured-sidebar .newsx-grid-author {
  display: none;
}

/* Responsive */
@media (max-width: 992px) {
  .lider-featured-layout {
    flex-direction: column;
  }
  
  .lider-featured-main,
  .lider-featured-sidebar {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .lider-featured-sidebar {
    flex-direction: row;
    gap: 20px;
  }
  
  .lider-featured-sidebar .newsx-grid-item {
    flex: 1;
  }
}

@media (max-width: 576px) {
  .lider-featured-sidebar {
    flex-direction: column;
  }
}

/* Fix main featured article category - red text, no badge */
.lider-featured-main .newsx-post-categories a {
  color: #D2232A !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 12px;
  font-weight: 600;
  text-transform: lowercase;
}

/* Hide Read More in sidebar */
.lider-featured-sidebar .newsx-grid-read-more {
  display: none !important;
}

/* Sidebar articles - match grid section style (show excerpt, hide meta) */
.lider-featured-sidebar .newsx-grid-excerpt {
  display: block !important;
  margin: 5px 0;
}

.lider-featured-sidebar .newsx-grid-excerpt p {
  font-size: 13px;
  line-height: 1.4;
  color: #666;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lider-featured-sidebar .newsx-grid-post-meta,
.lider-featured-sidebar .newsx-grid-date-time {
  display: none !important;
}

/* Hide author and date from main featured article */
.lider-featured-main .newsx-grid-post-meta,
.lider-featured-main .newsx-grid-author,
.lider-featured-main .newsx-grid-date-time {
  display: none !important;
}

/* ==========================================================
   LOAD MORE BUTTON
   ========================================================== */

.lider-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 40px 0;
  width: 100%;
}

.lider-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
  min-height: 50px;
  padding: 14px 40px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #333;
  background: #fff;
  border: 2px solid #333;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lider-load-more-btn:hover {
  background: #333;
  color: #fff;
}

.lider-load-more-btn.loading {
  pointer-events: none;
  background: #f5f5f5;
  border-color: #999;
  color: #666;
}

.lider-load-more-btn.loading .lider-load-more-text {
  display: none !important;
}

.lider-load-more-btn.loading .lider-load-more-loader {
  display: inline-flex !important;
}

.lider-load-more-loader {
  display: none;
  align-items: center;
  justify-content: center;
}

.lider-load-more-loader svg {
  width: 24px;
  height: 24px;
}

.lider-load-more-loader svg circle {
  stroke: #999;
}

.lider-load-more-loader svg path {
  stroke: #333;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .lider-load-more-btn {
    min-width: 140px;
    padding: 12px 30px;
    font-size: 13px;
  }
  
  .lider-load-more-btn.loading {
    background: #f0f0f0;
    border-color: #666;
  }
}

/* Hide pagination when load more is active */
.newsx-blog-pagination {
  display: none !important;
}
