/* ==========================================================================
   Blooket Play - Blocksy Theme Replacement Stylesheet
   Version: 1.0
   Based on Blocksy theme CSS custom properties (defined inline per page)
   ========================================================================== */

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--fontFamily, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
  font-size: var(--fontSize, 16px);
  font-weight: var(--fontWeight, 400);
  line-height: var(--lineHeight, 1.65);
  color: var(--color, var(--paletteColor3));
  background-color: var(--paletteColor7, #FAFBFC);
  text-decoration: var(--textDecoration, none);
  text-transform: var(--textTransform, none);
  letter-spacing: var(--letterSpacing, 0em);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Override Blocksy ct-loading class (no JS to remove it) */
body.ct-loading { visibility: visible !important; opacity: 1 !important; }

::selection {
  color: var(--selectionTextColor, #fff);
  background-color: var(--selectionBackgroundColor, var(--paletteColor1));
}

a {
  color: var(--linkInitialColor, var(--paletteColor1));
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover, a:focus {
  color: var(--linkHoverColor, var(--paletteColor2));
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
/* Broken images: collapse and show placeholder */
img[src=""], img:not([src]) { display: none; }
img.broken-img {
  display: none !important;
}
figure.broken-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paletteColor6, #f2f5f7);
  border-radius: 6px;
  padding: 20px;
  min-height: 60px;
  max-height: 120px;
  overflow: hidden;
  color: var(--paletteColor5, #ccc);
  font-size: 13px;
  text-align: center;
}
figure.broken-figure figcaption { color: var(--paletteColor5, #aaa); }

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--headings-color, var(--paletteColor4));
  font-weight: var(--fontWeight, 700);
  line-height: var(--lineHeight, 1.5);
  margin: 0 0 0.65em;
}
h1 { font-size: var(--fontSize, 40px); }
h2 { font-size: var(--fontSize, 35px); }
h3 { font-size: var(--fontSize, 30px); }
h4 { font-size: var(--fontSize, 25px); }
h5 { font-size: var(--fontSize, 20px); }
h6 { font-size: var(--fontSize, 16px); }

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  padding: 10px 20px;
  background: var(--paletteColor1);
  color: #fff;
  z-index: 100000;
  font-size: 14px;
  border-radius: 3px;
}

/* --- Screen Reader Text --- */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--paletteColor8, #fff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#header [data-row="middle"] {
  height: var(--height, 120px);
}

#header .ct-container {
  max-width: var(--normal-container-max-width, 1290px);
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

#header [data-column] {
  display: flex;
  align-items: center;
  gap: 20px;
}

#header [data-column="end"] {
  gap: 15px;
}

[data-items="primary"] {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Site Branding */
.site-branding {
  display: flex;
  align-items: center;
}
.site-title {
  font-size: var(--fontSize, 25px);
  font-weight: var(--fontWeight, 700);
  line-height: var(--lineHeight, 1.5);
  margin: 0;
}
.site-title a {
  color: var(--linkInitialColor, var(--paletteColor4));
  text-decoration: none;
}
.site-title a:hover {
  color: var(--linkHoverColor, var(--paletteColor1));
}

/* Desktop Navigation */
.header-menu-1 ul.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 5px;
}
.header-menu-1 ul.menu > li {
  position: relative;
}
.header-menu-1 .ct-menu-link {
  display: inline-block;
  padding: 8px 12px;
  font-size: var(--fontSize, 12px);
  font-weight: var(--fontWeight, 700);
  text-transform: var(--textTransform, uppercase);
  line-height: var(--lineHeight, 1.3);
  color: var(--linkInitialColor, var(--color));
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: 3px;
  white-space: nowrap;
}
.header-menu-1 .ct-menu-link:hover {
  color: var(--linkHoverColor, var(--paletteColor1));
}

/* Sub Menu */
.header-menu-1 .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--paletteColor4, #192a3d);
  border-radius: var(--border-radius, 0 0 2px 2px);
  box-shadow: var(--box-shadow, 0 10px 20px rgba(41, 51, 61, 0.1));
  padding: 5px 0;
  list-style: none;
  z-index: 100;
}
.header-menu-1 li:hover > .sub-menu {
  display: block;
}
.header-menu-1 .sub-menu a {
  display: block;
  padding: 8px 15px;
  color: var(--linkInitialColor, #fff);
  font-size: var(--fontSize, 12px);
  font-weight: var(--fontWeight, 500);
}
.header-menu-1 .sub-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Search Button */
.ct-header-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color, var(--paletteColor3));
  transition: color 0.2s ease;
}
.ct-header-search:hover {
  color: var(--paletteColor1);
}
.ct-header-search .ct-label {
  font-size: var(--fontSize, 12px);
  font-weight: var(--fontWeight, 600);
  text-transform: var(--textTransform, uppercase);
}
.ct-header-search svg { fill: currentColor; }

