/* ============================================================
   Aarunya Energies — Blog Stylesheet
   Extends style.css (loaded first)
   ============================================================ */

/* ---- Navbar override: always solid on blog pages ---- */
.navbar-solid {
  background: rgba(27, 67, 50, 0.97) !important;
  backdrop-filter: blur(12px);
  padding: 14px 0 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.nav-active {
  color: var(--amber-light) !important;
  font-weight: 700 !important;
}

/* ============================================================
   BLOG HERO
   ============================================================ */
.blog-hero {
  background: linear-gradient(135deg, #0d2b1d 0%, #1b4332 45%, #2d6a4f 100%);
  padding: 140px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(224,123,34,0.12), transparent 60%);
  pointer-events: none;
}

.blog-hero-content {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}
.blog-hero-content h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin: 16px 0 12px;
  line-height: 1.2;
}
.blog-hero-content p {
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  margin-bottom: 32px;
  line-height: 1.65;
}

.blog-search-wrap {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
}
.blog-search-wrap input {
  width: 100%;
  padding: 14px 48px 14px 20px;
  border-radius: 100px;
  border: none;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: rgba(255,255,255,0.95);
  color: var(--text-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.blog-search-wrap input:focus {
  box-shadow: 0 0 0 3px rgba(244,162,97,0.5), 0 4px 20px rgba(0,0,0,0.2);
}
.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  pointer-events: none;
}

/* ============================================================
   BLOG MAIN LAYOUT
   ============================================================ */
.blog-main {
  padding-top: 56px;
  padding-bottom: 96px;
}

/* ============================================================
   CATEGORY FILTER BAR
   ============================================================ */
.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 48px;
}

.cat-btn {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  color: var(--text-mid);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}
.cat-btn:hover {
  border-color: var(--green-light);
  color: var(--green-mid);
}
.cat-btn.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

/* ============================================================
   FEATURED POST
   ============================================================ */
.featured-post {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 64px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
.featured-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(27,67,50,0.18);
}

.featured-img {
  height: 380px;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  position: relative;
  overflow: hidden;
}
.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
}

.featured-body {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-white);
}
.featured-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(224,123,34,0.1);
  border: 1px solid rgba(224,123,34,0.25);
  padding: 4px 12px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 16px;
}
.featured-body h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  line-height: 1.3;
}
.featured-body p {
  color: var(--text-mid);
  font-size: 0.925rem;
  line-height: 1.7;
  margin-bottom: 24px;
}
.featured-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.featured-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-mid);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
}
.featured-read-more:hover { color: var(--amber); }

/* ============================================================
   POSTS GRID
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.post-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-light);
}

.post-card-img {
  height: 200px;
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-img img { transform: scale(1.04); }

.post-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.post-card-cat {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(27,67,50,0.85);
  color: rgba(255,255,255,0.9);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.post-card-body {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card-date {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 10px;
}
.post-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-body p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
}
.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.post-card-read {
  color: var(--green-mid);
  font-weight: 700;
  font-size: 0.82rem;
  transition: var(--transition);
}
.post-card:hover .post-card-read { color: var(--amber); }

/* ============================================================
   SKELETON LOADERS
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skel {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}

.post-skeleton {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.post-skeleton::before {
  content: '';
  display: block;
  height: 200px;
}
.post-skeleton::before,
.post-skeleton::after {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
}
.post-skeleton::after {
  content: '';
  display: block;
  height: 140px;
  margin: 20px;
  border-radius: 6px;
}

/* ============================================================
   NO RESULTS / ERROR
   ============================================================ */
.no-results, .blog-error {
  text-align: center;
  padding: 80px 24px;
  grid-column: 1 / -1;
}
.no-results p, .blog-error p {
  color: var(--text-mid);
  font-size: 1rem;
  margin-bottom: 8px;
}
.error-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.blog-error h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.error-hint {
  font-size: 0.85rem !important;
  color: var(--text-light) !important;
}
.error-hint code {
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* ============================================================
   SINGLE POST PAGE
   ============================================================ */
.post-main {
  padding-top: 100px;
  padding-bottom: 96px;
  max-width: 800px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--green-mid);
  font-weight: 500;
  transition: var(--transition);
}
.breadcrumb a:hover { color: var(--amber); }
.breadcrumb span[aria-hidden] { color: var(--text-light); }

/* Post header */
.post-category-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(224,123,34,0.1);
  border: 1px solid rgba(224,123,34,0.25);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.post-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 20px;
}

.post-meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.post-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-light);
}
.meta-icon { font-size: 1rem; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.post-tag {
  background: var(--bg-light);
  border: 1px solid var(--border);
  color: var(--text-mid);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* Featured image */
.post-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
}
.post-featured-image img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* Post body content */
.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-dark);
}
.post-content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.post-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-dark);
}
.post-content p { margin-bottom: 18px; }
.post-content ul, .post-content ol {
  margin: 0 0 18px 24px;
  padding: 0;
}
.post-content li { margin-bottom: 8px; line-height: 1.7; }
.post-content strong { color: var(--text-dark); font-weight: 700; }
.post-content a { color: var(--green-mid); font-weight: 600; }
.post-content a:hover { color: var(--amber); }
.post-content blockquote {
  border-left: 4px solid var(--amber);
  background: var(--bg-light);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-mid);
}
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}
.post-content th {
  background: var(--green-dark);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}
.post-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.post-content tr:nth-child(even) td { background: var(--bg-light); }
.post-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

/* Divider and footer actions */
.post-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0 32px;
}

.post-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 64px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-mid);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 0;
  transition: var(--transition);
}
.btn-back:hover { color: var(--amber); }

/* Related posts */
.related-posts h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-dark);
}
.related-posts .posts-grid { grid-template-columns: repeat(2, 1fr); }

/* Post loading skeleton */
.post-loading { padding: 40px 0; }
.post-skel-img  { height: 400px; margin-bottom: 32px; border-radius: var(--radius-lg); }
.post-skel-title { height: 48px; width: 80%; margin-bottom: 16px; }
.post-skel-meta { height: 20px; width: 40%; margin-bottom: 32px; }
.post-skel-body { height: 300px; }
.post-skel-img, .post-skel-title, .post-skel-meta, .post-skel-body {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post { grid-template-columns: 1fr; }
  .featured-img { height: 260px; }
}

@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; }
  .related-posts .posts-grid { grid-template-columns: 1fr; }
  .post-footer-actions { flex-direction: column; align-items: flex-start; }
  .blog-hero { padding: 120px 24px 60px; }
}
