/*
Theme Name: ApprovePress
Theme URI: https://example.com/approvepress/
Author: ApprovePress
Author URI: https://example.com/
Description: A lightweight, mobile-responsive, AdSense-ready WordPress theme. Clean professional design, fast loading, built-in ad slots (Header, Below Post Title, Inside Article, Footer) that stay empty until your AdSense account is approved, plus auto-created About, Contact, Privacy Policy and Disclaimer pages for a smooth AdSense review.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: approvepress
Tags: blog, one-column, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, adsense-ready, responsive
*/

/* ============================================================
   1. VARIABLES & BASE
   ============================================================ */
:root {
	--primary: #1d4ed8;
	--primary-dark: #1e40af;
	--ink: #0f172a;
	--body: #334155;
	--muted: #64748b;
	--line: #e2e8f0;
	--bg: #f1f5f9;
	--card: #ffffff;
	--radius: 12px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Mangal", sans-serif;
}

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

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.7;
	color: var(--body);
	background: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
	color: var(--ink);
	line-height: 1.3;
	margin: 0 0 0.6em;
	font-weight: 700;
}

p { margin: 0 0 1.2em; }

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

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto;
	position: fixed; top: 10px; left: 10px; z-index: 100000;
	background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px;
}

/* ============================================================
   2. HEADER
   ============================================================ */
.topbar { background: var(--ink); color: #cbd5e1; font-size: 0.8rem; }
.topbar-inner {
	display: flex; justify-content: space-between; align-items: center;
	padding-top: 7px; padding-bottom: 7px; gap: 12px;
}

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 900; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }

.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-branding .custom-logo { max-height: 52px; width: auto; }
.site-title { font-size: 1.5rem; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
.site-title a { color: var(--ink); }
.site-title a:hover { color: var(--primary); text-decoration: none; }

/* Navigation */
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.main-navigation a {
	display: block; padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: 0.95rem;
	border-radius: 8px;
}
.main-navigation a:hover { color: var(--primary); background: #eff6ff; text-decoration: none; }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { color: var(--primary); background: #eff6ff; }

.menu-toggle {
	display: none; align-items: center; gap: 8px;
	background: var(--ink); color: #fff; border: 0; border-radius: 8px;
	padding: 10px 14px; font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.menu-toggle-icon { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-toggle-icon span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }

/* ============================================================
   3. LAYOUT
   ============================================================ */
.site-main-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 32px;
	padding-top: 32px;
	padding-bottom: 48px;
	align-items: start;
}
.content-area { min-width: 0; }
.widget-area { min-width: 0; }

/* ============================================================
   4. POST CARDS (home / archive / search)
   ============================================================ */
.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

.post-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; display: flex; flex-direction: column;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10); }
.card-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-cats a {
	display: inline-block; background: #eff6ff; color: var(--primary);
	font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	padding: 4px 10px; border-radius: 20px; margin-right: 6px;
}
.card-cats a:hover { background: var(--primary); color: #fff; text-decoration: none; }
.card-title { font-size: 1.15rem; margin: 0; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--primary); }
.card-excerpt { color: var(--muted); font-size: 0.93rem; flex: 1; }
.card-excerpt p { margin: 0; }
.card-readmore { font-weight: 700; font-size: 0.9rem; }

/* ============================================================
   5. SINGLE POST / PAGE
   ============================================================ */
.single-post, .static-page {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 32px; margin-bottom: 32px;
}
.entry-cats { margin-bottom: 12px; }
.entry-cats a {
	display: inline-block; background: #eff6ff; color: var(--primary);
	font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	padding: 4px 10px; border-radius: 20px; margin-right: 6px;
}
.entry-title { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.static-page .entry-title { font-size: 1.8rem; }

.entry-meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }
.entry-meta .meta-sep { margin: 0 8px; color: var(--line); }
.entry-meta a { color: var(--muted); }
.entry-meta a:hover { color: var(--primary); }

.post-thumbnail { margin: 0 0 24px; border-radius: var(--radius); overflow: hidden; }
.post-thumbnail img { width: 100%; }