/* Mobile Trigger */
.ct-header-trigger {
  display: none;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color, var(--paletteColor3));
}
.ct-header-trigger svg {
  fill: currentColor;
  width: var(--icon-size, 18px);
}
.ct-header-trigger .ct-label {
  font-size: var(--fontSize, 12px);
  font-weight: var(--fontWeight, 600);
  text-transform: var(--textTransform, uppercase);
}

/* Desktop / Mobile device switching */
[data-device="mobile"] { display: none; }
[data-device="desktop"] { display: block; }

/* Visibility helpers - Blocksy responsive hide classes */
.ct-hidden-lg { display: none !important; }
.ct-hidden-md { display: none !important; }
.ct-hidden-sm { display: none !important; }

/* ==========================================================================
   Off-Canvas Panel (Mobile Menu & Search Modal)
   ========================================================================== */
.ct-drawer-canvas {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  z-index: 9999;
}

.ct-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  pointer-events: none;
}
.ct-panel.active {
  display: block;
  pointer-events: auto;
}

/* Search Modal */
#search-modal {
  align-items: center;
  justify-content: center;
  background: var(--background-color, rgba(18, 21, 25, 0.98));
}
#search-modal.active {
  display: flex;
}
#search-modal .ct-panel-actions {
  position: absolute;
  top: 20px;
  right: 20px;
}
#search-modal .ct-panel-content {
  width: 100%;
  max-width: 600px;
  padding: 0 20px;
}
#search-modal .search-form {
  display: flex;
  gap: 0;
}
#search-modal .modal-field {
  flex: 1;
  padding: 15px 20px;
  font-size: 18px;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--form-text-initial-color, #fff);
  outline: none;
  font-family: inherit;
}
#search-modal .modal-field::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
#search-modal .modal-field:focus {
  border-bottom-color: var(--paletteColor1);
  color: var(--form-text-focus-color, #fff);
}
#search-modal .search-submit {
  background: none;
  border: none;
  padding: 15px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
}
#search-modal .search-submit:hover {
  color: #fff;
}
#search-modal .search-submit svg { fill: currentColor; }

/* Close Buttons */
.ct-toggle-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}
.ct-toggle-close:hover {
  color: #fff;
}
.ct-toggle-close svg { fill: currentColor; }

/* Off-Canvas (Side Panel) - already hidden by .ct-panel display:none */
#offcanvas .ct-panel-inner {
  position: fixed;
  top: 0;
  right: -100%;
  width: var(--side-panel-width, 500px);
  max-width: 90vw;
  height: 100%;
  background: var(--background-color, rgba(18, 21, 25, 0.98));
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: var(--box-shadow, 0 0 70px rgba(0, 0, 0, 0.35));
  padding: 20px;
}
#offcanvas.active .ct-panel-inner {
  right: 0;
}
#offcanvas .ct-panel-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

/* Mobile Menu */
.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-menu li {
  border-bottom: var(--mobile-menu-divider, none);
}
.mobile-menu .ct-menu-link {
  display: block;
  padding: 12px 0;
  font-size: var(--fontSize, 20px);
  font-weight: var(--fontWeight, 700);
  color: var(--linkInitialColor, #fff);
  transition: opacity 0.2s ease;
}
.mobile-menu .ct-menu-link:hover {
  opacity: 0.8;
}

/* Loader Circles */
[data-loader="circles"] { display: none; }

/* ==========================================================================
   Main Content
   ========================================================================== */
main.site-main {
  min-height: 50vh;
}

.ct-container,
.ct-container-full {
  max-width: var(--normal-container-max-width, 1290px);
  margin: 0 auto;
  padding: 0 15px;
}

.ct-container-narrow {
  max-width: var(--narrow-container-max-width, 750px);
  margin: 0 auto;
  padding: 0 15px;
}

/* Content vertical spacing */
[data-vertical-spacing*="top"] { padding-top: var(--content-vertical-spacing, 60px); }
[data-vertical-spacing*="bottom"] { padding-bottom: var(--content-vertical-spacing, 60px); }

/* Sidebar Layout */
.ct-container[data-sidebar] {
  display: grid;
  gap: 40px;
}
.ct-container[data-sidebar="left"] {
  grid-template-columns: 1fr 270px;
}
.ct-container[data-sidebar="right"] {
  grid-template-columns: 270px 1fr;
}

/* ==========================================================================
   Hero Section & Entry Header
   ========================================================================== */
.hero-section {
  margin-bottom: 30px;
}

.entry-header {
  margin-bottom: 15px;
}

h1.page-title {
  font-size: var(--fontSize, 30px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--headings-color, var(--paletteColor4));
}

/* Entry Meta */
.entry-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: var(--fontSize, 12px);
  font-weight: var(--fontWeight, 600);
  text-transform: var(--textTransform, uppercase);
  color: var(--color, var(--paletteColor3));
}
.entry-meta li { display: inline; }
.entry-meta[data-type*="slash"] li + li::before {
  content: "/";
  margin-right: 10px;
  opacity: 0.4;
}

