:root {
  --primary-color: #0073aa;
  /* WordPress Blue */
  --primary-hover: #005177;
  --bg-color: #f9f9f9;
  --card-bg: #ffffff;
  --text-main: #101517;
  --text-muted: #646970;
  --border-color: #e0e0e0;
  --font-family: 'Inter', sans-serif;
  --transition: all 0.2s ease;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background: url('bg-overlay.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header & Titles */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 20px 0;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 40px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #60a5fa;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
}

.blog-section {
  padding: 20px 20px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.page-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 1.25rem;
  color: #e2e8f0;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Top Controls Bar */
.blog-controls-container {
  display: flex;
  justify-content: center;
  margin-bottom: 60px;
  padding: 0 20px;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
}

.search-input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 55px;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Blog Grid */
.blog-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 80px;
}

/* Cards - Altnik Glass Style */
.blog-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.card-image-link {
  display: block;
  overflow: hidden;
  height: 240px;
  background-color: rgba(0, 0, 0, 0.2);
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title-link {
  text-decoration: none;
  color: inherit;
}

.blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.blog-card:hover img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.35;
  color: #ffffff;
  transition: color 0.2s ease;
}

.blog-card:hover h2 {
  color: #60a5fa;
  text-decoration: none;
}

.blog-card .excerpt {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

/* Meta tags */
.blog-card .meta {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-card .meta span {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

/* Read More - Hidden/Subtle */
.read-more-btn {
  display: none;
}

/* Ad Unit */
.ad-unit {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  padding: 20px;
  margin-bottom: 40px;
  text-align: center;
  color: #cbd5e1;
  font-size: 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Featured Post */
@media (min-width: 1024px) {
  .blog-container>article:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: stretch;
    min-height: 420px;
  }

  .blog-container>article:first-child .card-image-link {
    width: 55%;
    height: auto;
    min-height: 100%;
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
  }

  .blog-container>article:first-child .blog-card-content {
    width: 45%;
    padding: 60px;
    justify-content: center;
  }

  .blog-container>article:first-child h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
  }

  .blog-container>article:first-child .excerpt {
    font-size: 1.125rem;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
}

/* Loading */
.loading-spinner {
  text-align: center;
  font-size: 1.25rem;
  color: #cbd5e1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  width: 100%;
  grid-column: 1 / -1;
  padding: 60px;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 60px;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: transparent;
}

#page-num {
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .page-title {
    font-size: 2.5rem;
  }

  .blog-container>article:first-child {
    flex-direction: column;
  }

  .blog-container>article:first-child img {
    width: 100%;
    height: 280px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .blog-container>article:first-child .blog-card-content {
    width: 100%;
    padding: 24px;
  }
}

/* Single Post */
.single-post {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 60px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
  max-width: 800px;
}

.single-title {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.single-post .post-content {
  font-size: 1.125rem;
  color: #cbd5e1;
  line-height: 1.8;
}

/* ------ LINK COLOR FIX START ------ */
/* This section fixes the blue links inside posts */
.single-post .post-content a {
  color: #60a5fa; /* Lighter Blue to match theme */
  text-decoration: none;
  border-bottom: 1px solid rgba(96, 165, 250, 0.3);
  transition: all 0.2s ease;
  font-weight: 500;
}

.single-post .post-content a:hover {
  color: #ffffff; /* White on hover */
  border-bottom-color: #ffffff;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
}
/* ------ LINK COLOR FIX END ------ */

.single-post .post-content p {
  line-height: 1.8;
  margin-bottom: 24px;
}

.single-post .post-content figure {
  margin: 30px 0;
  max-width: 100% !important;
}

.single-post .post-content img,
.single-post .post-content figure img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.single-post .post-content .aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.single-post .post-content .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.single-post a.back-blog {
  color: var(--primary-color);
  background: rgba(0, 115, 170, 0.1);
}

.single-post a.back-blog:hover {
  background: var(--primary-color);
}