/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Description: Child theme for the GeneratePress WordPress theme
Author: Bharat Meena
Author URI: https://example.com
Template: generatepress
Version: 1.0.0
Text Domain: generatepress-child
*/

/* Custom CSS starts below this line */

/* Inline Related Posts - NightOwl Style */
.nightowl-related-posts {
  background: #fff9c4;
  padding: 14px 16px;
  border-radius: 14px;
  margin: 28px 0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease-in-out;
}

.nightowl-related-posts:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nightowl-related-posts h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #222;
  text-align: left;
}

.nightowl-related-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.nightowl-related-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nightowl-related-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.nightowl-related-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-bottom: 2px solid #f0f0f0;
}

.nightowl-related-item span {
  padding: 8px;
  font-size: 14px;
  color: #333;
  text-align: center;
}

/* 📱 Mobile Optimization */
@media (max-width: 768px) {
  .nightowl-related-posts {
    padding: 12px;
    margin: 22px 0;
  }

  .nightowl-related-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .nightowl-related-item img {
    height: 75px;
  }

  .nightowl-related-posts h3 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .nightowl-related-wrapper {
    grid-template-columns: 1fr;
  }
}





/* =======================================
   TABLE OF CONTENTS STYLE (WITH TOGGLE)
   ======================================= */
.nightowl-toc {
  background: #f9f9ff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 15px 18px;
  margin: 25px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  font-size: 15px;
  line-height: 1.6;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.toc-title {
  font-weight: 700;
  color: #111827;
  font-size: 18px;
}

.toc-toggle {
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.toc-toggle:hover {
  background: #1d4ed8;
}

.toc-list {
  margin: 0;
  padding-left: 18px;
  list-style: none;
}

.toc-list.hidden {
  display: none;
}

.toc-list li {
  margin-bottom: 6px;
  position: relative;
}

.toc-list li::before {
  content: "•";
  color: #3b82f6;
  position: absolute;
  left: -14px;
}

.toc-list a {
  text-decoration: none;
  color: #2563eb;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Sub-level (H3) styling */
.toc-level-3 {
  margin-left: 12px;
  font-size: 14px;
}

/* Mobile-friendly */
@media (max-width: 768px) {
  .nightowl-toc {
    font-size: 14px;
    padding: 12px 14px;
  }
  .toc-title {
    font-size: 16px;
  }
  .toc-toggle {
    font-size: 13px;
    padding: 3px 8px;
  }
}