/* ==========================================================================
   Featured Image
   ========================================================================== */
.ct-featured-image {
  margin: 0 0 25px;
}
.ct-featured-image .ct-image-container {
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
}
.ct-featured-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ==========================================================================
   Entry Content (Article Body)
   ========================================================================== */
.entry-content {
  line-height: var(--lineHeight, 1.65);
  color: var(--color, var(--paletteColor3));
}
.entry-content > * + * {
  margin-top: var(--content-spacing, 1.5em);
}
.entry-content p {
  margin: 0 0 var(--content-spacing, 1.5em);
}
.entry-content h2.wp-block-heading {
  font-size: 28px;
  margin-top: 2em;
  margin-bottom: 0.75em;
}
.entry-content h3.wp-block-heading {
  font-size: 24px;
  margin-top: 1.8em;
  margin-bottom: 0.65em;
}
.entry-content h4.wp-block-heading {
  font-size: 20px;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}
.entry-content ul,
.entry-content ol {
  margin: 0 0 var(--content-spacing, 1.5em);
  padding-left: 1.5em;
}
.entry-content li { margin-bottom: 0.4em; }
.entry-content strong { font-weight: 700; }
.entry-content a {
  color: var(--linkInitialColor, var(--paletteColor1));
  text-decoration: underline;
  text-decoration-color: rgba(40, 114, 250, 0.3);
  text-underline-offset: 2px;
}
.entry-content a:hover {
  color: var(--linkHoverColor, var(--paletteColor2));
  text-decoration-color: currentColor;
}
.entry-content blockquote {
  border-left: 4px solid var(--paletteColor1);
  margin: var(--content-spacing, 1.5em) 0;
  padding: 15px 20px;
  background: var(--paletteColor6);
  border-radius: 0 4px 4px 0;
}
.entry-content pre,
.entry-content code {
  font-family: var(--fontFamily, monospace);
  font-size: var(--fontSize, 14px);
  background: var(--paletteColor6);
  border-radius: 3px;
}
.entry-content code {
  padding: 2px 6px;
}
.entry-content pre {
  padding: 15px 20px;
  overflow-x: auto;
  margin: var(--content-spacing, 1.5em) 0;
}

/* --- Images in Content --- */
.entry-content figure {
  margin: var(--content-spacing, 1.5em) 0;
}
.entry-content figure img {
  border-radius: 4px;
}
.entry-content figure.aligncenter {
  text-align: center;
}
.entry-content figure.aligncenter img {
  margin: 0 auto;
}
.entry-content figcaption,
.wp-element-caption {
  font-size: 13px;
  color: var(--paletteColor3);
  opacity: 0.7;
  margin-top: 8px;
  text-align: center;
}

