/*
Theme Name: MaharashtraDesha Custom
Template: generatepress
Version: 1.0
Description: Custom child theme for MaharashtraDesha.com with logo and layout modifications.
Author: Maharashtra Desha Team
*/

/*--------------------------------------------------------------
# Variables
--------------------------------------------------------------*/
:root {
  --primary-red: #044499;
}

/*--------------------------------------------------------------
# Mobile-Only Horizontal Scroll Menu
--------------------------------------------------------------*/
.custom-scroll-menu {
  display: none;
  background-color: #044499;
  color: white;
  position: sticky;
  top: 60px;
  z-index: 9999;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  -webkit-overflow-scrolling: touch;
  padding: 3px 0;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}
.custom-scroll-menu::-webkit-scrollbar {
  display: none;
}
.custom-scroll-menu ul {
  display: flex;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: center;
}
.custom-scroll-menu li {
  flex-shrink: 0;
}
.custom-scroll-menu li:first-child {
  margin-left: 15px;
}
.custom-scroll-menu li:last-child {
  margin-right: 15px;
}
.custom-scroll-menu a {
  font-size: 17px;
  color: white;
  text-decoration: none;
  padding: 5px 15px;
  border-right: 1px solid rgba(255,255,255,0.3);
  transition: background-color 0.3s, opacity 0.3s;
  display: block;
  white-space: nowrap;
}
.custom-scroll-menu li:last-child a {
  border-right: none;
}
.custom-scroll-menu a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
@media (max-width: 768px) {
  .custom-scroll-menu {
    display: block;
  }
}



