/* WordPress Core CSS Classes */
.main-card {
  background-color: rgb(231, 231, 231);
  border-radius: 8px;
  padding: 32px;
  .a-link {
    height: 100%;
    width: 100%;
  }
  .main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .a-t {
    margin: 24px 0px;
    display: inline-block;
  }
  .a-e {
    margin-bottom: 24px;
  }
}
.d-label {
  font-weight: bold;
  font-size: 53px;
}
@media (max-width: 768px) {
  .d-label {
    font-size: 32px;
  }
}

#preloader img {
  /* The 'pulse' animation is defined below */
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

/* Smooth transition for the preloader fade-out */
#preloader {
  transition: opacity 0.7s ease-out, visibility 0.7s ease-out;
}

/*
/*
=================================================================
FINAL CUSTOM SLICK SLIDER ARROW STYLES (Using SVGs)
=================================================================
*/

/* Hides the default text-based arrows */
#video-shorts-slider .slick-arrow::before {
  display: none;
}

/* Base style for our new custom arrow container */
#video-shorts-slider .slick-arrow-custom {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  /* Appearance */
  width: 52px;
  height: 52px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 9999px; /* Circle */
  cursor: pointer;

  /* Flexbox to center the SVG icon */
  display: flex;
  align-items: center;
  justify-content: center;

  transition: background-color 0.2s ease-in-out;
}

#video-shorts-slider .slick-arrow-custom:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Positioning */
#video-shorts-slider .slick-prev {
  left: -20px;
}
#video-shorts-slider .slick-next {
  right: -20px;
}

/* Styling the SVG icon inside our custom arrow */
#video-shorts-slider .slick-arrow-custom svg {
  width: 28px;
  height: 28px;
  color: white;
}

/*
=================================================================
FINAL: FIXED-HEIGHT VIDEO PLAYER FOR ARTICLE CONTENT
=================================================================
*/

/* 1. Style the custom wrapper div */
.wp-oembed-video-wrapper {
  width: 100%;
  height: 500px; /* The fixed height you want */
  margin-top: 2rem; /* my-8 equivalent */
  margin-bottom: 2rem; /* my-8 equivalent */
  overflow: hidden;
  border-radius: 0.5rem; /* rounded-lg */
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* shadow-lg */

  /* These are important for the iframe inside */
  position: relative;
}

/* 2. Style the iframe inside the wrapper */
.wp-oembed-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* =================================================================
   PUJA BADGE STYLES (FINAL WITH CLOSE BUTTON & IMAGE BG)
================================================================= */

/* Keyframes for the rotation animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Main container */
#puja-badge {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 200px;
  height: 200px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.7s ease;
}

/* Class to hide the badge when closed */
#puja-badge.puja-badge--hidden {
  display: none;
}

/* Layer 1: The rotating red decorative ring image */
#puja-badge-rotating-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3; /* On top of inner content */
  animation: spin 30s linear infinite;
  pointer-events: none;
}

/* Layer 2: Container for the inner content */
#puja-badge-inner-content {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  z-index: 1;
  border-radius: 50%;
}

/* Styling for the repeating animation views */
.inner-view {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0; /* Start hidden */
  transition: opacity 0.8s ease-in-out; /* Smooth fade */
}
.inner-view.is-active {
  opacity: 1;
}

#puja-greeting-image {
  object-fit: cover;
}

#puja-countdown-display {
  background-image: url("https://drishtibhongi.in/wp-content/uploads/2025/09/Untitled_design__3_-removebg-preview-e1757415949869.png");
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: bold;
}

/* Text styling inside the countdown circle */
.days-remaining {
  font-size: 4rem;
  line-height: 1;
  color: #c0392b;
}
.days-text {
  font-size: 1rem;
  line-height: 1;
  margin-top: 5px;
  color: #333;
}
.greeting-text {
  font-size: 1.5rem;
  line-height: 1.2;
  padding: 0 15px;
  color: #333;
}

/* Close Button styling */
#close-puja-badge {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 30px;
  height: 30px;
  z-index: 4; /* On the very top */
  background: white;
  color: #c0392b;
  border: 2px solid #c0392b;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  padding: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
#close-puja-badge:hover {
  background: #f1f1f1;
}