/* --- Broken Image Handling --- */
img {
  min-height: 40px;
}
img[src]::before {
  content: "";
  display: block;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: var(--paletteColor6, #f2f5f7);
}
img[src]::after {
  content: attr(alt);
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: var(--paletteColor3, #3A4F66);
  opacity: 0.5;
  text-align: center;
}
img:not([src]),
img[src=""] {
  min-height: 120px;
  background: var(--paletteColor6, #f2f5f7);
  border: 1px dashed var(--paletteColor5, #e1e8ed);
  border-radius: 4px;
  position: relative;
}

/* Fallback for broken images using object-fit trick */
.wp-block-image img,
.ct-image-container img,
.ct-featured-image img,
.wp-post-image {
  background: var(--paletteColor6, #f2f5f7);
  border: 1px solid transparent;
  object-fit: cover;
}
.wp-block-image img:-moz-broken,
.ct-image-container img:-moz-broken,
.wp-post-image:-moz-broken {
  min-height: 120px;
  border: 1px dashed var(--paletteColor5);
}

/* ==========================================================================
   YouTube Embed (Responsive 16:9)
   ========================================================================== */
.wp-block-embed-youtube,
.wp-block-embed.wp-has-aspect-ratio {
  margin: var(--content-spacing, 1.5em) 0;
}
.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 4px;
}
.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Table of Contents (Rank Math)
   ========================================================================== */
.wp-block-rank-math-toc-block {
  background: var(--paletteColor6);
  border: 1px solid var(--paletteColor5);
  border-radius: 6px;
  padding: 20px 25px;
  margin: var(--content-spacing, 1.5em) 0;
}
.wp-block-rank-math-toc-block nav > div {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--headings-color, var(--paletteColor4));
}
.wp-block-rank-math-toc-block nav ol {
  counter-reset: item;
  padding-left: 0;
}
.wp-block-rank-math-toc-block nav ol li {
  display: block;
  margin-bottom: 6px;
}
.wp-block-rank-math-toc-block nav ol li::before {
  content: counters(item, ".") ". ";
  counter-increment: item;
  font-weight: 600;
  color: var(--paletteColor1);
}
.wp-block-rank-math-toc-block a {
  color: var(--color, var(--paletteColor3));
  text-decoration: none;
}
.wp-block-rank-math-toc-block a:hover {
  color: var(--paletteColor1);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
aside#sidebar,
aside[data-type] {
  order: 2;
}
.ct-container[data-sidebar="left"] > aside { order: -1; }

.ct-sidebar {
  position: sticky;
  top: calc(var(--header-height, 120px) + 30px);
}

.ct-widget {
  margin-bottom: 30px;
}
.ct-widget .widget-title,
.ct-sidebar .widget-title {
  font-size: var(--fontSize, 18px);
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--headings-color, var(--paletteColor4));
}

/* Search Widget */
.wp-block-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wp-block-search__label {
  font-weight: 700;
  font-size: 18px;
  color: var(--headings-color, var(--paletteColor4));
  display: block;
  margin-bottom: 5px;
}
.wp-block-search__inside-wrapper {
  display: flex;
  gap: 0;
}
.wp-block-search__input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color, var(--paletteColor5));
  border-radius: 3px 0 0 3px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}
.wp-block-search__input:focus {
  border-color: var(--paletteColor1);
}
.wp-block-search__button {
  padding: 8px 16px;
  background: var(--buttonInitialColor, var(--paletteColor1));
  color: var(--buttonTextInitialColor, #fff);
  border: none;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--buttonFontSize, 15px);
  font-weight: var(--buttonFontWeight, 500);
  transition: background 0.2s ease;
}
.wp-block-search__button:hover {
  background: var(--buttonHoverColor, var(--paletteColor2));
}

/* Categories Widget */
.wp-block-categories {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wp-block-categories li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color, var(--paletteColor5));
}
.wp-block-categories li:last-child { border-bottom: none; }
.wp-block-categories a {
  color: var(--linkInitialColor, var(--color));
  font-size: 14px;
  text-decoration: none;
}
.wp-block-categories a:hover {
  color: var(--paletteColor1);
}

/* ==========================================================================
   Post Navigation (Prev/Next)
   ========================================================================== */
.post-navigation {
  display: flex;
  gap: 20px;
  padding: 30px 0;
  margin-top: 30px;
  border-top: 1px solid var(--border-color, var(--paletteColor5));
}
.post-navigation a {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  text-decoration: none;
  color: var(--linkInitialColor, var(--color));
  padding: 10px;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.post-navigation a:hover {
  background: var(--paletteColor6);
}
.post-navigation .nav-item-next {
  justify-content: flex-end;
  text-align: right;
}
.post-navigation .ct-image-container {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  line-height: 0;
}
.post-navigation .ct-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-navigation .ct-image-container svg {
  display: none;
}
.post-navigation .item-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.post-navigation .item-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.6;
  letter-spacing: 0.05em;
}
.post-navigation .item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--headings-color, var(--paletteColor4));
  line-height: 1.3;
}

/* ==========================================================================
   Related Posts
   ========================================================================== */
