/*
Theme Name:  MyTheme
Theme URI:   https://esaran.com
Author:      eSaran
Author URI:  https://esaran.com
Description: A clean, flexible base theme built for Elementor-based projects. Designed as a silent foundation — no opinionated layout, no color overrides — just solid infrastructure for company profiles, landing pages, and blogs.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mytheme
Tags:        elementor, blog, company-profile, custom-background, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, theme-options
*/

/* =============================================================
   TABLE OF CONTENTS
   1. CSS Variables
   2. Reset & Base
   3. Typography
   4. Layout & Container
   5. Header
   6. Navigation
   7. Main Content
   8. Sidebar
   9. Footer
   10. Blog — Archive & Single
   11. Comments
   12. Widgets
   13. Forms
   14. Utility Classes
   15. Accessibility
   16. Responsive
   ============================================================= */


/* ─────────────────────────────────────────────
   1. CSS VARIABLES
   ───────────────────────────────────────────── */
:root {
  /* Colors — override per project */
  --color-primary:      #2563EB;
  --color-primary-dark: #1D4ED8;
  --color-secondary:    #64748B;
  --color-accent:       #F59E0B;
  --color-text:         #1E293B;
  --color-text-muted:   #64748B;
  --color-bg:           #FFFFFF;
  --color-bg-alt:       #F8FAFC;
  --color-border:       #E2E8F0;
  --color-heading:      #0F172A;

  /* Typography */
  --font-base:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'Courier New', Courier, monospace;

  /* Font Sizes — fluid scale */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md:   1.125rem;   /* 18px */
  --text-lg:   1.25rem;    /* 20px */
  --text-xl:   1.5rem;     /* 24px */
  --text-2xl:  1.875rem;   /* 30px */
  --text-3xl:  2.25rem;    /* 36px */
  --text-4xl:  3rem;       /* 48px */

  /* Font Weights */
  --weight-normal:   400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Line Heights */
  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-width:      1200px;
  --container-narrow:     800px;
  --container-wide:       1400px;
  --container-padding:    1.5rem;
  --sidebar-width:        300px;
  --gap-content-sidebar:  2.5rem;

  /* Borders */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-full: 9999px;
  --border-width: 1px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.05);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Z-index layers */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
}


/* ─────────────────────────────────────────────
   2. RESET & BASE
   ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol { list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

table { border-collapse: collapse; width: 100%; }

/* Remove default scroll padding offset for sticky header — set via JS or custom */
:target { scroll-margin-top: 80px; }


/* ─────────────────────────────────────────────
   3. TYPOGRAPHY
   ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-heading);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-normal);
}
p:last-child { margin-bottom: 0; }

strong, b { font-weight: var(--weight-bold); }
em, i { font-style: italic; }
small { font-size: var(--text-sm); }

blockquote {
  border-left: 4px solid var(--color-primary);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  overflow-x: auto;
  margin: var(--space-6) 0;
}
pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

hr {
  border: none;
  border-top: var(--border-width) solid var(--color-border);
  margin: var(--space-8) 0;
}

/* WordPress content alignment */
.alignleft  { float: left; margin: 0 var(--space-6) var(--space-4) 0; }
.alignright { float: right; margin: 0 0 var(--space-4) var(--space-6); }
.aligncenter { display: block; margin: var(--space-4) auto; text-align: center; }
.alignfull   { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.alignwide   { margin-left: -2rem; margin-right: -2rem; }


/* ─────────────────────────────────────────────
   4. LAYOUT & CONTAINER
   ───────────────────────────────────────────── */
.container {
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  padding: var(--space-12) 0;
}

/* Content + Sidebar layout */
.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-content-sidebar);
}
@media (min-width: 1024px) {
  .content-area.has-sidebar {
    grid-template-columns: 1fr var(--sidebar-width);
  }
}


/* ─────────────────────────────────────────────
   5. HEADER
   ───────────────────────────────────────────── */
.site-header {
  background: var(--color-bg);
  border-bottom: var(--border-width) solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  transition: box-shadow var(--transition-base);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}

/* Logo */
.site-branding { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.site-branding a { display: flex; align-items: center; gap: var(--space-3); color: var(--color-heading); }
.custom-logo { height: 40px; width: auto; }
.site-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-heading);
  line-height: 1;
  margin: 0;
}
.site-description {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
}