/* --- Responsive for Mobile --- */
@media (max-width: 640px) {
  #puja-badge {
    width: 150px;
    height: 150px;
    bottom: 15px;
    left: 15px;
  }
  .days-remaining {
    font-size: 3rem;
  }
  .days-text {
    font-size: 0.8rem;
  }
  .greeting-text {
    font-size: 1.1rem;
  }
  #close-puja-badge {
    top: 15px;
    right: 15px;
    width: 26px;
    height: 26px;
  }
}

/* =================================================================
   PUJO SPECIAL SECTION - ACCURATE CSS BORDERS (v2 - SVG Method)
   - Recreates the traditional wave pattern with perfect accuracy using an inline SVG.
   - This is a "code-only" solution: no image files are downloaded.
   - It's fast, scalable, and the pattern color can be edited below.
================================================================= */
.pujo-special-section {
  position: relative; /* This is crucial for positioning the borders */
  /* Add padding to create space for the borders inside the section */
  padding-top: 50px !important;
  padding-bottom: 50px !important;
  border-top: none;
  border-bottom: none;
  background-color: #ffe7e7; /* The light yellow background color */
}

/* Common styles for both top and bottom pseudo-elements */
.pujo-special-section::before,
.pujo-special-section::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 30px; /* The height of our border pattern. Adjust if needed. */

  /* 
      This is the SVG pattern embedded as a data URI.
      To change the pattern's color, simply change the 'fill' and 'stroke' hex codes below.
      Current color is #c9bba2 (muted olive/khaki).
    */
  background-image: url("https://drishtibhongi.in/wp-content/uploads/2025/09/alpana-copy-e1757677761641.png");

  background-size: 45px 30px; /* Controls the size/density of the repeating pattern */
  background-repeat: repeat-x;
  background-position: center center;
}

/* Position the top border */
.pujo-special-section::before {
  top: 0;
}

/* Position and flip the bottom border */
.pujo-special-section::after {
  bottom: 0;
  /* This rotates the entire pattern 180 degrees for a perfect mirror effect */
  transform: rotate(180deg);
}

/* =================================================================
   ADAPTIVE LIVE BADGE STYLES (v2)
   - This version uses relative 'em' units to scale with the parent
     (h1, h2, h3, etc.) font size for a perfect fit everywhere.
================================================================= */
.live-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--color-red);
  color: white;
  /* Use em units for padding, which are relative to the badge's own font-size */
  padding: 0.3em 0.75em;
  /* Use em for border-radius for consistency */
  border-radius: 0.25em;
  /* Set the font-size relative to the PARENT element's font-size (the h1, h3, etc.) */
  /* You can adjust this value! 0.5em is smaller, 0.7em is larger. */
  font-size: 0.6em;
  font-weight: bold;
  text-transform: uppercase;
  /* Margin to create space between badge and title */
  margin-right: 0.5em; /* Relative to the parent font-size */
  line-height: 1;
  vertical-align: middle; /* Helps with alignment next to large text */
}

.live-badge-icon {
  /* These em units are relative to the .live-badge's NEW font-size */
  width: 0.8em;
  height: 0.8em;
  background-color: white;
  border-radius: 50%;
  margin-right: 0.6em; /* Space between icon and "LIVE" text */
  animation: blink-animation 1.4s infinite both;
}

/* Blinking Animation (Unchanged) */
@keyframes blink-animation {
  0% {
    opacity: 0.2;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

/* =================================================================
   BREAKING NEWS TICKER
================================================================= */
.breaking-news-ticker {
  background-color: #fdfdfd; /* The pink color from your image */
  padding: 1.5rem 0 0.75rem 0;
  width: 100%;
  overflow: hidden; /* This is essential to hide the scrolling text */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
}

.ticker-content {
  display: flex;
  align-items: center;
  width: max-content; /* Allows the content to be wider than the screen */
  animation: scroll-left 40s linear infinite; /* Adjust 40s to be faster or slower */
}

/* This pauses the animation when the user hovers over the pink bar */
.breaking-news-ticker:hover .ticker-content {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap; /* Prevents text from wrapping */
  padding-right: 2.5rem; /* Space between news items */
  font-size: 1rem; /* 16px */
}

.ticker-item a {
  color: black;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
}

/* Change link color to red on hover */
.ticker-item a:hover {
  color: #dc2626; /* Your theme's red color */
}

.ticker-icon {
  display: inline-block;
  margin-right: 0.75rem; /* Space between icon and text */
  color: black;
  width: 20px;
  height: 20px;
}

/* The CSS animation for the scrolling effect */
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    /* This moves the content by its full width to the left, creating the loop */
    transform: translateX(-50%);
  }
}