.ct-related-posts-container {
  background: var(--paletteColor6, #f2f5f7);
  padding: 50px 0;
  margin-top: 0;
}
.ct-related-posts {
  max-width: var(--normal-container-max-width, 1290px);
  margin: 0 auto;
}
.ct-block-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--headings-color, var(--paletteColor4));
}
.ct-related-posts-items[data-layout="grid"] {
  display: grid;
  grid-template-columns: var(--grid-template-columns, repeat(3, 1fr));
  gap: 25px;
}
.ct-related-posts-items article {
  background: var(--paletteColor8, #fff);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ct-related-posts-items article:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.ct-related-posts-items .ct-image-container {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--paletteColor6);
  line-height: 0;
}
.ct-related-posts-items .ct-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.ct-related-posts-items article:hover .ct-image-container img {
  transform: scale(1.03);
}
.ct-related-posts-items h4.related-entry-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding: 15px 15px 5px;
}
.ct-related-posts-items h4.related-entry-title a {
  color: var(--headings-color, var(--paletteColor4));
  text-decoration: none;
}
.ct-related-posts-items h4.related-entry-title a:hover {
  color: var(--paletteColor1);
}
.ct-related-posts-items .entry-meta {
  padding: 0 15px 15px;
  font-size: 12px;
  opacity: 0.7;
}

/* ==========================================================================
   Comments
   ========================================================================== */