/*--------------------------------------------------------------
# Related News Section
--------------------------------------------------------------*/
.inb-related-posts-container {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin: 30px 0;
  padding: 15px;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.inb-related-posts-container h2.inb-rp-title {
  background-color: #044499;
  color: #fff;
  font-size: 19px;
  margin: -15px -15px 15px -15px;
  padding: 10px 15px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.inb-related-posts-container ul {
  list-style: disc inside;
  padding-left: 0;
  margin: 0;
}
.inb-related-posts-container li {
  margin-bottom: 10px;
}
.inb-related-posts-container li a {
  color: #044499;
  text-decoration: none;
  transition: color 0.3s;
}
.inb-related-posts-container li a:hover {
  color: black;
}

/*--------------------------------------------------------------
# YouTube Subscribe Box
--------------------------------------------------------------*/
.inb-youtube-subscribe-box {
    background: #fff;
    border: 2px solid #ff0000;
    border-radius: 15px;
    padding: 25px;
    margin: 40px auto; /* Centers the box on the page */
    max-width: 800px; /* Increased the width for a larger box */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.inb-subscribe-inner {
    display: flex;
    flex-direction: column; /* Stacks the content vertically */
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.inb-subscribe-icon img {
    width: 90px; /* Adjusted for a modern look */
    height: auto;
    border-radius: 10px;
}

.inb-subscribe-text h3 {
    font-size: 1.6rem; /* Slightly larger for emphasis */
    margin: 0 0 10px;
    color: #333;
    line-height: 1.4;
    font-weight: 600;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: 0.5px;
}

.inb-subscribe-button {
    background-color: #b3000c;
    color: #fff;
    padding: 12px 35px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s ease-in-out;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.inb-subscribe-button:hover {
    background: linear-gradient(135deg, #007bff, #00aaff); /* Blue gradient */
    color: #fff;
    transform: translateY(-5px); /* Smooth hover lift effect */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Stronger shadow to elevate */
}

.inb-subscribe-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5); /* Focus ring for accessibility */
}

/*--------------------------------------------------------------
# Fix for Custom Latest Posts Bullet Issue
--------------------------------------------------------------*/
.custom-latest-posts {
  list-style: disc inside;
}

.custom-latest-posts li {
  position: relative;
  margin-left: 0;
  padding-left: 0;
}

.custom-latest-posts li::before {
  content: none !important;
}

.custom-latest-posts ul {
  padding-left: 20px;
}

/*--------------------------------------------------------------
# Social Share Buttons
--------------------------------------------------------------*/
.inb-social-share {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 10px;
  padding: 10px;
  border-top: 1px solid #ddd;
  font-size: 16px;
  align-items: center;
  justify-content: flex-start; /* Align the content to the left */
}

.inb-social-share span {
  width: 100%;
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
  text-align: left; /* Move title to the left */
}

.inb-social-share a {
  display: inline-block;
  padding: 12px 18px; /* Larger padding for a modern look */
  text-decoration: none;
  color: #ffffff;
  border-radius: 5px; /* Slight rounded corners for a subtle modern look */
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease; /* Smooth transition */
  position: relative;
  text-align: center;
}

.inb-social-share a.fb { background-color: #3b5998; }
.inb-social-share a.x  { background-color: #000000; }
.inb-social-share a.wa { background-color: #075E54; }

.inb-social-share a:hover,
.inb-social-share a:focus {
  opacity: 0.9;
  transform: scale(1.1); /* Slight scale up for hover */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  color: #fff;
}

.inb-social-share a:focus {
  outline: 2px solid #ffcc00;
  outline-offset: 2px;
}

.inb-social-share a::after {
  content: attr(aria-label);
  display: none;
  position: absolute;
  background: #333;
  color: #fff;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 99;
}

.inb-social-share a:hover::after {
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s ease-in-out;
}

@media (max-width: 600px) {
  .inb-social-share {
    flex-direction: column;
    align-items: flex-start; /* Align the items to the left */
  }
  .inb-social-share a {
    width: 100%;
    text-align: center; /* Keep the text centered */
    font-size: 16px;
    padding: 12px 16px;
  }
}

/*--------------------------------------------------------------
# Popular Posts Grid (Updated)
--------------------------------------------------------------*/
.inb-popular-posts {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin: 30px 0;
  padding: 15px;
  background: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.inb-popular-posts h2.inb-section-title {
  background-color: var(--primary-red);
  color: #fff;
  font-size: 19px;
  margin: -15px -15px 15px -15px;
  padding: 10px 15px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.inb-popular-posts .inb-post-grid {
  display: flex;
  flex-wrap: nowrap; /* This prevents wrapping to a second row */
  gap: 15px;
  justify-content: flex-start; /* Aligns the posts to the left */
  overflow-x: auto; /* Enables horizontal scroll for the posts if they overflow */
}
.inb-popular-posts .inb-post-card {
  flex: 0 0 auto; /* Prevents cards from resizing, ensures they stay in one row */
  width: calc(33.33% - 10px); /* Adjust the size of the cards */
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}
.inb-popular-posts .inb-post-card h3 {
  font-size: 17px;
  line-height: 1.7;
  color: #333;
}
.inb-popular-posts .inb-post-card a {
  text-decoration: none;
  color: inherit;
}
.inb-popular-posts .inb-post-card img {
  max-width: 100%;
  border-radius: 5px;
}

/* Mobile view (max-width: 768px) */
@media (max-width: 768px) {
  .inb-popular-posts .inb-post-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Makes the grid 1 column for mobile */
    gap: 15px;
  }
  .inb-popular-posts .inb-post-card {
    width: 100%; /* Ensure cards take full width on mobile */
    margin-bottom: 15px;
  }
}


/*--------------------------------------------------------------
# Recent Posts Section
--------------------------------------------------------------*/
.inb-recent-posts {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin: 30px 0;
  padding: 15px;
  background: #f9f9f9;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.inb-recent-posts h2.inb-section-title {
  background-color: var(--primary-red);
  color: #fff;
  font-size: 19px;
  margin: -15px -15px 15px -15px;
  padding: 10px 15px;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.inb-recent-posts .inb-post-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: space-between;
}
.inb-recent-posts .inb-post-card {
  flex: 1 1 calc(33.33% - 10px);
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}
.inb-recent-posts .inb-post-card h3 {
  font-size: 17px;
  line-height: 1.7;
  color: #333;
}
.inb-recent-posts .inb-post-card a {
  text-decoration: none;
  color: inherit;
}
.inb-recent-posts .inb-post-card img {
  max-width: 100%;
  border-radius: 5px;
}
@media (max-width: 768px) {
  .inb-recent-posts .inb-post-grid {
    flex-direction: column;
  }
  .inb-recent-posts .inb-post-card {
    width: 100%;
    margin-bottom: 15px;
  }
}


/*--------------------------------------------------------------
# Live Blog
--------------------------------------------------------------*/
/* Container */
.live-blog-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Segoe UI', sans-serif;
}

/* Title */
.live-blog-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    color: #111;
    margin-bottom: 30px;
    border-bottom: 3px solid #e63946;
    display: inline-block;
    padding-bottom: 8px;
}

/* Entry Style with Red Line */
.live-blog-entry {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px 20px 30px;
    margin-bottom: 25px;
    border-left: 6px solid #e63946;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
}

.live-blog-entry:hover {
    transform: translateY(-3px);
}

/* Live Badge - Rounded with Pulse */
.live-badge {
    position: absolute;
    top: -14px;
    left: 16px;
    background-color: #e63946;
    color: #fff;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 0 0 rgba(230, 57, 70, 0.7);
    animation: pulse 1.6s infinite;
    z-index: 2;
}

/* Modern Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(230, 57, 70, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
    }
}

/* Heading */
.live-blog-heading {
    font-size: 1.4rem;
    color: #111;
    font-weight: 600;
    margin-bottom: 6px;
    padding-top: 12px; /* space below badge */
}

/* Meta Info */
.live-blog-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 12px;
}

/* Content */
.live-blog-content {
    font-size: 1rem;
    color: #333;
    line-height: 1.7;
}

/* No Updates */
.no-updates {
    text-align: center;
    color: #999;
    font-size: 1.1rem;
    padding: 40px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    background-color: #f2f2f2;
    color: #333;
    padding: 8px 14px;
    border-radius: 30px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.pagination a:hover {
    background-color: #e63946;
    color: #fff;
}

/* Strict Mobile Fix for Overflow and Badge Visibility */
@media (max-width: 600px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
        scroll-behavior: smooth;
    }

    body {
        position: relative;
        -webkit-overflow-scrolling: touch;
    }

    .live-blog-container {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding-top: 20px; /* ensures badge room */
        box-sizing: border-box;
    }

    .live-blog-entry {
        width: 100%;
        max-width: 100%;
        overflow: visible; /* let badge overflow */
        padding-top: 44px; /* ensures full badge visibility */
        box-sizing: border-box;
        will-change: transform;
        backface-visibility: hidden;
    }

    .live-blog-container * {
        max-width: 100% !important;
        box-sizing: border-box;
        word-break: break-word;
    }

    .live-blog-content img,
    .live-blog-content iframe {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .pagination,
    .no-updates {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}

