/*
Theme Name: Premium Calc Theme
Theme URI: https://example.com/premium-calc-theme
Author: Antigravity
Author URI: https://example.com
Description: A premium, fast, SEO-optimized WordPress theme designated for a calculator and tools website.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
Text Domain: premium-calc

This theme uses pure CSS (no heavy frameworks) for max performance.
*/

/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
	/* Colors */
	--pc-primary: #1a73e8;
	--pc-primary-hover: #1557b0;
	--pc-bg: #f8f9fc;
	--pc-surface: #ffffff;
	--pc-text-dark: #1f2937;
	--pc-text-mute: #6b7280;
	--pc-border: #e5e7eb;
	--pc-alert-bg: #eff6ff;
	
	/* Typography */
	--pc-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	
	/* Shadows & Radii */
	--pc-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--pc-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--pc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	--pc-radius: 8px;
	--pc-radius-lg: 12px;

	/* Layout */
	--pc-max-width: 1200px;
	--pc-sidebar-width: 320px;
}

[data-theme="dark"] {
	--pc-bg: #111827;
	--pc-surface: #1f2937;
	--pc-text-dark: #f9fafb;
	--pc-text-mute: #9ca3af;
	--pc-border: #374151;
	--pc-alert-bg: #1e3a8a;
}

/* ==========================================================================
   Reset & Basics
   ========================================================================== */
*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--pc-font);
	background-color: var(--pc-bg);
	color: var(--pc-text-dark);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a:hover {
	color: var(--pc-primary-hover);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	font-weight: 700;
	line-height: 1.2;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; margin-top: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }

p { margin-top: 0; margin-bottom: 1rem; }

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.pc-container {
	max-width: var(--pc-max-width);
	margin: 0 auto;
	padding: 0 1rem;
}

.pc-layout-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	margin: 2rem 0;
}

@media (min-width: 992px) {
	.pc-layout-grid.has-sidebar {
		grid-template-columns: 1fr var(--pc-sidebar-width);
	}
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.pc-header {
	background-color: var(--pc-surface);
	border-bottom: 1px solid var(--pc-border);
	box-shadow: var(--pc-shadow-sm);
	position: sticky;
	top: 0;
	z-index: 100;
}

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

.pc-logo {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--pc-text-dark);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.pc-nav-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.5rem;
}

.pc-nav-menu a {
	color: var(--pc-text-dark);
	font-weight: 500;
}

.pc-nav-menu a:hover {
	color: var(--pc-primary);
}

.pc-header-search {
	display: flex;
	align-items: center;
}

.pc-header-search form {
	position: relative;
}

.pc-header-search input[type="search"] {
	padding: 0.5rem 1rem;
	border: 1px solid var(--pc-border);
	border-radius: 20px;
	background-color: var(--pc-bg);
	color: var(--pc-text-dark);
	outline: none;
	width: 250px;
	transition: width 0.3s ease;
}

.pc-header-search input[type="search"]:focus {
	width: 300px;
	border-color: var(--pc-primary);
}

/* Mobile Menu Toggle */
.pc-mobile-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 1.5rem;
	color: var(--pc-text-dark);
	cursor: pointer;
}

@media (max-width: 768px) {
	.pc-nav-menu { display: none; }
	.pc-header-search { display: none; }
	.pc-mobile-toggle { display: block; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.pc-hero {
	background-color: var(--pc-surface);
	padding: 4rem 1rem;
	text-align: center;
	border-bottom: 1px solid var(--pc-border);
}

.pc-hero-title {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.pc-hero-subtitle {
	color: var(--pc-text-mute);
	font-size: 1.125rem;
	max-width: 600px;
	margin: 0 auto 2rem;
}

.pc-hero-search {
	max-width: 600px;
	margin: 0 auto;
}

.pc-hero-search input {
	width: 100%;
	padding: 1rem 1.5rem;
	font-size: 1.125rem;
	border: 2px solid var(--pc-border);
	border-radius: 30px;
	outline: none;
	box-shadow: var(--pc-shadow-sm);
	background: var(--pc-surface);
	color: var(--pc-text-dark);
}

.pc-hero-search input:focus {
	border-color: var(--pc-primary);
}

/* ==========================================================================
   Tool Grids & Cards
   ========================================================================== */
.pc-section-title {
	margin-bottom: 1.5rem;
	position: relative;
	padding-bottom: 0.5rem;
}

.pc-section-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	height: 3px;
	width: 50px;
	background-color: var(--pc-primary);
	border-radius: 2px;
}

.pc-tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.5rem;
}

.pc-tool-card {
	background-color: var(--pc-surface);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	padding: 1.5rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}

.pc-tool-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--pc-shadow);
	border-color: var(--pc-primary);
}