/* Container for the latest posts section */
.latest-posts-container {
  position: relative;
  padding-left: 1.5rem; /* Equivalent to lg:pl-6 */
}

/* Vertical line on the right side */
.latest-posts-container::after {
  content: "";
  display: none; /* Hidden by default */
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background-color: #000000; /* Equivalent to bg-gray-200 */
}

/* Horizontal line between posts */
.post-item + .post-item {
  border-top: 1px solid #000000; /* Equivalent to border-t border-gray-200 */
  padding-top: 1.5rem; /* Equivalent to pt-6 */
  margin-top: 0;
}

/* Media query for large screens (lg breakpoint in Tailwind is typically 1024px) */
@media (min-width: 1024px) {
  .latest-posts-container::after {
    display: block; /* Show the right vertical line on large screens */
  }
}

/* Custom background color for the sidebar widget */
.sidebar-widget-container {
  background-color: #8b8b8b;
}

/* =================================================================
   Single Post Professional Layout Adjustments
   ================================================================= */

/* 
 * 1. Improve Article Readability 
 * Targets the main content container.
*/
.prose {
  /* Increases space between lines of text */
  line-height: 1.75;
}

/* Adds vertical space between paragraphs, lists, and headings */
.prose p,
.prose ul,
.prose ol,
.prose h2,
.prose h3,
.prose blockquote {
  margin-bottom: 1.5em; /* 'em' is relative to the font size, which is good practice */
}

/* 
 * 2. Fix Image and Content Spacing
 * In your single.php, we wrapped the featured image in a <figure> tag.
 * The 'my-6' utility class (margin-top and margin-bottom) already adds space.
 * If you need more or less space, you can adjust it there or override it here.
 * For example, this ensures a good amount of space above and below the image.
*/
article figure.my-6 {
  margin-top: 2rem; /* adjust as needed */
  margin-bottom: 2rem; /* adjust as needed */
}

/* =================================================================
   Styles for 3-Column News Grid with Vertical Separators
================================================================= */

/* Define the separator color using a CSS variable for easy customization */
:root {
  --grid-separator-color: #aeb0b5; /* This is Tailwind's gray-200 */
}

.news-grid-container {
  /* This ensures the pseudo-elements we create for the lines are positioned correctly */
  position: relative;
}

.news-grid-item {
  position: relative; /* Needed for the pseudo-element */
}

/* 
 * This creates the vertical line on the right of each grid item.
 * We use a pseudo-element ::after for this.
*/
@media (min-width: 768px) {
  /* Corresponds to Tailwind's 'md' breakpoint */
  .news-grid-item::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1.5rem; /* This is half of the 'gap-x-6' value (which is 1.5rem * 2) */
    width: 1px;
    height: 100%;
/*     background-color: var(--grid-separator-color); */
	  background-color: black;
  }

  /* 
   * Now, we remove the line from the items at the end of a row.
   * This targets the 2nd item on medium screens (2-column layout)
   * and the 3rd item on large screens (3-column layout).
  */

  /* On tablet (md), remove line from every 2nd item */
  .md\:grid-cols-2 .news-grid-item:nth-child(2n)::after {
    display: none;
  }

  /* On desktop (lg), remove line from every 3rd item */
  .lg\:grid-cols-3 .news-grid-item:nth-child(3n)::after {
    display: none;
  }

  /* On desktop (lg), we need to re-enable the line for the 2nd item, which was disabled by the tablet rule */
  .lg\:grid-cols-3 .news-grid-item:nth-child(2n)::after {
    display: block;
  }
}
/* =================================================================
   Responsive Video Embeds
================================================================= */

/* This is the container for the video */
.responsive-video-container {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  margin-bottom: 1.5rem; /* Adds some space below the video */
}

/* This targets the iframe inside the container */
.responsive-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: #DC2626;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  }

  .scroll-to-top.show {
    opacity: 1;
    visibility: visible;
  }

  .scroll-to-top:hover {
    background-color: #B91C1C;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px -2px rgb(0 0 0 / 0.4);
  }

  .scroll-to-top:active {
    transform: translateY(-1px);
  }