.entry-content { font-size: 1.06rem; line-height: 1.85; color: #1e293b; }
.entry-content h2 { font-size: 1.5rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.25rem; margin-top: 1.6em; }
.entry-content img { border-radius: 8px; }
.entry-content blockquote {
	border-left: 4px solid var(--primary); background: #f8fafc;
	margin: 1.5em 0; padding: 16px 20px; border-radius: 0 8px 8px 0; color: var(--body);
}
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content th { background: #f8fafc; }

.entry-footer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-tags a {
	display: inline-block; border: 1px solid var(--line); border-radius: 20px;
	padding: 4px 12px; font-size: 0.82rem; margin: 0 6px 6px 0; color: var(--body);
}
.post-tags a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.tags-label { font-weight: 700; color: var(--ink); margin-right: 6px; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }
.crumb-sep { margin: 0 8px; color: #cbd5e1; }

/* Author box */
.author-box {
	display: flex; gap: 18px; background: #f8fafc; border: 1px solid var(--line);
	border-radius: var(--radius); padding: 22px; margin-top: 28px;
}
.author-avatar img { border-radius: 50%; }
.author-name { font-size: 1.05rem; margin-bottom: 6px; }
.author-desc { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* Related posts */
.related-posts { margin-top: 32px; }
.related-title { font-size: 1.25rem; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.related-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.related-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.related-card-title { font-size: 0.95rem; padding: 12px 14px; margin: 0; }
.related-card-title a { color: var(--ink); }

/* ============================================================
   6. ARCHIVE HEADER / SEARCH / 404
   ============================================================ */
.archive-header {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 24px 28px; margin-bottom: 24px;
}
.archive-title { font-size: 1.6rem; margin: 0 0 6px; }
.archive-description { color: var(--muted); }
.archive-description p { margin: 0; }

.no-results, .error-404 {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 48px 32px; text-align: center;
}
.error-code { font-size: 4.5rem; font-weight: 800; color: var(--primary); margin: 0; line-height: 1; }
.button {
	display: inline-block; background: var(--primary); color: #fff !important;
	padding: 12px 26px; border-radius: 8px; font-weight: 700; margin-top: 12px;
}
.button:hover { background: var(--primary-dark); text-decoration: none; }

/* Pagination */
.pagination { margin-top: 32px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers {
	display: inline-block; min-width: 42px; padding: 8px 12px; background: var(--card);
	border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-weight: 600;
}
.pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============================================================
   7. AD SLOTS (only visible when you add code after approval)
   ============================================================ */
.ad-slot {
	margin: 20px auto; text-align: center; max-width: 100%; overflow: hidden;
	border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px; background: #f8fafc;
}
.ad-slot .ad-label {
	display: block; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
	color: #94a3b8; margin-bottom: 6px;
}
.ad-slot ins { background: transparent !important; }
.ad-header { margin-top: 0; }

/* ============================================================
   8. SIDEBAR & WIDGETS
   ============================================================ */
.widget-area .widget {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px; margin-bottom: 24px;
}
.widget-title { font-size: 1.02rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.93rem; }
.widget ul li:last-child { border-bottom: 0; }
.widget ul li a { color: var(--body); }
.widget ul li a:hover { color: var(--primary); }

/* Search form */
.search-form { display: flex; gap: 0; }
.search-form label { flex: 1; }
.search-form .search-field {
	width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px 0 0 8px;
	font-size: 0.95rem; font-family: inherit;
}
.search-form .search-submit {
	background: var(--primary); color: #fff; border: 0; border-radius: 0 8px 8px 0;
	padding: 0 20px; font-weight: 700; cursor: pointer; font-size: 0.95rem;
}
.search-form .search-submit:hover { background: var(--primary-dark); }
.no-results .search-form, .error-404 .search-form { max-width: 420px; margin: 20px auto; }

/* ============================================================
   9. COMMENTS
   ============================================================ */
.comments-area {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 32px; margin-bottom: 32px;
}
.comments-title { font-size: 1.25rem; margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list .comment { padding: 18px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; margin: 12px 0 0 48px; padding: 0; }
.comment-author .avatar { border-radius: 50%; float: left; margin-right: 14px; }
.comment-metadata { font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.comment-content p { margin-bottom: 0.8em; }
.reply { margin-top: 8px; }
.comment-reply-link { font-size: 0.85rem; font-weight: 700; }

.comment-respond { margin-top: 8px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
	font-family: inherit; font-size: 0.95rem; margin-bottom: 14px; background: #fbfdff;
}
.comment-form .submit {
	background: var(--primary); color: #fff; border: 0; border-radius: 8px;
	padding: 12px 28px; font-weight: 700; cursor: pointer; font-size: 0.95rem;
}
.comment-form .submit:hover { background: var(--primary-dark); }

/* ============================================================
   10. FOOTER
   ============================================================ */
.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 16px; }
.footer-widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 44px; padding-bottom: 36px; }
.footer-widgets .widget-title { color: #fff; border-bottom-color: var(--primary); }
.footer-widgets a { color: #cbd5e1; }
.footer-widgets a:hover { color: #fff; }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets ul li { padding: 6px 0; font-size: 0.92rem; }

.footer-bottom { border-top: 1px solid #1e293b; }
.footer-bottom-inner {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding-top: 18px; padding-bottom: 18px; font-size: 0.85rem; flex-wrap: wrap;
}
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.footer-menu a { color: #94a3b8; }
.footer-menu a:hover { color: #fff; }

/* ============================================================
   11. RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
	.site-main-wrap { grid-template-columns: minmax(0, 1fr); }
	.posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
	.topbar-tagline { display: none; }
	.menu-toggle { display: inline-flex; }
	.main-navigation {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		background: #fff; border-bottom: 1px solid var(--line);
		box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12); z-index: 950;
	}
	.main-navigation.toggled { display: block; }
	.main-navigation ul { flex-direction: column; padding: 10px 20px 18px; gap: 2px; }
	.main-navigation a { padding: 12px 8px; border-bottom: 1px solid #f1f5f9; border-radius: 0; }
	.site-header { position: sticky; }
	.header-inner { position: relative; }

	.posts-grid { grid-template-columns: minmax(0, 1fr); }
	.related-grid { grid-template-columns: minmax(0, 1fr); }
	.single-post, .static-page, .comments-area { padding: 22px 18px; }
	.entry-title { font-size: 1.55rem; }
	.author-box { flex-direction: column; }
	.footer-widgets { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 32px; }
	.footer-bottom-inner { flex-direction: column; text-align: center; }
	.comment-list .children { margin-left: 20px; }
}

/* ============================================================
   12. WORDPRESS CORE ALIGNMENT / MISC
   ============================================================ */
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.82rem; color: var(--muted); text-align: center; margin-top: 6px; }
.gallery { display: grid; gap: 12px; }
.sticky { border: 2px solid var(--primary); }