/* ─────────────────────────────────────────────
   6. NAVIGATION
   ───────────────────────────────────────────── */
.main-navigation { display: flex; align-items: center; }

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.main-navigation li { position: relative; }

.main-navigation a {
  display: block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-page-ancestor > a {
  color: var(--color-primary);
  background: rgba(37,99,235,.06);
}

/* Dropdown */
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  padding: var(--space-2);
  flex-direction: column;
}
.main-navigation li:hover > .sub-menu { display: flex; }
.main-navigation .sub-menu a {
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}

/* Hamburger toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .main-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-bg); border-bottom: var(--border-width) solid var(--color-border); box-shadow: var(--shadow-md); }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { flex-direction: column; align-items: stretch; padding: var(--space-4); gap: var(--space-1); }
  .main-navigation .sub-menu { position: static; box-shadow: none; border: none; border-left: 2px solid var(--color-border); margin-left: var(--space-4); margin-top: var(--space-1); border-radius: 0; }
  .main-navigation li:hover > .sub-menu { display: flex; }
}


/* ─────────────────────────────────────────────
   7. MAIN CONTENT
   ───────────────────────────────────────────── */
.entry-header { margin-bottom: var(--space-8); }
.entry-title { font-size: var(--text-3xl); margin-bottom: var(--space-4); }
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.entry-meta a { color: var(--color-text-muted); }
.entry-meta a:hover { color: var(--color-primary); }

.entry-thumbnail {
  margin-bottom: var(--space-8);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.entry-thumbnail img { width: 100%; object-fit: cover; }

/* WordPress core content blocks */
.entry-content { line-height: var(--leading-loose); }
.entry-content > * + * { margin-top: var(--space-4); }
.entry-content ul, .entry-content ol {
  padding-left: var(--space-6);
  list-style: revert;
}
.entry-content li + li { margin-top: var(--space-2); }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content table { margin: var(--space-6) 0; }
.entry-content th, .entry-content td {
  border: var(--border-width) solid var(--color-border);
  padding: var(--space-3) var(--space-4);
  text-align: left;
}
.entry-content th { background: var(--color-bg-alt); font-weight: var(--weight-semibold); }
.entry-content img { border-radius: var(--radius-md); }

.entry-footer {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: var(--border-width) solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Post navigation */
.post-navigation {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: var(--border-width) solid var(--color-border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
.nav-previous, .nav-next { display: flex; flex-direction: column; gap: var(--space-1); }
.nav-next { text-align: right; align-items: flex-end; }
.nav-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); font-weight: var(--weight-semibold); }
.nav-title { font-weight: var(--weight-medium); color: var(--color-text); }
.nav-title:hover { color: var(--color-primary); }


/* ─────────────────────────────────────────────
   8. SIDEBAR
   ───────────────────────────────────────────── */
.widget-area { display: flex; flex-direction: column; gap: var(--space-8); }
.widget { }
.widget-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--color-heading);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-primary);
}
.widget ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.widget ul a { color: var(--color-text); font-size: var(--text-sm); }
.widget ul a:hover { color: var(--color-primary); }


/* ─────────────────────────────────────────────
   9. FOOTER
   ───────────────────────────────────────────── */
.site-footer {
  background: var(--color-bg-alt);
  border-top: var(--border-width) solid var(--color-border);
  padding: var(--space-12) 0 var(--space-6);
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: var(--border-width) solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
}
.footer-nav a {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}
.footer-nav a:hover { color: var(--color-primary); }


/* ─────────────────────────────────────────────
   10. BLOG — ARCHIVE & SINGLE
   ───────────────────────────────────────────── */

/* Archive loop */
.posts-loop {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 640px) {
  .posts-loop.grid-2 { grid-template-columns: repeat(2, 1fr); }
  .posts-loop.grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Post card */
.post-card {
  display: flex;
  flex-direction: column;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  background: var(--color-bg);
}
.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.post-card__thumbnail { aspect-ratio: 16/9; overflow: hidden; }
.post-card__thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.post-card:hover .post-card__thumbnail img { transform: scale(1.04); }

.post-card__body { padding: var(--space-6); flex: 1; display: flex; flex-direction: column; }
.post-card__category {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.post-card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-snug);
  margin-bottom: var(--space-3);
}
.post-card__title a { color: var(--color-heading); }
.post-card__title a:hover { color: var(--color-primary); }
.post-card__excerpt { font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-normal); margin-bottom: var(--space-4); flex: 1; }
.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--color-border);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-12);
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  transition: all var(--transition-fast);
}
.pagination .page-numbers:hover,
.pagination .current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.pagination .dots { border: none; pointer-events: none; }

