/*
Theme Name: CamTech Guide
Theme URI: https://camtechguide.in
Author: CamTech Guide
Author URI: https://camtechguide.in
Description: A clean, fast, SEO-friendly WordPress theme for camera troubleshooting and photography blogs. Built for Google AdSense approval.
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: camtechguide
Tags: blog, photography, light, clean, seo-friendly, adsense
*/

/* ── CSS VARIABLES ── */
:root {
  --white: #ffffff;
  --bg: #faf9f7;
  --bg2: #f3f1ed;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --light: #9a9a9a;
  --accent: #d4691e;
  --accent2: #2a6496;
  --border: #e4e0d8;
  --tag-bg: #fff3ea;
  --tag-text: #c05a12;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.07);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Playfair Display', serif;
  line-height: 1.3;
  color: var(--text);
}
p { margin-bottom: 1rem; }

/* ── LAYOUT ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.page-section { padding: 56px 0; }

/* ── HEADER ── */
#masthead {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center;
  justify-content: space-between; height: 64px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
}
.logo-icon {
  width: 36px; height: 36px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; color: #fff;
}
.site-logo .accent { color: var(--accent); }

/* ── PRIMARY NAVIGATION ── */
#primary-menu { display: flex; gap: 24px; align-items: center; }
#primary-menu li a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .2s;
}
#primary-menu li a:hover,
#primary-menu li.current-menu-item a { color: var(--accent); }
.header-cta-btn {
  background: var(--accent); color: #fff !important;
  padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  transition: background .2s;
}
.header-cta-btn:hover { background: #b8520f !important; }

/* ── HERO ── */
.hero-section {
  background: linear-gradient(135deg, #fff8f3 0%, #fdf4ee 50%, #f0f7ff 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 20px 64px;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 12px; font-weight: 600; letter-spacing: .5px;
  padding: 5px 14px; border-radius: 20px; margin-bottom: 20px;
  text-transform: uppercase;
}
.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; max-width: 700px; margin: 0 auto 18px;
}
.hero-section h1 span { color: var(--accent); }
.hero-section .hero-desc {
  color: var(--muted); font-size: 1.05rem;
  max-width: 520px; margin: 0 auto 32px;
}
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: #fff;
  padding: 12px 28px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  transition: background .2s, transform .15s;
  display: inline-block;
}
.btn-primary:hover { background: #b8520f; transform: translateY(-1px); color: #fff; }
.btn-secondary {
  background: var(--white); color: var(--text);
  border: 1.5px solid var(--border);
  padding: 12px 28px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  transition: border-color .2s;
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── STATS BAR ── */
.stats-bar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 20px;
}
.stats-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.stat span { font-size: 13px; color: var(--muted); }

/* ── SECTION HEADING ── */
.section-head {
  display: flex; align-items: baseline;
  justify-content: space-between; margin-bottom: 32px;
  flex-wrap: wrap; gap: 12px;
}
.section-head h2 { font-size: 1.6rem; font-weight: 700; }
.section-head a { font-size: 14px; color: var(--accent); font-weight: 600; }

/* ── FEATURED GRID ── */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}
.featured-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s;
}
.featured-card:hover { transform: translateY(-3px); }
.featured-thumb {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover;
}
.featured-thumb-placeholder {
  width: 100%; aspect-ratio: 16/9;
  background: linear-gradient(135deg, #ffe8d6, #ffd0b5);
  display: flex; align-items: center;
  justify-content: center; font-size: 72px;
}
.featured-body { padding: 24px; }

/* ── TAGS ── */
.tag {
  display: inline-block;
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  padding: 3px 10px; border-radius: 6px;
  text-transform: uppercase; margin-bottom: 10px;
}
.tag-blue { background: #e8f0fb; color: #1a5ca8; }
.tag-green { background: #eaf4ec; color: #2a7a3a; }
.tag-gray { background: #f0eeea; color: #555; }

.featured-body h3 { font-size: 1.25rem; margin-bottom: 10px; }
.featured-body h3 a:hover { color: var(--accent); }
.featured-body .excerpt { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.post-meta { font-size: 12px; color: var(--light); display: flex; gap: 14px; flex-wrap: wrap; }
.read-more { color: var(--accent); font-size: 13px; font-weight: 600; display: inline-block; margin-top: 12px; }
.read-more:hover { text-decoration: underline; }

/* ── SIDEBAR POSTS ── */
.sidebar-list { display: flex; flex-direction: column; gap: 12px; }
.sidebar-post {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: transform .2s;
}
.sidebar-post:hover { transform: translateX(3px); }
.sidebar-thumb-icon {
  width: 64px; height: 64px; border-radius: 8px;
  flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-size: 28px;
}
.sidebar-post h4 { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.sidebar-post h4 a:hover { color: var(--accent); }
.sidebar-post .meta { font-size: 12px; color: var(--muted); }

/* ── CATEGORIES GRID ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 18px;
  text-align: center; transition: transform .2s, border-color .2s;
  display: block;
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.cat-icon { font-size: 36px; margin-bottom: 10px; }
.cat-card h3 { font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cat-card .count { font-size: 12px; color: var(--muted); }

/* ── POSTS GRID ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-thumb-placeholder {
  aspect-ratio: 16/9;
  display: flex; align-items: center;
  justify-content: center; font-size: 48px;
}
.card-body { padding: 18px; }
.card-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  line-height: 1.4; margin: 8px 0 8px;
}
.card-body h3 a:hover { color: var(--accent); }
.card-body .excerpt { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

/* ── PROBLEM SOLVER WIDGET ── */
.problem-solver {
  background: linear-gradient(135deg, #fff8f3, #fdf4ee);
  border-radius: 20px; border: 1px solid #f0d8c5;
  padding: 40px; text-align: center;
}
.problem-solver h2 { font-size: 1.6rem; margin-bottom: 10px; }
.problem-solver .subtitle { color: var(--muted); margin-bottom: 28px; }
.problem-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.problem-tag {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 20px; padding: 7px 16px;
  font-size: 13px; font-weight: 500; color: var(--text);
  cursor: pointer; transition: all .2s;
}
.problem-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.search-bar { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.search-bar input {
  flex: 1; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 14px; background: var(--white);
}
.search-bar input:focus { outline: none; border-color: var(--accent); }
.search-bar button {
  background: var(--accent); color: #fff; border: none;
  padding: 12px 20px; border-radius: 10px; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: background .2s;
}
.search-bar button:hover { background: #b8520f; }

/* ── AD BLOCKS ── */
.ad-block {
  background: var(--bg2); border: 1.5px dashed var(--border);
  border-radius: var(--radius); padding: 20px;
  text-align: center; margin: 32px 0;
}
.ad-block .ad-label { font-size: 11px; color: var(--light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }

/* ── NEWSLETTER ── */
.newsletter-section {
  background: var(--accent2); border-radius: 20px;
  padding: 48px 40px; text-align: center; color: #fff;
}
.newsletter-section h2 { color: #fff; font-size: 1.7rem; margin-bottom: 10px; }
.newsletter-section p { opacity: .85; margin-bottom: 28px; }
.newsletter-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; padding: 12px 16px; border: none;
  border-radius: 10px; font-family: inherit; font-size: 14px;
}
.newsletter-form button {
  background: var(--accent); color: #fff; border: none;
  padding: 12px 22px; border-radius: 10px; font-size: 14px;
  font-weight: 700; cursor: pointer; transition: background .2s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: #b8520f; }
.newsletter-note { font-size: 11px; opacity: .6; margin-top: 12px; }

/* ── SINGLE POST ── */
.post-header { max-width: 780px; margin: 0 auto 32px; }
.post-header h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 16px; }
.post-content { max-width: 780px; margin: 0 auto; }
.post-content h2 { font-size: 1.4rem; margin: 2rem 0 1rem; }
.post-content h3 { font-size: 1.2rem; margin: 1.5rem 0 .8rem; }
.post-content p { margin-bottom: 1.2rem; color: var(--muted); }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-content li { margin-bottom: .5rem; color: var(--muted); }
.post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content blockquote {
  border-left: 4px solid var(--accent); padding: 16px 20px;
  background: var(--tag-bg); border-radius: 0 8px 8px 0; margin: 1.5rem 0;
  font-style: italic; color: var(--muted);
}

/* ── SIDEBAR (single/archive) ── */
.content-sidebar-wrap {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 40px; align-items: start;
}
.sidebar-widget {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
.sidebar-widget h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 16px; color: var(--muted);
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}

/* ── PAGINATION ── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; border: 1px solid var(--border);
  background: var(--white); transition: all .2s;
}
.pagination a:hover, .pagination .current {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ── BREADCRUMBS ── */
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--accent); }
.breadcrumb span::before { content: ' » '; }

/* ── FOOTER ── */
#colophon {
  background: #1a1a1a; color: #ccc;
  padding: 56px 20px 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand p { font-size: 13px; color: #999; margin-top: 12px; line-height: 1.6; }
.footer-brand .site-logo { color: #fff; }
.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: #fff; margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { font-size: 13px; color: #999; transition: color .2s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid #333; padding-top: 20px;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: #666;
}
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: var(--accent); }

/* ── HAMBURGER / MOBILE NAV ── */
.menu-toggle {
  display: none; background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--text);
}
.mobile-nav {
  display: none; background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}
.mobile-nav ul { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav ul li a { font-size: 15px; font-weight: 500; color: var(--muted); }
.mobile-nav ul li a:hover { color: var(--accent); }
.mobile-nav.open { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .featured-grid { grid-template-columns: 1fr; }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  #primary-menu { display: none; }
  .menu-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-section { padding: 32px 20px; }
  .newsletter-form { flex-direction: column; }
  .search-bar { flex-direction: column; }
  .stats-inner { gap: 24px; }
  .problem-solver { padding: 28px 20px; }
}
