/*
Theme Name: Wealth Way
Theme URI: https://wealthway.finance/
Author: Ajay Gochhayat
Author URI: https://wealthway.finance/
Description: A clean, ad-approval ready theme for Wealth Way - Building Wealth Through Knowledge.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wealthway
Tags: blog, finance, two-columns, custom-menu, featured-images, threaded-comments
*/

:root {
  --primary: oklch(42% 0.12 165);
  --primary-light: oklch(94% 0.03 165);
  --primary-hover: oklch(36% 0.12 165);
  --accent: oklch(62% 0.18 85);
  --bg: oklch(98.5% 0.005 80);
  --bg-alt: oklch(96% 0.008 80);
  --surface: oklch(99.5% 0.003 80);
  --text: oklch(18% 0.01 80);
  --text-secondary: oklch(40% 0.01 80);
  --text-muted: oklch(55% 0.008 80);
  --border: oklch(90% 0.008 80);
  --border-light: oklch(93% 0.005 80);
  --shadow-sm: 0 1px 3px oklch(18% 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(18% 0.01 80 / 0.08);
  --shadow-lg: 0 8px 24px oklch(18% 0.01 80 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-serif: 'Source Serif 4', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Header */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease-out);
}

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

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out) !important;
}

.nav-cta:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* Hero */
.hero {
  background: linear-gradient(145deg, var(--primary-light), var(--bg));
  padding: 80px 24px 64px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 16px;
  text-wrap: balance;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-categories {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cat {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s var(--ease-out);
}

.hero-cat:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: oklch(96% 0.04 165);
}

/* Main Layout */
.main-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
}

/* Featured Post */
.featured {
  margin-bottom: 40px;
}

.featured-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

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

.featured-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.featured-content {
  padding: 28px 32px 32px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-category {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 4px;
}

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

.featured-content h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}

.featured-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 65ch;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: oklch(88% 0.06 165);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--primary);
}

.author-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

/* Post Grid */
.posts-section h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text);
}

.posts-grid {
  display: grid;
  gap: 24px;
}

.post-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: box-shadow 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

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

.post-card-img {
  border-radius: var(--radius-sm);
  height: 120px;
  object-fit: cover;
}

.post-card-body h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  color: var(--text);
}

.post-card-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sidebar-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.sidebar-section h4 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.widget_categories ul,
.widget_archive ul,
.widget_pages ul,
.widget_nav_menu ul {
  list-style: none;
}

.widget_categories li,
.widget_archive li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.widget_categories li:last-child,
.widget_archive li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.widget_categories a,
.widget_archive a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

.widget_categories a:hover,
.widget_archive a:hover {
  color: var(--primary);
}

/* Newsletter Widget */
.newsletter-widget {
  background: var(--primary-light);
  border-color: oklch(88% 0.05 165);
}

.newsletter-widget p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.newsletter-input {
  display: flex;
  gap: 8px;
}

.newsletter-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-input input:focus {
  border-color: var(--primary);
}

.newsletter-input button {
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s var(--ease-out);
  white-space: nowrap;
}

.newsletter-input button:hover {
  background: var(--primary-hover);
}

/* Ad Spaces */
.ad-space {
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.ad-space-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

/* Footer */
.footer {
  background: oklch(16% 0.015 165);
  color: oklch(80% 0.01 165);
  padding: 64px 24px 32px;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-text {
  color: oklch(95% 0.005 80);
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: oklch(65% 0.01 165);
  max-width: 280px;
}

.footer-col h5 {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(90% 0.005 80);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.88rem;
  color: oklch(65% 0.01 165);
  transition: color 0.15s;
}

.footer-col a:hover {
  color: oklch(90% 0.01 165);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid oklch(25% 0.01 165);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: oklch(50% 0.01 165);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: oklch(22% 0.01 165);
  display: flex;
  align-items: center;
  justify-content: center;
  color: oklch(70% 0.01 165);
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
}

/* WordPress Core Styles */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.sticky .post-category::after {
  content: ' ★';
}

.gallery-caption {
  font-size: 0.82rem;
}

.bypostauthor {
  border-color: var(--primary);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-toggle { display: block; }
  .hero { padding: 48px 20px 40px; }
  .hero h1 { font-size: 1.8rem; }
  .main-layout { padding: 32px 16px; gap: 32px; }
  .featured-img { height: 180px; }
  .featured-content { padding: 20px; }
  .featured-content h2 { font-size: 1.3rem; }
  .post-card { grid-template-columns: 1fr; }
  .post-card-img { height: 160px; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .newsletter-input { flex-direction: column; }
}