/* Category badges */
.cat-links a, .tags-links a {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}
.cat-links a:hover, .tags-links a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}


/* ─────────────────────────────────────────────
   11. COMMENTS
   ───────────────────────────────────────────── */
.comments-area { margin-top: var(--space-12); }
.comments-title { font-size: var(--text-xl); margin-bottom: var(--space-6); }

.comment-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-6); }
.comment-list .children { margin-left: var(--space-8); margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-6); }

.comment { display: flex; gap: var(--space-4); }
.comment-avatar img { border-radius: 50%; width: 48px; height: 48px; flex-shrink: 0; }
.comment-content { flex: 1; }
.comment-author { font-weight: var(--weight-semibold); color: var(--color-heading); }
.comment-date { font-size: var(--text-xs); color: var(--color-text-muted); }
.comment-body p { font-size: var(--text-sm); margin-top: var(--space-2); }

/* Comment form */
.comment-form { margin-top: var(--space-10); }
.comment-form label { display: block; font-size: var(--text-sm); font-weight: var(--weight-medium); margin-bottom: var(--space-2); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--color-bg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }


/* ─────────────────────────────────────────────
   12. WIDGETS
   ───────────────────────────────────────────── */
.widget_search .search-form { display: flex; gap: var(--space-2); }
.widget_search input[type="search"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.widget_search input[type="submit"] {
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.widget_search input[type="submit"]:hover { background: var(--color-primary-dark); }

/* Recent posts widget */
.widget_recent_entries li { padding-bottom: var(--space-3); border-bottom: var(--border-width) solid var(--color-border); }
.widget_recent_entries .post-date { font-size: var(--text-xs); color: var(--color-text-muted); display: block; margin-top: var(--space-1); }


/* ─────────────────────────────────────────────
   13. FORMS (Global)
   ───────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-5); }
.form-label { display: block; font-size: var(--text-sm); font-weight: var(--weight-medium); margin-bottom: var(--space-2); color: var(--color-text); }
.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  outline: none;
}
.form-control::placeholder { color: var(--color-text-muted); }


/* ─────────────────────────────────────────────
   14. UTILITY CLASSES
   ───────────────────────────────────────────── */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: 2px solid transparent;
}
.btn-primary  { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background: var(--color-primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-md); }

/* Text utilities */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.font-bold { font-weight: var(--weight-bold); }

/* Display */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: var(--space-4); }
.flex-wrap { flex-wrap: wrap; }

/* Spacing */
.mt-auto { margin-top: auto; }
.mx-auto { margin-inline: auto; }
.mb-0 { margin-bottom: 0; }

/* Visibility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Section spacing helper */
.section { padding: var(--space-20) 0; }
.section--sm { padding: var(--space-12) 0; }
.section--lg { padding: var(--space-24) 0; }

/* WordPress specific */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--text-sm); color: var(--color-text-muted); text-align: center; margin-top: var(--space-2); }
.sticky { border-left: 3px solid var(--color-primary); padding-left: var(--space-4); }
.bypostauthor { }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }


/* ─────────────────────────────────────────────
   15. ACCESSIBILITY
   ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -999px; left: 0;
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: #fff;
  font-weight: var(--weight-semibold);
  z-index: 9999;
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ─────────────────────────────────────────────
   16. RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --container-padding: 1.25rem; }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}

@media (max-width: 768px) {
  :root { --container-padding: 1rem; }
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  .site-main { padding: var(--space-8) 0; }
  .post-navigation { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr 1fr; }
  .comment-form .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  :root { --container-padding: 0.875rem; }
  h1 { font-size: var(--text-xl); }
  .footer-widgets { grid-template-columns: 1fr; }
  .posts-loop.grid-2, .posts-loop.grid-3 { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Print */
@media print {
  .site-header, .site-footer, .widget-area, .post-navigation, .comments-area { display: none; }
  .site-main { padding: 0; }
  a { color: inherit; text-decoration: underline; }
}
