*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #334155;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #046bd2;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #0354a8;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: #046bd2;
  color: #fff;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 1rem;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.site-title:hover {
  color: #046bd2;
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.main-nav a {
  color: #334155;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: #046bd2;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #1e293b;
  padding: 0.25rem;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 20px 1.5rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 0.65rem 0;
  color: #334155;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* Main */
.site-main {
  padding: 2.5rem 0 3rem;
}

.page-title {
  font-size: 1.75rem;
  color: #1e293b;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* Post grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 2rem;
}

.post-card {
  display: flex;
  flex-direction: column;
}

.post-card-image {
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 2px;
}

.post-card-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card-image:hover img {
  transform: scale(1.03);
}

.post-category {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #046bd2;
  margin-bottom: 0.5rem;
}

.post-category:hover {
  color: #0354a8;
}

.post-card-title {
  font-size: 1.35rem;
  line-height: 1.35;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.65rem;
}

.post-card-title a {
  color: inherit;
}

.post-card-title a:hover {
  color: #046bd2;
}

.post-meta {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.post-meta a {
  color: #046bd2;
  font-weight: 500;
}

.post-excerpt {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 1rem;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 500;
}

.pagination a {
  color: #334155;
  border: 1px solid #e2e8f0;
}

.pagination a:hover {
  border-color: #046bd2;
  color: #046bd2;
}

.pagination .current {
  background: #046bd2;
  color: #fff;
  border: 1px solid #046bd2;
}

/* Single post */
.single-post-header {
  margin-bottom: 1.5rem;
}

.single-post-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.3;
  color: #1e293b;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.single-post-meta {
  font-size: 0.9rem;
  color: #64748b;
}

.single-post-meta a {
  color: #046bd2;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.entry-content {
  font-size: 1rem;
  color: #334155;
}

.entry-content p {
  margin-bottom: 1.25rem;
}

.entry-content h2 {
  font-size: 1.5rem;
  color: #1e293b;
  margin: 2rem 0 1rem;
  font-weight: 700;
}

.entry-content h3 {
  font-size: 1.2rem;
  color: #1e293b;
  margin: 1.5rem 0 0.75rem;
  font-weight: 600;
}

.ad-slot {
  min-height: 90px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  text-align: center;
  background: transparent;
  border: none;
}

.ad-slot--live {
  min-height: auto;
  display: block;
}

.ad-slot ins.adsbygoogle {
  display: block;
  min-height: 90px;
}

.ad-slot--banner {
  margin-bottom: 2rem;
}

.ad-slot--footer {
  margin-top: 2rem;
  margin-bottom: 0;
}

.ad-slot--empty {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Facebook in-app GIF overlay (fb users only) */
.jc-fb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.jc-fb-overlay.is-visible {
  display: flex;
}

.jc-fb-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.jc-fb-overlay img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ad-slot--category-main,
.ad-slot--in-grid {
  grid-column: 1 / -1;
  min-height: 100px;
}

.ad-slot--mobile-anchor {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99990;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 4px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .ad-slot--mobile-anchor {
    display: block;
  }

  .ad-slot--mobile-anchor.ad-slot--empty {
    display: none;
  }

  .ad-slot ins.adsbygoogle {
    min-height: 60px;
  }
}

.ad-interstitial {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.ad-interstitial.is-closing {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ad-interstitial-box {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  max-width: 100%;
  width: 100%;
  max-width: 480px;
}

.ad-interstitial-close {
  position: absolute;
  top: 4px;
  right: 8px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
  z-index: 2;
  padding: 4px 8px;
}

.ad-slot--interstitial {
  min-height: 250px;
}

.post-nav {
  margin: 2.5rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.post-nav-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.post-nav a {
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
}

.post-nav a:hover {
  color: #046bd2;
}

.related-posts {
  margin-top: 2.5rem;
}

.related-posts h2 {
  font-size: 1.35rem;
  color: #1e293b;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.related-card h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 0.5rem 0;
  font-weight: 600;
}

.related-card h3 a {
  color: #1e293b;
}

.related-card h3 a:hover {
  color: #046bd2;
}

.related-card .post-meta {
  margin-bottom: 0;
}

/* Comments */
.comments-area {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.comments-area h3 {
  font-size: 1.25rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.comments-note {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.25rem;
}

.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: #334155;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  font: inherit;
  margin-bottom: 1rem;
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form .checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.comment-form button {
  background: #046bd2;
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  font: inherit;
  font-weight: 600;
  border-radius: 2px;
  cursor: pointer;
}

.comment-form button:hover {
  background: #0354a8;
}

/* Static pages */
.static-page {
  max-width: 800px;
}

.static-page h1 {
  font-size: 2rem;
  color: #1e293b;
  margin-bottom: 1.25rem;
}

.static-page h2 {
  font-size: 1.35rem;
  color: #1e293b;
  margin: 1.75rem 0 0.75rem;
}

.static-page p,
.static-page li {
  margin-bottom: 1rem;
  color: #475569;
}

.static-page ul {
  padding-left: 1.5rem;
}

.contact-form .form-row {
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 2rem 0;
  background: #fff;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}

.footer-nav a {
  color: #64748b;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: #046bd2;
}

.footer-copy {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 900px) {
  .posts-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-ads {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .site-main {
    padding: 1.5rem 0 2rem;
  }

  .posts-grid {
    gap: 2rem;
  }
}
