/*
Theme Name: My Custom Theme
Theme URI: https://asmk.local
Author: ASMK
Description: Тема Ассоциации семейных врачей Кыргызской Республики. Перенесена из design-source в WordPress с поддержкой Template Hierarchy, Gutenberg и стандартных API.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 7.0
Text Domain: my-custom-theme
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: custom-logo, custom-menu, editor-style, featured-images, footer-widgets, right-sidebar, translation-ready
*/

/* ==========================================================================
   1. Custom properties
   ========================================================================== */
:root {
  --mct-navy: #0b2a4d;
  --mct-navy-soft: #123a68;
  --mct-blue: #1657b0;
  --mct-blue-hover: #0f3f8c;
  --mct-bg-soft: #eaf1fb;
  --mct-border: #e7ecf3;
  --mct-text: #1e2733;
  --mct-text-secondary: #4c5b6d;
  --mct-text-muted: #6b7a8d;
  --mct-text-muted-2: #8493a5;
  --mct-nav-text: #26313f;
  --mct-footer-text: #c9d9ee;
  --mct-footer-text-muted: #8ea3c0;
  --mct-white: #ffffff;
  --mct-font: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mct-container: 1280px;
  --mct-gutter: 32px;
  --mct-header-offset: 88px;
}

@media (max-width: 639.98px) {
  :root { --mct-gutter: 20px; }
}

/* ==========================================================================
   2. Fonts (self-hosted Golos Text, variable — Google Fonts CSS2 shape)
   ========================================================================== */
/* cyrillic-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/golos-text-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/golos-text-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/golos-text-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/fonts/golos-text-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   3. Base reset (kept minimal + scoped so plugin/admin UI stays unaffected;
      this stylesheet is enqueued front-end only)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--mct-font);
  color: var(--mct-text);
  background: var(--mct-white);
  -webkit-font-smoothing: antialiased;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--mct-header-offset);
  /* Clipping horizontal overflow here (not on .site or body) avoids the
     well-known bug where overflow-x on an ancestor of a position:sticky
     element implicitly sets overflow-y too, turning that ancestor into
     the sticky containing block instead of the real viewport. */
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--mct-blue); text-decoration: none; }
a:hover { color: var(--mct-blue-hover); }
::placeholder { color: #94a3b8; }
:focus-visible { outline: 2px solid var(--mct-blue); outline-offset: 2px; }
.site { background: var(--mct-white); color: var(--mct-text); }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff; clip: auto !important; clip-path: none; color: #0b2a4d;
  display: block; height: auto; left: 5px; line-height: normal;
  padding: 12px 16px; text-decoration: none; top: 5px; width: auto; z-index: 100000;
  box-shadow: 0 0 4px rgba(0,0,0,.3); border-radius: 6px;
}

.mct-container {
  max-width: var(--mct-container);
  margin: 0 auto;
  padding: 0 var(--mct-gutter);
}

/* ==========================================================================
   4. Utility bar
   ========================================================================== */
.mct-topbar {
  background: var(--mct-navy);
  color: var(--mct-footer-text);
  font-size: 13px;
}
.mct-topbar .mct-container {
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.mct-langs { display: flex; gap: 10px; align-items: center; list-style: none; margin: 0; padding: 0; }
.mct-langs__sep { color: #3d5978; }
.mct-lang-btn {
  cursor: pointer; background: none; border: none; padding: 0;
  font: inherit; color: #89a0c0;
}
.mct-lang-btn.is-active { color: var(--mct-white); font-weight: 700; }

/* ==========================================================================
   5. Header + navigation
   ========================================================================== */
.mct-header {
  border-bottom: 1px solid var(--mct-border);
  position: sticky;
  top: 0;
  background: var(--mct-white);
  z-index: 20;
}
.mct-header__row {
  padding-top: 14px;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.mct-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
}
.mct-logo img,
.mct-logo .custom-logo { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.mct-logo__text {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--mct-navy);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  min-width: 0;
  overflow-wrap: break-word;
}

.mct-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
  color: var(--mct-nav-text);
  list-style: none;
  margin: 0;
  padding: 0;
}
.mct-nav li { display: flex; }
.mct-nav a { color: inherit; display: flex; align-items: center; gap: 4px; }
.mct-nav svg { flex-shrink: 0; }

.mct-header__actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.mct-icon-btn {
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--mct-nav-text); display: flex;
}
.mct-nav-toggle { display: none; }

