/* ============================================
   Printer Parts / Drone Repair — Premium Magazine
   Fully responsive | Mobile-first | 2026
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* --- Variables --- */
:root {
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-dark: #1e3a5f;

  --accent: #f59e0b;
  --cta: #ea580c;

  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;

  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;

  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.1);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --max-w: 1200px;
  --content-w: 760px;

  --header-h: 64px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/*============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}
.site-nav { display: flex; gap: 2px; }
.site-nav a {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.site-nav a:hover { color: var(--primary); background: var(--primary-light); }

@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .header-inner { padding: 0 14px; }
  .site-title { font-size: 1rem; }
  .site-nav a { padding: 6px 10px; font-size: 0.78rem; }
}

/*============================================
   HERO
   ============================================ */
.hero { max-width: var(--max-w); margin: 24px auto 32px; padding: 0 20px; }
.hero-content {
  background: linear-gradient(135deg, #0f172a, #1e3a5f 60%, #2563eb);
  color: #fff;
  padding: 40px 44px;
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-content::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='40' cy='40' r='8'/%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Ccircle cx='70' cy='10' r='6'/%3E%3Ccircle cx='10' cy='70' r='6'/%3E%3Ccircle cx='70' cy='70' r='6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: 300px;
  z-index: -1;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(4px);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}
.hero-label-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.4} }
.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
  max-width: 600px;
}
.hero-content p {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 500px;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero { margin: 16px auto 24px; padding: 0 14px; }
  .hero-content { padding: 28px 24px; border-radius: var(--radius-lg); }
  .hero-content h1 { font-size: 1.4rem; }
  .hero-content p { font-size: 0.85rem; }
}
@media (max-width: 480px) {
  .hero-content { padding: 24px 18px; }
  .hero-content h1 { font-size: 1.2rem; }
}

/*============================================
   MAIN CONTENT
   ============================================ */
.main-content { max-width: var(--max-w); margin: 0 auto; padding: 0 20px 40px; }

/* Section title */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--border), transparent);
}
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.section-link {
  font-size: 0.85rem; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 4px;
}
.section-link:hover { gap: 8px; }
.section-link::after { content: '→'; }

/*============================================
   POST GRID — Magazine Layout
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

/* Featured: first post spans full width */
.posts-grid > .post-card:first-child {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}
.posts-grid > .post-card:first-child:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}
.posts-grid > .post-card:first-child .post-card-image {
  height: 100%;
  min-height: 300px;
  border-radius: 0;
}
.posts-grid > .post-card:first-child .post-card-content {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.posts-grid > .post-card:first-child .post-card-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
  width: fit-content;
}
.posts-grid > .post-card:first-child h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* Regular cards */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.post-card-image {
  display: block;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg-alt);
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.post-card:hover .post-card-image img { transform: scale(1.08); }

.post-card-content { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.post-card-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 0.75rem; color: var(--text-3); margin-bottom: 8px;
}
.tag {
  display: inline-block;
  font-size: 0.65rem; font-weight: 600;
  color: var(--primary); background: var(--primary-light);
  padding: 2px 8px; border-radius: 100px;
}
.post-card-content h3 { font-size: 0.95rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.post-card-content h3 a { color: var(--text); transition: color 0.2s; }
.post-card-content h3 a:hover { color: var(--primary); }
.post-card-summary {
  font-size: 0.82rem; color: var(--text-2);
  line-height: 1.5; margin-bottom: 12px;
  flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; margin-top: auto;
  padding-top: 12px; border-top: 1px solid var(--border-light);
}
.post-card-price { display: flex; align-items: center; gap: 8px; }
.post-card-price .price { font-weight: 800; font-size: 1rem; color: var(--cta); }
.post-card-price .rating { font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.read-more { font-size: 0.8rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.read-more:hover { gap: 8px; }
.read-more::after { content: '→'; }

/* --- Grid responsive --- */
@media (max-width: 1000px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; gap: 16px; }
  .posts-grid > .post-card:first-child {
    grid-template-columns: 1fr;
  }
  .posts-grid > .post-card:first-child .post-card-image { min-height: 200px; }
  .posts-grid > .post-card:first-child .post-card-content { padding: 20px; }
  .posts-grid > .post-card:first-child h3 { font-size: 1.1rem; }
}

/*============================================
   CATEGORY GRID
   ============================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.category-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 12px;
  transition: all 0.3s;
}
.category-card:hover {
  background: var(--bg-card); border-color: var(--primary);
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.category-card .category-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  background: var(--primary-light);
  border-radius: 12px;
}
.category-card h3 { font-size: 0.78rem; font-weight: 700; }
.category-card p { font-size: 0.68rem; color: var(--text-3); line-height: 1.4; }

@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }

/*============================================
   SINGLE ARTICLE
   ============================================ */
.post-single {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.post-breadcrumb { font-size: 0.75rem; color: var(--text-3); margin-bottom: 16px; }
.post-breadcrumb a { color: var(--primary); font-weight: 500; }

.post-cover {
  margin-bottom: 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.post-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.post-meta-bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding-bottom: 20px; margin-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}
.post-meta-left {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-3);
}
.meta-sep { color: var(--border); }
.post-meta-right { display: flex; gap: 4px; }

/* Quick info card */
.product-quick-info {
  background: linear-gradient(135deg, #fffbeb, #fff 70%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.quick-info-body { display: flex; gap: 24px; flex-wrap: wrap; }
.quick-info-item { display: flex; flex-direction: column; gap: 2px; }
.quick-info-label {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-3); font-weight: 600;
}
.quick-info-value { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; }
.quick-info-value.price { color: var(--cta); }
.quick-info-value.rating { color: var(--accent); }

.buy-button {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--cta), var(--cta-hover));
  color: #fff; padding: 10px 22px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.85rem;
  transition: all 0.3s; white-space: nowrap; border: none; cursor: pointer;
}
.buy-button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(234,88,12,0.3); }
.buy-button.large { width: 100%; justify-content: center; padding: 14px 28px; font-size: 0.95rem; }

