/*
Theme Name: ReviewVanta
Theme URI: https://reviewvanta.com
Author: ReviewVanta
Author URI: https://reviewvanta.com
Description: A fast, lightweight, and elegant theme for Amazon product reviews and blog articles. Built for speed, readability, and clean navigation.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reviewvanta
Tags: blog, review, amazon, lightweight, fast, sidebar
*/

/* =============================================
   GOOGLE FONTS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
  --primary:       #1a6b3c;
  --primary-light: #e8f5ee;
  --primary-dark:  #134d2b;
  --accent:        #f0a500;
  --text:          #1c1c1c;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #ffffff;
  --bg-alt:        #f8f9fa;
  --sidebar-bg:    #f8faf9;
  --font-heading:  'Lora', Georgia, serif;
  --font-body:     'DM Sans', sans-serif;
  --radius:        6px;
  --shadow:        0 2px 12px rgba(0,0,0,0.07);
  --shadow-hover:  0 6px 24px rgba(0,0,0,0.12);
  --max-width:     1200px;
  --content-width: 720px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

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

ul, ol { padding-left: 1.5em; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.6em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.2em; }

blockquote {
  border-left: 4px solid var(--primary);
  padding: 0.75em 1.25em;
  margin: 1.5em 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--primary-dark);
}

code {
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: #1c1c1c;
  color: #e2e8f0;
  padding: 1.25em;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5em;
}

/* =============================================
   LAYOUT WRAPPER
   ============================================= */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 64px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.site-logo span {
  color: var(--accent);
}

/* Search in header */
.header-search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 5px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search-form:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,60,0.1);
}

.header-search-form input {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  width: 180px;
}

.header-search-form input::placeholder { color: var(--text-muted); }

.header-search-form button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  padding: 0;
  display: flex;
  align-items: center;
}

/* =============================================
   NAVIGATION
   ============================================= */
.site-nav {
  background: var(--primary);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.nav-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 2px;
}

.nav-inner ul li a {
  display: block;
  padding: 10px 16px;
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: background 0.2s, color 0.2s;
}

.nav-inner ul li a:hover,
.nav-inner ul li.current-menu-item > a {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 1.4rem;
  padding: 10px 16px;
}

/* =============================================
   MAIN CONTENT AREA
   ============================================= */
.site-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
}

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* =============================================
   POST / ARTICLE CARD (archive/home)
   ============================================= */
.posts-grid { display: flex; flex-direction: column; gap: 28px; }

.post-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  display: grid;
  grid-template-columns: 220px 1fr;
}

.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.post-card-thumb {
  overflow: hidden;
  background: var(--bg-alt);
  min-height: 160px;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.post-card-body {
  padding: 20px 22px;
}

.post-cat-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  text-decoration: none;
}

.post-cat-badge:hover { background: var(--primary); color: #fff; }

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-meta svg { flex-shrink: 0; }

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 10px;
}

.read-more-link:hover { gap: 8px; }

/* =============================================
   SINGLE POST
   ============================================= */
.single-post-header {
  margin-bottom: 28px;
}

.single-post-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--text);
}

.single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.83rem;
  color: var(--text-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.single-post-meta a { color: var(--primary); }

.single-featured-image {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 28px;
}

/* Article content */
.article-content {
  font-size: 1.02rem;
  line-height: 1.85;
  color: #2d2d2d;
}

.article-content h2 {
  font-size: 1.55rem;
  margin-top: 2em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--primary-light);
}

.article-content h3 { font-size: 1.25rem; margin-top: 1.6em; }

.article-content ul, .article-content ol {
  margin-bottom: 1.2em;
  padding-left: 1.5em;
}

.article-content li { margin-bottom: 0.4em; }

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.article-content img {
  border-radius: var(--radius);
  margin: 1.5em auto;
  max-width: 100%;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.92rem;
}

.article-content th {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
}

.article-content td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.article-content tr:nth-child(even) td { background: var(--bg-alt); }

/* Amazon CTA Button */
.amazon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #1c1c1c;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(240,165,0,0.3);
  margin: 1em 0;
}

.amazon-btn:hover {
  background: #d49400;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(240,165,0,0.35);
  color: #1c1c1c;
}

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.tag-link {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 14px;
  transition: all 0.2s;
}

.tag-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Author box */
.author-box {
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 36px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.author-avatar { border-radius: 50%; width: 64px; height: 64px; flex-shrink: 0; }

.author-info h4 { font-size: 1rem; margin-bottom: 4px; }
.author-info p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* Post navigation */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 36px;
}

.nav-post {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: all 0.2s;
}

.nav-post:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.nav-post-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

.nav-post-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.nav-next { text-align: right; }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar { position: sticky; top: 80px; }

.widget {
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
  position: relative;
}

/* Search widget */
.sidebar-search-form {
  display: flex;
  gap: 0;
}

.sidebar-search-form input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg);
}

.sidebar-search-form input:focus { border-color: var(--primary); }

.sidebar-search-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.sidebar-search-form button:hover { background: var(--primary-dark); }

/* Categories widget */
.cat-list { list-style: none; padding: 0; margin: 0; }

.cat-list li {
  border-bottom: 1px solid var(--border);
  last-child { border: none; }
}

.cat-list li:last-child { border: none; }

.cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 4px;
  color: var(--text);
  font-size: 0.88rem;
  transition: color 0.2s, padding 0.2s;
}

.cat-list li a:hover {
  color: var(--primary);
  padding-left: 8px;
}

.cat-count {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Recent posts widget */
.recent-post-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.recent-post-item:last-child { border: none; padding-bottom: 0; }

.recent-thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

.recent-post-info { flex: 1; min-width: 0; }

.recent-post-title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-title:hover { color: var(--primary); }

.recent-post-date {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}

.pagination a:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #111b16;
  color: rgba(255,255,255,0.75);
  padding: 48px 0 0;
  margin-top: 60px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.footer-brand .site-logo { color: #fff; font-size: 1.5rem; margin-bottom: 14px; display: block; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; color: rgba(255,255,255,0.55); }

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 16px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* =============================================
   SEARCH RESULTS PAGE
   ============================================= */
.search-header {
  margin-bottom: 28px;
}

.search-header h1 { font-size: 1.6rem; margin-bottom: 6px; }
.search-header p { color: var(--text-muted); font-size: 0.9rem; }

.search-highlight { color: var(--primary); font-weight: 700; }

/* =============================================
   404 PAGE
   ============================================= */
.page-404 {
  text-align: center;
  padding: 80px 20px;
}

.page-404 .error-code {
  font-family: var(--font-heading);
  font-size: 7rem;
  font-weight: 700;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 8px;
}

.page-404 h2 { font-size: 1.8rem; margin-bottom: 12px; }
.page-404 p { color: var(--text-muted); margin-bottom: 28px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* =============================================
   UTILITIES
   ============================================= */
.screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .site-content { grid-template-columns: 1fr 260px; gap: 24px; }
}

@media (max-width: 768px) {
  .site-content { grid-template-columns: 1fr; }
  .sidebar { position: static; }

  .post-card { grid-template-columns: 1fr; }
  .post-card-thumb { min-height: 200px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .single-post-title { font-size: 1.55rem; }

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

  .header-search-form { display: none; }

  .menu-toggle { display: block; }
  .primary-menu { display: none; flex-direction: column; }
  .primary-menu.active { display: flex; }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 14px; }
  .site-content { padding: 20px 14px; }
  .post-card-body { padding: 14px 16px; }
}
