/*
Theme Name: Modern Gutenberg Canvas
Theme URI: https://wpthemium.com
Author: AweBootstrap & Antigravity
Author URI: https://wpthemium.com
Description: Ultra-fast, lightweight Gutenberg-ready theme engineered for Full Site Editing compatibility, uniform left-aligned article layouts, native block styling, and blazing Core Web Vitals.
Version: 1.2.0
Requires at least: 6.0
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: modern-gutenberg-canvas
*/

:root {
  --container-max: 1180px;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #0ea5e9;
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --bg-body: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-body);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

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

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header & Navigation */
.site-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(8px);
}

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

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

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

.site-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: none;
}
@media (min-width: 768px) {
  .site-tagline { display: inline-block; }
}

/* Navigation Menus */
.primary-nav {
  display: flex;
  align-items: center;
}

.primary-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.primary-menu li {
  position: relative;
}

.primary-menu a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a {
  color: var(--primary);
  background-color: var(--bg-subtle);
  text-decoration: none;
}

/* Hamburger Button */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger-btn span {
  width: 100%;
  height: 2.5px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.25s ease-in-out;
}

.hamburger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 991px) {
  .hamburger-btn {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    display: block;
  }

  .primary-nav.is-open {
    max-height: 400px;
  }

  .primary-menu {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px;
    gap: 4px;
  }

  .primary-menu li {
    width: 100%;
  }

  .primary-menu a {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.05rem;
  }
}

/* Homepage Clean Canvas (No redundant hero banner) */
.home .page-hero,
.blog .page-hero {
  display: none !important;
}
.home .site-main,
.blog .site-main {
  padding-top: 36px;
}

/* Single Post Layout & Strict Uniform Alignment */
.single-post-wrapper {
  padding: 40px 0 80px;
}

.single-header {
  text-align: left;
  margin-bottom: 32px;
}

.single-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0 16px;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .single-title {
    font-size: 1.85rem;
  }
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.post-category {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.single-featured-image {
  margin: 0 0 40px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.single-featured-image img {
  width: 100%;
  height: auto;
}

/* UNIFIED ARTICLE CONTENT ENGINE (Strict Left-Aligned Grid) */
.entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1e293b;
  width: 100%;
}

/* ALL content elements share the exact same left margin and full width */
.entry-content > * {
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  text-align: left;
}

.entry-content h2 {
  font-size: 1.8rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.35em;
  margin-top: 2em;
}

.entry-content h3 {
  font-size: 1.4rem;
  margin-top: 1.6em;
}

.entry-content p {
  margin-top: 0;
  margin-bottom: 1.3em;
  text-align: left;
}

/* Lead intro paragraph */
.entry-content p.has-medium-font-size,
.entry-content p.post-lead {
  font-size: 1.18rem;
  line-height: 1.8;
  color: #0f172a;
}

/* Table of Contents (Rank Math Recognized) */
.rank-math-block,
#rank-math-toc,
.wp-block-rank-math-toc {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 32px 0;
  width: 100%;
  box-sizing: border-box;
}

.rank-math-block h2,
#rank-math-toc h2 {
  font-size: 1.25rem;
  margin: 0 0 14px 0;
  border-bottom: none;
  padding-bottom: 0;
  color: var(--text-dark);
  font-weight: 700;
}

#rank-math-toc ul,
.rank-math-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#rank-math-toc li,
.rank-math-block li {
  margin-bottom: 8px;
  font-size: 0.98rem;
}

#rank-math-toc a,
.rank-math-block a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
#rank-math-toc a:hover,
.rank-math-block a:hover {
  text-decoration: underline;
}

/* Gutenberg Comparison Tables */
.wp-block-table,
.comparison-table-wrapper,
.comparison-table {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.wp-block-table th {
  background-color: var(--bg-subtle);
  color: var(--text-dark);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 2px solid var(--border-color);
  font-size: 0.95rem;
}

.wp-block-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.wp-block-table tr:hover td {
  background-color: #f1f5f9;
}

/* Image Figures & Banners */
.wp-block-image {
  width: 100% !important;
  max-width: 100% !important;
  margin: 28px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Columns and Card Grids */
.wp-block-columns {
  width: 100% !important;
  max-width: 100% !important;
  margin: 28px 0;
  box-sizing: border-box;
}

.comparison-card,
.product-review-card,
.faq-item-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
  width: 100%;
  box-sizing: border-box;
}

/* Blockquotes */
blockquote, .wp-block-quote {
  border-left: 4px solid var(--primary);
  margin: 28px 0;
  padding: 16px 24px;
  background-color: var(--bg-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--text-dark);
  width: 100%;
  box-sizing: border-box;
}

/* Buttons */
.wp-block-button__link {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff !important;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.wp-block-button__link:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

/* Footer */
.site-footer {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 60px 0 30px;
  margin-top: 80px;
  border-top: 1px solid #1e293b;
}

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

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.35rem;
  margin: 0 0 12px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 440px;
}

.footer-column h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.footer-column a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Post Cards Grid (Index & Archive) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.post-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle);
  overflow: hidden;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 8px 0 10px;
  line-height: 1.35;
}

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

.post-card-excerpt {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}