/* --- Article Body --- */
.post-content {
  font-size: 1.05rem;
  line-height: 1.95;
  color: var(--text);
  margin-bottom: 40px;
}

/* Summary block */
.post-content blockquote:first-child {
  font-size: 1rem;
  font-style: normal;
  background: var(--primary-light);
  padding: 20px 24px;
  margin: 0 0 36px;
  border-radius: var(--radius);
  color: var(--text-2);
  line-height: 1.75;
}

/* Headings */
.post-content h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 44px 0 20px;
  line-height: 1.3;
}
.post-content h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 14px;
}
.post-content h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--primary);
}

/* Paragraphs */
.post-content p { margin-bottom: 1.4rem; }
.post-content a { color: var(--primary); font-weight: 600; border-bottom: 1px solid transparent; }
.post-content a:hover { border-bottom-color: var(--primary); }
.post-content img { width: 100%; border-radius: var(--radius); margin: 28px 0; box-shadow: var(--shadow-sm); }
.post-content strong { font-weight: 700; }

/* Lists */
.post-content ul, .post-content ol { margin: 0 0 1.4rem 1.6rem; }
.post-content li { margin-bottom: 0.75rem; line-height: 1.75; }
.post-content ul li { list-style: disc; }
.post-content ol li { list-style: decimal; }
.post-content li::marker { color: var(--primary); font-weight: 600; }

/* Blockquote */
.post-content blockquote {
  margin: 28px 0; padding: 18px 24px;
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-2); line-height: 1.75;
}

/* Tables */
.post-content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 28px 0;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); font-size: 0.9rem;
}
.post-content thead th {
  background: var(--primary-dark); color: #fff;
  font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 14px 18px;
}
.post-content th, .post-content td {
  padding: 12px 18px; text-align: left;
  border-bottom: 1px solid var(--border-light); vertical-align: top;
}
.post-content tbody tr:last-child td { border-bottom: none; }
.post-content tbody tr:nth-child(even) { background: var(--bg-alt); }

/* HR */
.post-content hr {
  border: none; height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 40px 0;
}

/* CTA */
.post-footer-cta { margin-bottom: 36px; }
.cta-box {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  color: #fff; padding: 36px; border-radius: var(--radius-lg);
  text-align: center;
}
.cta-icon { font-size: 2rem; margin-bottom: 12px; }
.cta-box h3 { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.cta-box p { margin-bottom: 16px; opacity: 0.85; font-size: 0.9rem; }
.cta-box .buy-button { background: #fff; color: var(--cta); }
.cta-box .buy-button:hover { background: #f0f0f0; box-shadow: 0 6px 16px rgba(255,255,255,0.15); }
.cta-note { font-size: 0.75rem; opacity: 0.6; margin-top: 12px; }

/* Nav links */
.post-nav-links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-bottom: 32px;
}
.post-nav-links a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px; border: 1px solid var(--border);
  border-radius: var(--radius); transition: all 0.3s;
}
.post-nav-links a:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.post-nav-label { font-size: 0.75rem; color: var(--text-3); font-weight: 600; }
.post-nav-title { font-size: 0.85rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.post-nav-next { text-align: right; }

/* Affiliate */
.affiliate-disclosure {
  text-align: center; color: var(--text-3);
  font-size: 0.75rem; padding: 20px;
  border-top: 1px solid var(--border-light); line-height: 1.5;
}
.affiliate-notice { text-align: center; color: var(--text-3); font-size: 0.75rem; padding: 16px; }

/* Single article responsive */
@media (max-width: 768px) {
  .post-single { padding: 24px 16px 48px; }
  .post-title { font-size: 1.5rem; }
  .post-content { font-size: 0.95rem; line-height: 1.85; }
  .post-content h2 { font-size: 1.15rem; margin: 32px 0 16px; }
  .post-content h2::before { width: 30px; }
  .post-content blockquote:first-child { padding: 16px 18px; }
  .product-quick-info { flex-direction: column; align-items: stretch; padding: 16px 18px; }
  .quick-info-body { gap: 16px; }
  .post-nav-links { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
  .cta-box { padding: 24px 18px; }
}
@media (max-width: 480px) {
  .post-title { font-size: 1.2rem; }
  .post-meta-bar { flex-direction: column; align-items: flex-start; }
  .post-content { font-size: 0.9rem; }
  .post-content table { font-size: 0.8rem; }
  .post-content th, .post-content td { padding: 8px 10px; }
  .quick-info-body { gap: 12px; }
  .quick-info-value { font-size: 0.95rem; }
  .buy-button { width: 100%; justify-content: center; }
}

/*============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex; justify-content: center; gap: 4px;
  margin: 40px 0;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 600; color: var(--text-2);
  transition: all 0.2s;
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/*============================================
   FOOTER
   ============================================ */
.site-footer {
  text-align: center; padding: 32px 20px;
  color: var(--text-3); font-size: 0.8rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-alt);
  margin-top: 24px;
}
.site-footer p { margin-bottom: 4px; }
@media (max-width: 480px) {
  .site-footer { padding: 24px 14px; font-size: 0.75rem; }
}

/*============================================
   PAGE HEADER
   ============================================ */
.page-header { margin-bottom: 24px; padding-top: 24px; }
.page-header h1 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; }
.page-description { color: var(--text-2); margin-top: 6px; }
@media (max-width: 480px) { .page-header h1 { font-size: 1.2rem; } }