.pc-tool-card h3 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-size: 1.25rem;
}

.pc-tool-card h3 a {
	color: var(--pc-text-dark);
}

.pc-tool-card h3 a:hover {
	color: var(--pc-primary);
}

.pc-tool-card p {
	color: var(--pc-text-mute);
	font-size: 0.875rem;
	margin-bottom: 1rem;
	flex-grow: 1;
}

.pc-tool-category-badge {
	align-self: flex-start;
	background-color: var(--pc-alert-bg);
	color: var(--pc-primary);
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	margin-bottom: 0.75rem;
	display: inline-block;
}

/* ==========================================================================
   Single Tool Page
   ========================================================================== */
.pc-single-tool-header {
	margin-bottom: 2rem;
}

.pc-breadcrumbs {
	font-size: 0.875rem;
	color: var(--pc-text-mute);
	margin-bottom: 1rem;
}

.pc-breadcrumbs a {
	color: var(--pc-primary);
}

.pc-tool-app-container {
	background-color: var(--pc-surface);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius-lg);
	padding: 2rem;
	margin-bottom: 2rem;
	box-shadow: var(--pc-shadow);
}

/* Base styles for calculators to match theme */
.pc-tool-app-container input[type="text"],
.pc-tool-app-container input[type="number"],
.pc-tool-app-container select {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	background-color: var(--pc-bg);
	color: var(--pc-text-dark);
	margin-bottom: 1rem;
}

.pc-tool-app-container button {
	background-color: var(--pc-primary);
	color: white;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: var(--pc-radius);
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}

.pc-tool-app-container button:hover {
	background-color: var(--pc-primary-hover);
}

.pc-content-box {
	background-color: var(--pc-surface);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	padding: 2rem;
	margin-bottom: 2rem;
}

.pc-content-box h2 {
	margin-top: 0;
}

/* FAQ Styles */
.pc-faq-item {
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--pc-border);
	padding-bottom: 1rem;
}

.pc-faq-item h3 {
	font-size: 1.125rem;
	margin-top: 0;
	margin-bottom: 0.5rem;
}

.pc-faq-item p {
	color: var(--pc-text-mute);
	margin: 0;
}

/* ==========================================================================
   Sidebar & Widgets
   ========================================================================== */
.pc-sidebar .widget {
	background-color: var(--pc-surface);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	padding: 1.5rem;
	margin-bottom: 2rem;
}

.pc-sidebar .widget-title {
	font-size: 1.125rem;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--pc-border);
}

.pc-sidebar ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.pc-sidebar ul li {
	margin-bottom: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--pc-border);
}

.pc-sidebar ul li:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

/* ==========================================================================
   Monetization (Ad Placeholders)
   ========================================================================== */
.pc-ad-slot {
	width: 100%;
	min-height: 90px;
	background-color: var(--pc-border);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pc-text-mute);
	font-size: 0.875rem;
	margin: 2rem 0;
	border-radius: 4px;
	overflow: hidden;
	text-align: center;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
.pc-footer {
	background-color: var(--pc-surface);
	border-top: 1px solid var(--pc-border);
	padding: 3rem 0;
	margin-top: 4rem;
}

.pc-footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.pc-footer-col h4 {
	margin-bottom: 1rem;
	font-size: 1.125rem;
}

.pc-footer-col ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.pc-footer-col ul li {
	margin-bottom: 0.5rem;
}

.pc-footer-col ul li a {
	color: var(--pc-text-mute);
}

.pc-footer-col ul li a:hover {
	color: var(--pc-primary);
}

.pc-footer-bottom {
	border-top: 1px solid var(--pc-border);
	padding-top: 1.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--pc-text-mute);
	font-size: 0.875rem;
}

/* Utility Classes */
.mt-0 { margin-top: 0 !important; }
.mb-1 { margin-bottom: 1rem !important; }
.mb-2 { margin-bottom: 2rem !important; }
.text-center { text-align: center !important; }

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

.pc-pagination a, .pc-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 4px;
	border: 1px solid var(--pc-border);
	color: var(--pc-text-dark);
	background: var(--pc-surface);
}

.pc-pagination .current {
	background: var(--pc-primary);
	color: white;
	border-color: var(--pc-primary);
}

.pc-pagination a:hover {
	border-color: var(--pc-primary);
	color: var(--pc-primary);
}