.ct-comments-container {
  padding: var(--content-vertical-spacing, 60px) 15px;
}
.ct-comments-container .ct-container-narrow {
  max-width: var(--narrow-container-max-width, 750px);
  margin: 0 auto;
}
.comment-reply-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}
.ct-cancel-reply a {
  font-size: 13px;
  margin-left: 10px;
}
.comment-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--headings-color, var(--paletteColor4));
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color, var(--paletteColor5));
  border-radius: 3px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--paletteColor1);
}
.comment-form textarea {
  height: var(--form-field-height, 170px);
  resize: vertical;
}
.comment-form p {
  margin-bottom: 15px;
}
.comment-form .form-submit button,
.comment-form .form-submit input[type="submit"] {
  padding: var(--button-padding, 10px 25px);
  background: var(--buttonInitialColor, var(--paletteColor1));
  color: var(--buttonTextInitialColor, #fff);
  border: var(--button-border, none);
  border-radius: var(--buttonBorderRadius, 3px);
  font-size: var(--buttonFontSize, 15px);
  font-weight: var(--buttonFontWeight, 500);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}
.comment-form .form-submit button:hover,
.comment-form .form-submit input[type="submit"]:hover {
  background: var(--buttonHoverColor, var(--paletteColor2));
}
.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}
.comment-form-cookies-consent input { margin-top: 3px; }
.comment-notes {
  font-size: 13px;
  opacity: 0.7;
}
.required { color: #cf2e2e; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer.ct-footer {
  background-color: var(--paletteColor6, #f2f5f7);
  color: var(--color, var(--paletteColor3));
}

footer [data-row="top"] {
  padding: var(--container-spacing, 30px) 0;
}
footer [data-row="top"] > .ct-container {
  max-width: var(--normal-container-max-width, 1290px);
  margin: 0 auto;
  padding: 0 15px;
  display: grid;
  grid-template-columns: var(--grid-template-columns, repeat(2, 1fr));
  gap: 30px;
}

footer [data-row="bottom"] {
  border-top: 1px solid var(--border-color, var(--paletteColor5));
  padding: var(--container-spacing, 25px) 0;
}
footer [data-row="bottom"] > .ct-container {
  max-width: var(--normal-container-max-width, 1290px);
  margin: 0 auto;
  padding: 0 15px;
}

.ct-footer-copyright {
  font-size: var(--fontSize, 15px);
  font-weight: var(--fontWeight, 400);
  line-height: var(--lineHeight, 1.3);
}
.ct-footer-copyright p { margin: 0; }
.ct-footer-copyright a {
  color: var(--paletteColor1);
  text-decoration: underline;
  text-decoration-color: rgba(40, 114, 250, 0.3);
}
.ct-footer-copyright a:hover {
  text-decoration-color: currentColor;
}

/* Footer Widget - Latest Posts */
.wp-block-latest-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wp-block-latest-posts li {
  padding: 5px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.wp-block-latest-posts li:last-child { border-bottom: none; }
.wp-block-latest-posts a {
  color: var(--color, var(--paletteColor3));
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.wp-block-latest-posts a:hover {
  color: var(--paletteColor1);
}

/* ==========================================================================
   Entry Cards (Blog/Archive Listings)
   ========================================================================== */
.entries {
  display: grid;
  grid-template-columns: var(--grid-template-columns, repeat(3, minmax(0, 1fr)));
  gap: 25px;
}
.entry-card {
  background: var(--paletteColor8, #fff);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--box-shadow, 0 12px 18px -6px rgba(34, 56, 101, 0.04));
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.entry-card:hover {
  box-shadow: 0 8px 25px rgba(34, 56, 101, 0.1);
  transform: translateY(-2px);
}
.entry-card .ct-image-container {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--paletteColor6);
}
.entry-card .ct-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.entry-card .entry-title {
  font-size: var(--fontSize, 20px);
  line-height: var(--lineHeight, 1.3);
  padding: 15px 15px 5px;
  margin: 0;
}
.entry-card .entry-title a {
  color: var(--headings-color, var(--paletteColor4));
  text-decoration: none;
}
.entry-card .entry-title a:hover {
  color: var(--paletteColor1);
}
.entry-card .entry-meta {
  padding: 0 15px 15px;
}
.entry-card .entry-excerpt {
  padding: 0 15px 15px;
  font-size: 14px;
  opacity: 0.85;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.ct-breadcrumbs {
  font-size: var(--fontSize, 12px);
  font-weight: var(--fontWeight, 600);
  text-transform: var(--textTransform, uppercase);
  margin-bottom: 15px;
  opacity: 0.7;
}
.ct-breadcrumbs a {
  color: var(--color, var(--paletteColor3));
  text-decoration: none;
}
.ct-breadcrumbs a:hover {
  color: var(--paletteColor1);
}

/* ==========================================================================
   SVG Icons
   ========================================================================== */
.ct-icon { fill: currentColor; }

/* ==========================================================================
   WP Block alignments
   ========================================================================== */
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.alignwide { max-width: calc(var(--normal-container-max-width, 1290px) + var(--wide-offset, 130px)); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(-50vw + 50%); }

/* ==========================================================================
   Responsive: Tablet (< 1000px)
   ========================================================================== */
@media (max-width: 999.98px) {
  /* Switch to mobile header */
  [data-device="desktop"] { display: none; }
  [data-device="mobile"] { display: block; }

  .ct-header-trigger { display: inline-flex; }

  /* Header height */
  #header [data-row="middle"] {
    height: var(--height, 70px);
  }

  /* Sidebar hidden on tablet */
  .ct-hidden-md { display: none !important; }

  .ct-container[data-sidebar] {
    grid-template-columns: 1fr;
  }
  aside#sidebar,
  aside[data-type] {
    display: none;
  }

  /* Related posts 2 columns */
  .ct-related-posts-items[data-layout="grid"] {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer single column */
  footer [data-row="top"] > .ct-container {
    grid-template-columns: 1fr;
  }

  /* Entry cards 2 columns */
  .entries {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Responsive: Mobile (< 690px)
   ========================================================================== */
@media (max-width: 689.98px) {
  .ct-hidden-sm { display: none !important; }

  :root {
    --content-vertical-spacing: 50px;
  }

  /* Related posts 1 column */
  .ct-related-posts-items[data-layout="grid"] {
    grid-template-columns: 1fr;
  }

  /* Entry cards 1 column */
  .entries {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  /* Post navigation stack */
  .post-navigation {
    flex-direction: column;
  }
  .post-navigation .nav-item-next {
    justify-content: flex-start;
    text-align: left;
    flex-direction: row-reverse;
  }

  /* Footer spacing */
  footer [data-row="top"] {
    padding: 15px 0;
  }
  footer [data-row="bottom"] > .ct-container {
    padding: 15px;
  }

  /* Heading sizes reduction */
  h1.page-title,
  .entry-content h2.wp-block-heading {
    font-size: 24px;
  }
  .entry-content h3.wp-block-heading {
    font-size: 20px;
  }

  /* Off-canvas wider on mobile */
  #offcanvas .ct-panel-inner {
    width: var(--side-panel-width, 90vw);
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  #header, footer.ct-footer, aside#sidebar, .ct-drawer-canvas,
  .post-navigation, .ct-related-posts-container, .ct-comments-container { display: none; }
  body { background: #fff; }
  .ct-container[data-sidebar] { grid-template-columns: 1fr; }
}