.mct-mobile-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px var(--mct-gutter) 20px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--mct-nav-text);
  border-top: 1px solid var(--mct-border);
  list-style: none;
  margin: 0;
}
.mct-mobile-nav.is-open { display: flex; }
.mct-mobile-nav a { color: inherit; padding: 10px 0; display: block; }

.mct-search-form {
  display: none;
  padding: 14px var(--mct-gutter) 18px;
  border-top: 1px solid var(--mct-border);
}
.mct-search-form.is-open { display: flex; gap: 8px; }
.mct-search-form input[type="search"] {
  flex: 1; min-width: 0; border: 1px solid var(--mct-border); border-radius: 8px;
  padding: 10px 14px; font-size: 14px; font-family: inherit; color: var(--mct-text);
}
.mct-search-form button {
  background: var(--mct-blue); border: none; border-radius: 8px; padding: 0 16px;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.mct-search-form button:hover { background: var(--mct-blue-hover); }

@media (max-width: 1023.98px) {
  .mct-nav { display: none; }
  .mct-nav-toggle { display: flex; }
}

/* ==========================================================================
   6. Buttons
   ========================================================================== */
.mct-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.mct-btn--primary { background: var(--mct-blue); color: #fff; }
.mct-btn--primary:hover { background: var(--mct-blue-hover); color: #fff; }
.mct-btn--outline { background: #fff; color: var(--mct-blue); border-color: #cddcf0; }
.mct-btn--outline:hover { border-color: var(--mct-blue); color: var(--mct-blue); }
.mct-btn--light { background: #fff; color: var(--mct-navy); padding: 15px 30px; white-space: nowrap; }
.mct-btn--light:hover { background: var(--mct-bg-soft); color: var(--mct-navy); }

/* ==========================================================================
   7. Hero
   ========================================================================== */
.mct-hero {
  /* Longhand only: a padding shorthand here would wipe out the horizontal
     gutters inherited from .mct-container and misalign the hero with the
     sections below it. */
  padding-top: 64px;
  padding-bottom: 48px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.mct-hero h1 {
  font-size: 44px;
  line-height: 1.14;
  font-weight: 800;
  color: var(--mct-navy);
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.mct-hero p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--mct-text-secondary);
  max-width: 520px;
  margin: 0 0 32px;
}
.mct-hero__actions { display: flex; gap: 14px; margin-bottom: 48px; flex-wrap: wrap; }
.mct-hero__stats { display: flex; gap: 36px; flex-wrap: wrap; }
.mct-stat { display: flex; align-items: center; gap: 12px; }
.mct-stat__icon { color: var(--mct-blue); flex-shrink: 0; }
.mct-stat__num { font-size: 22px; font-weight: 800; color: var(--mct-navy); }
.mct-stat__label { font-size: 13px; color: var(--mct-text-muted); }

.mct-hero__photo { width: 100%; height: 420px; object-fit: cover; }

@media (max-width: 1023.98px) {
  .mct-hero { grid-template-columns: 1fr; gap: 36px; padding-top: 44px; }
}
@media (max-width: 639.98px) {
  .mct-hero h1 { font-size: 30px; }
  .mct-hero p { font-size: 16px; margin-bottom: 24px; }
  .mct-hero__actions { margin-bottom: 32px; }
  .mct-hero__stats { gap: 20px 28px; }
  .mct-hero__photo { height: 240px; }
}
@media (max-width: 479.98px) {
  .mct-hero__actions { flex-direction: column; }
  .mct-hero__actions .mct-btn { text-align: center; }
}

/* ==========================================================================
   8. Image placeholder (fills in for admin-uploaded photos)
   ========================================================================== */
.mct-image-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f2f1ef;
  color: #6e6c66;
  text-align: center;
}
.mct-image-slot--rounded { border-radius: 16px; }
.mct-image-slot--rect { border-radius: 0; }
.mct-image-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mct-image-slot__caption {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px; font-size: 13px; line-height: 1.4;
}

/* ==========================================================================
   9. Mission
   ========================================================================== */
.mct-mission-wrap { padding: 0 var(--mct-gutter) 56px; max-width: var(--mct-container); margin: 0 auto; }
.mct-mission {
  position: relative;
  background: linear-gradient(120deg, #eef3fb 0%, #e4edf9 100%);
  border-radius: 18px;
  padding: 40px 44px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 28px;
}
.mct-mission__deco { position: absolute; right: 0; bottom: 0; width: 340px; height: 180px; opacity: .5; pointer-events: none; }
.mct-mission__deco span { position: absolute; bottom: 0; width: 0; height: 0; border-left: 70px solid transparent; border-right: 70px solid transparent; border-bottom: 100px solid #c9d9ee; right: 20px; }
.mct-mission__deco span:nth-child(2) { border-left-width: 55px; border-right-width: 55px; border-bottom-width: 75px; border-bottom-color: #d7e4f4; right: 110px; }
.mct-mission__deco span:nth-child(3) { border-left-width: 50px; border-right-width: 50px; border-bottom-width: 65px; border-bottom-color: #dce8f6; right: 0; }
.mct-mission__icon {
  position: relative; width: 72px; height: 72px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 4px 14px rgba(11,42,77,.08); color: var(--mct-blue);
}
.mct-mission__body { position: relative; }
.mct-mission h2 { font-size: 20px; font-weight: 800; color: var(--mct-navy); margin: 0 0 8px; }
.mct-mission p { font-size: 15.5px; line-height: 1.6; color: var(--mct-text-secondary); margin: 0; max-width: 640px; }

@media (max-width: 639.98px) {
  .mct-mission { flex-direction: column; align-items: flex-start; padding: 32px 28px; }
}

/* ==========================================================================
   10. Section heading + quick links
   ========================================================================== */
.mct-section { padding: 0 var(--mct-gutter) 56px; max-width: var(--mct-container); margin: 0 auto; }
.mct-section__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.mct-section h2 { font-size: 24px; font-weight: 800; color: var(--mct-navy); margin: 0; }
.mct-more-link { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }

.mct-quicklinks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.mct-quicklink-card {
  background: #fff;
  border: 1px solid var(--mct-border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: inherit;
}
.mct-quicklink-card:hover { border-color: var(--mct-blue); box-shadow: 0 8px 20px rgba(11,42,77,.08); color: inherit; }
.mct-quicklink-card__icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--mct-bg-soft);
  display: flex; align-items: center; justify-content: center; color: var(--mct-blue);
}
.mct-quicklink-card__title { font-weight: 700; font-size: 15px; color: var(--mct-navy); }
.mct-quicklink-card__desc { font-size: 13px; color: var(--mct-text-muted); line-height: 1.5; }

@media (max-width: 1023.98px) {
  .mct-quicklinks { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 639.98px) {
  .mct-quicklinks { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .mct-quicklink-card { padding: 20px 14px; gap: 10px; }
  .mct-section h2 { font-size: 21px; }
}
@media (max-width: 399.98px) {
  .mct-quicklinks { grid-template-columns: 1fr; }
}

/* ==========================================================================
   11. News card (reused: front page, blog index, archive)
   ========================================================================== */
.mct-news-card {
  border: 1px solid var(--mct-border);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.mct-news-card__media { min-height: 280px; }
.mct-news-card__media .mct-image-slot,
.mct-news-card__media img { width: 100%; height: 100%; min-height: 280px; }
.mct-news-card__body { padding: 32px 36px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.mct-news-card__meta { display: flex; align-items: center; gap: 14px; font-size: 13px; flex-wrap: wrap; }
.mct-news-card__tag {
  background: var(--mct-bg-soft); color: var(--mct-blue); font-weight: 700;
  padding: 4px 10px; border-radius: 6px; letter-spacing: .02em;
}
.mct-news-card__date { color: var(--mct-text-muted-2); }
.mct-news-card__title { font-size: 22px; font-weight: 800; color: var(--mct-navy); margin: 0; line-height: 1.3; }
.mct-news-card__title a { color: inherit; }
.mct-news-card__excerpt { font-size: 15px; line-height: 1.6; color: var(--mct-text-secondary); margin: 0; }
.mct-news-card__more { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 6px; margin-top: 6px; }

/* Listing grid on home.php / archive.php / search.php */
.mct-news-list { display: flex; flex-direction: column; gap: 24px; }
.mct-news-list .mct-news-card { grid-template-columns: 320px 1fr; }

@media (max-width: 1023.98px) {
  .mct-news-card,
  .mct-news-list .mct-news-card { grid-template-columns: 1fr; }
}
@media (max-width: 639.98px) {
  .mct-news-card__media,
  .mct-news-card__media .mct-image-slot,
  .mct-news-card__media img { min-height: 200px; }
  .mct-news-card__body { padding: 24px 20px; }
  .mct-news-card__title { font-size: 19px; }
}

/* ==========================================================================
   12. CTA band
   ========================================================================== */
.mct-cta {
  background: linear-gradient(120deg, var(--mct-navy) 0%, var(--mct-navy-soft) 100%);
  border-radius: 18px;
  padding: 44px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.mct-cta__body { max-width: 600px; }
.mct-cta h2 { font-size: 24px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.mct-cta p { font-size: 15px; line-height: 1.6; color: var(--mct-footer-text); margin: 0; }

@media (max-width: 639.98px) {
  .mct-cta { padding: 28px 24px; }
  .mct-cta h2 { font-size: 20px; }
  .mct-cta .mct-btn--light { width: 100%; text-align: center; white-space: normal; }
}

/* ==========================================================================
   13. Contacts
   ========================================================================== */
.mct-contacts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.mct-contact-item { display: flex; gap: 14px; }
.mct-contact-item__icon { color: var(--mct-blue); flex-shrink: 0; }
.mct-contact-item__label { font-weight: 700; color: var(--mct-navy); margin-bottom: 6px; }
.mct-contact-item__value { font-size: 14.5px; color: var(--mct-text-secondary); line-height: 1.6; }
.mct-contact-item__value a { color: inherit; }

.mct-social-title { font-weight: 700; color: var(--mct-navy); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.mct-social-title svg { color: var(--mct-blue); }
.mct-social-links { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.mct-social-link {
  width: 38px; height: 38px; border-radius: 50%; background: var(--mct-bg-soft);
  display: flex; align-items: center; justify-content: center; color: var(--mct-blue);
}
.mct-social-link:hover { background: #dce8f6; color: var(--mct-blue); }

@media (max-width: 1023.98px) {
  .mct-contacts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639.98px) {
  .mct-contacts { grid-template-columns: 1fr; }
}

/* ==========================================================================
   14. Footer
   ========================================================================== */
.mct-footer { background: var(--mct-navy); color: var(--mct-footer-text); }
.mct-footer__grid {
  padding: 48px var(--mct-gutter) 28px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 32px;
}
.mct-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-width: 0; }
.mct-footer__brand img,
.mct-footer__brand .custom-logo { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.mct-footer__brand-text { font-size: 12.5px; font-weight: 700; line-height: 1.3; color: #fff; text-transform: uppercase; min-width: 0; overflow-wrap: break-word; }
.mct-footer__copy { font-size: 13px; color: var(--mct-footer-text-muted); margin: 0; line-height: 1.6; }
.mct-footer__heading { font-weight: 700; color: #fff; margin-bottom: 16px; font-size: 14.5px; }
.mct-footer__heading--spacer { opacity: 0; }
.mct-footer__nav { display: flex; flex-direction: column; gap: 10px; font-size: 14px; list-style: none; margin: 0; padding: 0; }
.mct-footer__nav a { color: var(--mct-footer-text); }
.mct-newsletter-form { display: flex; gap: 8px; }
.mct-newsletter-form input[type="email"] {
  flex: 1; min-width: 0; background: var(--mct-navy-soft); border: 1px solid #24487a;
  border-radius: 8px; padding: 11px 14px; color: #fff; font-size: 14px; font-family: inherit;
}
.mct-newsletter-form button {
  background: var(--mct-blue); border: none; border-radius: 8px; width: 42px; flex-shrink: 0;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.mct-newsletter-form button:hover { background: var(--mct-blue-hover); }

@media (max-width: 1023.98px) {
  .mct-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 639.98px) {
  .mct-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .mct-footer__heading--spacer { display: none; }
}

/* ==========================================================================
   15. Interior pages (page.php / single.php / archive.php / search.php / 404.php)
   ========================================================================== */
.mct-page-header { padding: 48px var(--mct-gutter) 32px; max-width: var(--mct-container); margin: 0 auto; }
.mct-page-header h1 { font-size: 36px; font-weight: 800; color: var(--mct-navy); margin: 0; letter-spacing: -0.01em; }
.mct-page-header .mct-archive-desc { margin-top: 12px; color: var(--mct-text-secondary); font-size: 15.5px; line-height: 1.6; }

.mct-content-wrap { max-width: var(--mct-container); margin: 0 auto; padding: 0 var(--mct-gutter) 64px; }
.mct-entry-header { margin: 48px 0 32px; }
.mct-entry-header h1 { font-size: 36px; font-weight: 800; color: var(--mct-navy); margin: 12px 0 0; letter-spacing: -0.01em; }
.mct-entry-thumbnail { margin: 0 0 32px; border-radius: 16px; overflow: hidden; }
.mct-entry-thumbnail img { width: 100%; display: block; }
.mct-entry-meta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--mct-text-muted-2); margin-bottom: 16px; flex-wrap: wrap; }
.mct-entry-meta a { color: inherit; font-weight: 700; }

.entry-content { font-size: 16px; line-height: 1.7; color: var(--mct-text); max-width: 760px; }
.entry-content > * { margin-top: 0; margin-bottom: 1.4em; }
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
  color: var(--mct-navy); font-weight: 800; line-height: 1.3; margin-top: 1.6em;
}
.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 21px; }
.entry-content a { text-decoration: underline; text-underline-offset: 2px; }
.entry-content img { border-radius: 12px; }
.entry-content blockquote {
  border-left: 4px solid var(--mct-blue); margin: 1.6em 0; padding: 4px 0 4px 20px;
  color: var(--mct-text-secondary); font-style: italic;
}
.entry-content .wp-block-button__link {
  background: var(--mct-blue); border-radius: 8px; font-weight: 700;
}
.entry-content .wp-block-button__link:hover { background: var(--mct-blue-hover); }
.entry-content.alignwide,
.entry-content .alignwide { max-width: 1040px; }
.entry-content .alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }

.mct-404 { text-align: center; padding: 96px var(--mct-gutter); max-width: 640px; margin: 0 auto; }
.mct-404 h1 { font-size: 96px; font-weight: 800; color: var(--mct-blue); margin: 0; line-height: 1; }
.mct-404 p { font-size: 17px; color: var(--mct-text-secondary); margin: 16px 0 32px; }
.mct-404__search { margin-top: 32px; }
.mct-404__search .mct-search-form { justify-content: center; }

.mct-pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.mct-pagination a, .mct-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--mct-border); color: var(--mct-nav-text); font-weight: 600; font-size: 14px;
}
.mct-pagination a:hover { border-color: var(--mct-blue); color: var(--mct-blue); }
.mct-pagination .current { background: var(--mct-blue); border-color: var(--mct-blue); color: #fff; }

.post-navigation {
  max-width: 760px; margin: 48px 0 0; padding: 24px 0; border-top: 1px solid var(--mct-border);
}
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.post-navigation .nav-next { margin-left: auto; text-align: right; }
.post-navigation a { display: block; font-weight: 700; color: var(--mct-navy); }
.mct-nav-subtitle { display: block; font-size: 12.5px; font-weight: 600; color: var(--mct-text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }

.mct-comments { max-width: 760px; margin: 56px 0 0; }
.mct-comments__title { font-size: 22px; font-weight: 800; color: var(--mct-navy); margin: 0 0 24px; }
.mct-comments__closed { color: var(--mct-text-muted); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; padding-left: 32px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--mct-border); }
.comment-author { font-weight: 700; color: var(--mct-navy); }
.comment-metadata { font-size: 13px; color: var(--mct-text-muted-2); margin-bottom: 8px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; border: 1px solid var(--mct-border); border-radius: 8px;
  padding: 11px 14px; font: inherit; color: var(--mct-text);
}
.comment-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--mct-nav-text); }
.comment-form p { margin: 0 0 16px; }
.comment-form .form-submit input[type="submit"] {
  width: auto; background: var(--mct-blue); color: #fff; border: none; font-weight: 700; cursor: pointer;
}
.comment-form .form-submit input[type="submit"]:hover { background: var(--mct-blue-hover); }

/* ==========================================================================
   16. Widget areas: content sidebar + footer columns
   ========================================================================== */
/* Two-column layout on listing/single templates; collapses to one column
   automatically when the sidebar has no widgets (no --has-sidebar class). */
.mct-layout { display: grid; gap: 48px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) {
  .mct-layout--has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
}

.widget { margin-bottom: 24px; }
.widget-title,
.mct-sidebar .widget h1, .mct-sidebar .widget h2, .mct-sidebar .widget h3 {
  font-weight: 700; color: var(--mct-navy); margin: 0 0 16px; font-size: 16px; line-height: 1.3;
}
.mct-sidebar .widget {
  border: 1px solid var(--mct-border);
  border-radius: 14px;
  padding: 24px;
}
.widget ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.widget ul ul { padding-left: 16px; margin-top: 10px; }
.mct-sidebar .widget a { color: var(--mct-nav-text); }
.mct-sidebar .widget a:hover { color: var(--mct-blue); }
.widget select { width: 100%; border: 1px solid var(--mct-border); border-radius: 8px; padding: 10px 12px; font: inherit; color: var(--mct-text); }
.widget .wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.widget .wp-block-search__input {
  flex: 1; min-width: 0; border: 1px solid var(--mct-border); border-radius: 8px;
  padding: 10px 14px; font: inherit; font-size: 14px; color: var(--mct-text);
}
.widget .wp-block-search__button {
  background: var(--mct-blue); border: none; border-radius: 8px; padding: 0 16px;
  color: #fff; cursor: pointer; font: inherit; font-weight: 700;
}
.widget .wp-block-search__button:hover { background: var(--mct-blue-hover); }
.widget .wp-calendar-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.widget .wp-calendar-table caption { margin-bottom: 8px; font-weight: 700; color: var(--mct-navy); }
.widget .wp-calendar-table th,
.widget .wp-calendar-table td { padding: 6px 4px; text-align: center; }
.widget .wp-calendar-nav { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13.5px; }

/* Footer widget columns inherit the dark palette. */
.mct-footer .widget { margin-bottom: 20px; }
.mct-footer .widget:last-child { margin-bottom: 0; }
.mct-footer .widget-title,
.mct-footer .widget h1, .mct-footer .widget h2, .mct-footer .widget h3 {
  font-weight: 700; color: #fff; margin: 0 0 16px; font-size: 14.5px; line-height: 1.3;
}
.mct-footer .widget ul { font-size: 14px; }
.mct-footer .widget a { color: var(--mct-footer-text); }
.mct-footer .widget a:hover { color: #fff; }
.mct-footer .widget p { margin: 0 0 12px; font-size: 14px; color: var(--mct-footer-text); line-height: 1.6; }

@media (max-width: 1023.98px) {
  .mct-page-header h1 { font-size: 28px; }
  .mct-entry-header h1 { font-size: 28px; }
}
@media (max-width: 639.98px) {
  .mct-page-header { padding-top: 32px; }
  .mct-page-header h1 { font-size: 24px; }
  .mct-entry-header { margin: 32px 0 24px; }
  .mct-entry-header h1 { font-size: 24px; }
  .mct-404 { padding: 64px var(--mct-gutter); }
  .mct-404 h1 { font-size: 72px; }
}
